undefined reference to `base_DataziTuple_Z63T_con_info' when using instances with context
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.
Trac metadata
Trac field | Value |
---|---|
Version | 6.8.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |