Ticket #2830 (closed bug: fixed)
undefined reference to `base_DataziTuple_Z63T_con_info' when using instances with context
Description
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.

