hi-boot and dependencies bug?
Isaac Jones
ijones at syntaxpolice.org
Fri Apr 15 20:46:05 EDT 2005
Greetings.
I haven't tested this with ghc 6.4 yet, and I don't know if this is a
known problem. I noticed this while building support for cabal.
I have two mutually recursive modules, prepared as described in the
GHC 6.2 user's manual: A and B
I create A.hi-boot
in B, in import {-source-} A
This works fine. But now I create C, which imports B (not A). When I
compile with --make, A does not get built, and I get a link-time
error.
However, if C imports A directly, it builds everything just fine.
I've attached a tarball with the example. Test it like this:
% ghc --make C.hs
Chasing modules from: C.hs
Compiling B ( ./B.hs, ./B.o )
Compiling Main ( C.hs, C.o )
Linking ...
./B.o(.text+0x1b): In function `__stginit_B_':
: undefined reference to `__stginit_A_'
collect2: ld returned 1 exit status
peace,
isaac
p.s. please CC me on replies; i'm not subscribed to this mailing list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: recursive.tgz
Type: application/x-gtar
Size: 851 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/glasgow-haskell-users/attachments/20050415/3bdbb712/recursive.gtar
More information about the Glasgow-haskell-users
mailing list