GHC Extensibility

Esa Ilari Vuokko eivuokko at gmail.com
Sun Jun 3 05:25:00 EDT 2007


On 6/3/07, Monique Monteiro <monique.louise at gmail.com> wrote:
> On 6/2/07, Esa Ilari Vuokko <eivuokko at gmail.com> wrote:
> > For stage1, this can be solved by adding "-package mtl" to ghc command
> > used to linking, for next stages, you'd need to add mtl to bootstrap cycle,
> > I think.  I have no idea how that is done.  Borrowing code from mtl might be
> > easier.
>
> GHC gives "unknown package: mtl" when I add this option.  Should I
> download it separately?

Maybe it needs version as well, mtl-1.0.1.  You should have the package already
as you managed to compile the haskell files.

Best regards,
Esa

PS. The symbol names are partly z-encoded (you can find details in
ghc sources) and partly contain compiler's invented bits.

mtlzm1zi0zi1_ControlziMonadziStateziLazzy_zdf14_closure becomes

mtl       => mtl    (ie package name)
zm       => -       (dash to separate package name and version)
1zi0zi1 => 1.0.1 (version)
_          => Some convention to put _ there.
ControlziMonadziStateziLazzy
            => Control.Monad.State.Lazy (module)
_zdf14_closure
            => closure number 14 (number is rather arbitary)


More information about the Glasgow-haskell-users mailing list