[Haskell-cafe] Re: Weird ghci behaviour?

Yitzchak Gale gale at sefer.org
Wed Nov 14 07:05:19 EST 2007

I was also bitten by this. I consider it to be a
serious problem with the UI for ghci.

My vote is:

o The default should be to make all symbols available
whenever possible.

o It should be easy for experts, like Aaron Denney,
to get the current behavior. (E.g., a flag, that can
be turned on or off at the ghci command, during a
session, or as the local default in dot-ghci.)

o Whenever it is not possible to make all symbols
available, give the user a clear warning.

I don't think it's necessary to go overboard with
details in the warning. A simple, clear, generic warning
at load time is enough.

For example:

If we looked for the source code and did not find it,
this might be a beginner who accidentally deleted it.
So we say: "Module 'Foo' loaded. Warning:
Source code not found for 'Foo', so only its exported symbols
are available."

If it was requested, we say: "Module 'Foo' loaded.
Only the compiled module was loaded, as requested, so only
its exported symbols are available." So someone who
requested this in error will realize that. Experts should be
able to turn off this message - but not the previous one -
and rely upon the subtle hint in the command prompt.

These give enough information that anyone who gets into
the wrong situation by mistake will know (or be able to figure
out) exactly what happened.


More information about the Haskell-Cafe mailing list