hi-boot and dependencies bug?

Simon Peyton-Jones simonpj at microsoft.com
Sat Apr 16 12:29:57 EDT 2005


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 at haskell.org
[mailto:glasgow-haskell-users-
| bounces at 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



More information about the Glasgow-haskell-users mailing list