Haskell "Failed to load interface" after changing directory

Natascha

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?

duplode

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Haskell Failed to load interface for module

From Dev

Failed to load interface for ‘System’

From Dev

Intero : Failed to load interface for Lib

From Dev

Execute command after changing directory

From Dev

Changing directory of binaries after compiling

From Java

Python pickling after changing a module's directory

From Dev

'Failed to load interface' error when loading compiled modules in ghci

From Dev

Changing directory

From Dev

Makefile doesn't work after changing the project directory

From Java

Activities names are unresolvable after changing the project directory and module name

From Dev

Laravel after changing public directory to public_html

From Dev

Run Atom using a bat file after changing directory

From Dev

How to return back to script directory after changing the directory from within the script?

From Dev

stack build fails with "Failed to load interface for `Main' no unit id matching `main' was found"

From Java

Changing WireMock __files directory

From Dev

Changing directory with os in python

From Dev

Unix script changing directory

From Dev

Changing AWS configuration directory

From Dev

Changing ownership of a directory

From Java

Subprocess changing directory

From Dev

Why changing directory with `/../` works?

From Dev

Changing Vim Home Directory

From Dev

changing directory in ipython notebook

From Dev

chroot not changing to home directory

From Dev

Bash Script Not changing Directory

From Dev

Changing Wamp Server directory

From Dev

Changing parent directory (../) with symlinks

From Dev

Changing the Target directory in HIVE

From Dev

Changing to a directory and then getcwd()

Related Related

HotTag

Archive