Template Haskell

Simon Peyton-Jones simonpj@microsoft.com
Mon, 30 Sep 2002 13:03:12 +0100


| ghc --make -package haskell-src -fglasgow-exts foo.lhs
| ghc-5.05: chasing modules from: foo.lhs
| Skipping  TH               ( TH.lhs, TH.o )
| Compiling Main             ( foo.lhs, ./foo.o )
| Loading package base ... linking ... done.
| Loading package haskell98 ... linking ... done.
| Loading package haskell-src ... linking ... done.
|=20
| Without the Data.IORef import I get
|=20
|=20
| Compiling Main             ( foo.lhs, ./foo.o )
| ghc-5.05: Can't find compiled code for dependent module Data.IORef
| When linking an expression

Ah yes, this is a real bug.  In the move to Template Haskell, linking
has become more 'on-demand', rather than being based on what -package
commands you give.  Simon and I have discussed this and we need to do
some re-plumbing to properly support this.

For now, don't mix compiled and interpreted modules (except in other
packages) and you'll be fine.  The problem above is that TH was
precompiled.

Simon
_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc