Prelude not in haskell98?
simonmarhaskell at gmail.com
Fri Jun 8 04:42:15 EDT 2007
Iavor Diatchki wrote:
> Just curious, what external modules does the Prelude depend on?
> The only unusual feature that I can think of in the GHC Prelude is the
> fact that the partial functions throw exceptions, and so perhaps the
> Prelude implementation uses some extra modules for that?
I'm not really sure what you mean by "external modules". In GHC the Prelude is
comprised almost entirely of re-exports from other modules. You can follow the
source code links from the Haddock docs to take a look:
One big dependency is that the Prelude exports some I/O functionality, so it
pulls in the entire I/O library.
> On 6/6/07, Simon Marlow <simonmarhaskell at gmail.com> wrote:
>> Isaac Dupree wrote:
>> > -----BEGIN PGP SIGNED MESSAGE-----
>> > Hash: SHA1
>> > Stefan O'Rear wrote:
>> >>> Right, the problem is that if Prelude was in haskell98 then it
>> >>> be possible to have a program that /didn't/ depend on haskell98
>> >>> of -fno-implicit-prelude extensions, or having a Prelude in both
>> >>> would mean you couldn't depend on both base and haskell98)).
>> >> There's also a pragmatic reason. Currently it is impossible to have a
>> >> cycle of module imports cross package boundaries; so if the Prelude
>> >> in haskell98, then (since the Prelude depends on non-haskell98 base
>> >> modules for its implementation) *Nothing* in base could use the
>> > (Assuming haskell98 depends on base currently) It seems we would want
>> > haskell98 to re-export base's Prelude. It's just that that's not
>> > implemented in released-ghc package management code.
>> Yes, packages that re-export modules would be a useful feature. Then
>> we could
>> have a version of the base package that only exported the
>> modules, for example.
>> Glasgow-haskell-users mailing list
>> Glasgow-haskell-users at haskell.org
More information about the Glasgow-haskell-users