The Prompt #38
Replies: 4 comments
-
Since it's a Q&A category, do you have an actual question? |
Beta Was this translation helpful? Give feedback.
-
Can I modify the prompts in the tutorial? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure at which point the list of modules was removed: it seems that this repository imported a version without the lists already. Recently, #32 was merged that continued in that direction and removed Also, you mention GHC installation from some Linux distro repository. Since #24 we recommend GHCup, which, if used, gives you GHC 9.2 by default these days -- consistent with the decision to remove the module lists. |
Beta Was this translation helpful? Give feedback.
-
Here are some alternative strategies:
|
Beta Was this translation helpful? Give feedback.
-
When I went through LYAH a few years ago the prompt showed which modules were being used. I think the Linux distro I used at the time installed ghci with a custom prompt. I think the prompt showing which modules are being used is helpful for a tutorial. I have notes which go halfway through chapter 13 that use this prompt. I found another thing I could change in my notes, but I need to know if I can write the prompt differently first.
Here is an example:
ghci Data.Char> all isAlphaNum "bobby283"
True
IsAlphaNum isn't available unless you import it. Some people don't like this prompt because it can make the prompt crowded. But, I think it is fine for a tutorial.
You can get this custom prompt by putting the following code in your .ghci file:
:set prompt "%s> "
Beta Was this translation helpful? Give feedback.
All reactions