Redefining built in syntax
Simon Marlow
simonmarhaskell at gmail.com
Fri Jan 4 08:42:16 EST 2008
Simon Peyton-Jones wrote:
> | C:\Documents\Uni\packages\base>ghci Prelude.hs -i -cpp -fglasgow-exts
> | -package-name base
> | GHCi, version 6.8.1: http://www.haskell.org/ghc/ :? for help
> |
> | <interactive>:1:22:
> | Failed to load interface for `System.IO':
> | it is not a module in the current program, or in any known package.
>
> I don't think we'd ever thought of doing this. In particular, I don't think we'd every considered using GHCi in combination with -package-name.
I can't off the top of my head think of a reason why it should fail, unless
you use a special -package-name like base, rts, haskell98 or template-haskell.
> Furthermore, I'm not sure we've ever thought what should happen if you use -package-name foo, when compiling with a compiler that already has a package 'foo' (with an identical name) installed. Probably we should check for this case, because it looks likely to lead to confusion.
This certainly works, because it must be possible to recompile a package P
even though P is installed - it happens when you go back in libraries/ and
say 'make', for example.
Normally the already-installed P is hidden, because Cabal passes
-hide-all-packages to GHC, so things work out fine. Probably GHC ought to
filter out P and anything that depends on it from the set of installed
packages anyway, to prevent strange things from happening.
Cheers,
Simon
More information about the Glasgow-haskell-users
mailing list