Redefining built in syntax

Neil Mitchell ndmitchell at
Thu Jan 3 13:29:25 EST 2008

Hi Victor,

> -package-name base
> should do the thing

Thanks very much, that is the correct flag to allow built in syntax.
However, turning that flag on also does other stuff, which breaks new
things. Taking the module Prelude.hs, from a darcs checkout of the

C:\Documents\Uni\packages\base>ghci Prelude.hs -i -cpp -fglasgow-exts
GHCi, version 6.8.1:  :? for help
Loading package base ... linking ... done.
Ok, modules loaded: Prelude.

i.e. you can load the Prelude. However, specifying -package-name base:

C:\Documents\Uni\packages\base>ghci Prelude.hs -i -cpp -fglasgow-exts
-package-name base
GHCi, version 6.8.1:  :? for help

    Failed to load interface for `System.IO':
      it is not a module in the current program, or in any known package.

<interactive>:1:22: Not in scope: `System.IO.stderr'

<interactive>:1:22: Not in scope: `System.IO.stdin'
: panic! (the 'impossible' happened)
  (GHC version 6.8.1 for i386-unknown-mingw32):

Please report this as a GHC bug:

This is the same behaviour as loading Prelude without specifying -i.
Moving -i to other places still gives the same behaviour. Does
package-name base also imply other flags (perhaps -i. ?) which are
negatively effecting my particular use.

For context, my particular use is to call compileToCore on each file.
If the file can be loaded in GHCi, it seems that I can do the
compileToCore magic.



More information about the Glasgow-haskell-users mailing list