
I expect this is the same bug we fixed in 6.4 recently. One workaround is to mention the missing module explicitly on the ghc command line, to force it to be included in the program. Cheers, Simon On 16 April 2005 17:30, Simon Peyton-Jones wrote:
6.4 does mutual recursion much much better. See the manual. Don't expend much effort on mutual recn in 6.2
S
-----Original Message----- From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users- bounces@haskell.org] On Behalf Of Isaac Jones Sent: 16 April 2005 01:46 To: GHC-users list Cc: Simon Marlow Subject: hi-boot and dependencies bug?
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