Runtime Haskell interpreter

#11setImportsQ and languageExtensions interction.

Load the attached file into ghci, and then try a couple of experiments:

wrapFun [] -> prints Hello wrapFun [("Data.List", Nothing)] -> prints Hello wrapFun [("Data.List", Just "DL")] -> prints error message!

Seems like importing a qualified module turns off the NoImplicitPrelude extension for some reason.

There's an easy workaround - set the language extensions before doing the imports instead of after. Not clear if this is a bug or just something to be documented. No fix included.

  • I can't see the attachment!

    Anyway, it is probably a problem coming from the way qualified imports are handled, namely using a wrapper module where the specified modules are imported qualified (this was to support qualified imports long before it was added as a feature to ghci). If I recall correctly Prelude(show) was also imported (it is needed for eval), so that could explain the problem you see.