#2830: undefined reference to `base_DataziTuple_Z63T_con_info' when using
instances with context
--------------------+-------------------------------------------------------
Reporter:  nomeata  |          Owner:          
    Type:  bug      |         Status:  new     
Priority:  normal   |      Component:  Compiler
 Version:  6.8.2    |       Severity:  normal  
Keywords:           |       Testcase:          
      Os:  Linux    |   Architecture:  x86     
--------------------+-------------------------------------------------------
 Hi,

 I came across this bug when using HAppS, but it is not related to HAppS,
 it seems.

 I have attached the files test4.hs and test5. They differ only in that the
 former one uses
 {{{
 instance (Serialize Method1) => UpdateEvent Method1 ()
 }}}
 while the second use uses
 {{{
 instance UpdateEvent Method1 ()
 }}}
 I can not tell any difference in the effect (in my real app, the example
 file does not have any senisble meaning), but that’s not the point: I can
 compile test5.hs without problems, but
 {{{
 $ ghc --make test4.hs
 [1 of 1] Compiling Main             ( test4.hs, test4.o )
 Linking test4 ...
 test4.o: In function `r1c1_info':
 (.text+0x639): undefined reference to `base_DataziTuple_Z63T_con_info'
 collect2: ld returned 1 exit status
 }}}

 It seems that ghc internally creates a large tuple (63 elements) with the
 Serialize instances – or something. The dumped core has some clues, I just
 can’t read them.

 Sorry for not testing this with a more up-to-date compiler, but I don’t
 have one handy.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2830>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to