Unexpected NoImplicitPrelude behaviour in GHCi (bug?)

Daniel Fischer daniel.is.fischer at web.de
Thu Jun 10 08:27:44 EDT 2010

On Thursday 10 June 2010 14:02:10, Philip K.F. Hölzenspies wrote:
> Dear GHCers,
> Shouldn't the expected behaviour of GHCi be that the "entry module"
> determines the entire context? In other words, if module X in
> ghci X
> or in
> ghci
> > :l X
> contains the LANGUAGE-pragma NoImplicitPrelude, should the Prelude not
> be unloaded from ghci?

I don't think so. LANGUAGE-pragmata are a per-module thing. If you want to 
do some NoImplicitPrelude stuff in one module and test that module in ghci, 
most of the time you still want to have the Prelude functions around.
Your use-case seems more an exception to me.

> I would argue that this might also be seen as an example of why Ticket
> #124 for haskell-prime is a good idea for GHC:
> http://hackage.haskell.org/trac/haskell-prime/ticket/124

Hmm, I'd then have to explicitly import the Prelude in all my source files.
I could live with it, but I prefer the current behaviour.

> Kind regards,
> Philip

More information about the Glasgow-haskell-users mailing list