GHC Extensibility

Esa Ilari Vuokko eivuokko at
Sat Jun 2 18:37:53 EDT 2007


On 6/3/07, Monique Monteiro <monique.louise at> wrote:
> Hi all,
>   I'm able to compile the .NET code generator with GHC without
> compiler errors, but now I have the linkage error below.  (In fact
> there are other similar messages, this is only an example).  This is
> strange because the *.o/*.hi files were all generated without error
> messages.  Has anyone any idea about how to solve it?
> (...)
> stage1/ilGen/ILGen.o(.rodata+0x50):fake: undefined reference to `mtlzm1zi0zi1_C
> ntrolziMonadziStateziLazzy_zdf14_closure'

It seems to me, that the code in ILGen is using Control.Monad.State
(that nowdays defaults to .Lazy) from package mtl.

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


More information about the Glasgow-haskell-users mailing list