After installing ghc I changed the working directory with
:cd /newDirectory
For this, I get the warning:
Warning: changing directory causes all loaded modules to be unloaded,
because the search path has changed.
Now, I cannot use a data type like Char. For this line:
map Char.isLower "abcD"
I get the message:
Failed to load interface for `Char'
It is a member of the hidden package `haskell98-2.0.0.2'.
Use -v to see a list of the files searched for.
Is the change of directory the reason for that error? How can I solve it?
You are looking for the module (not a data type) Data.Char
, which defines isLower
:
Prelude> map Data.Char.isLower "abcD"
[True,True,True,False]
You can also leave it loaded in GHCi, so that you don't have to specify the module every time you use its functions:
Prelude> :m +Data.Char
Prelude Data.Char> map isLower "abcD"
[True,True,True,False]
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments