
Hi, I'm having a compile issue with multirec TH. Upon investigation, it seems the same problem occurs in the compilation of one of the examples in the multirec distribution: domi@arial:/tmp> wget -q http://hackage.haskell.org/packages/archive/multirec/0.4.1/multirec-0.4.1.ta... domi@arial:/tmp> tar xzf multirec-0.4.1.tar.gz domi@arial:/tmp> cd multirec-0.4.1/examples domi@arial:/tmp/multirec-0.4.1/examples> ghc --make ASTTHUse.hs [1 of 2] Compiling AST ( AST.hs, AST.o ) [2 of 2] Compiling ASTTHUse ( ASTTHUse.hs, ASTTHUse.o ) Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package array-0.3.0.0 ... linking ... done. Loading package containers-0.3.0.0 ... linking ... done. Loading package pretty-1.0.1.1 ... linking ... done. Loading package template-haskell ... linking ... done. Loading package multirec-0.4.1 ... linking ... done. ASTTHUse.hs:31:2: GADT pattern match in non-rigid context for `Tag' Probable solution: add a type signature for `to' In the pattern: Tag L C K f0 In the pattern: L Tag L C K f0 In the definition of `to': to Expr L Tag L C K f0 = Const f0 domi@arial:/tmp/multirec-0.4.1/examples> ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.1 Can you please tell me if this is a known problem and if so, if there is a workaround? Thanks in advance for your help! Dominique

Hi Dominique, It is a known problem---multirec does not work with GHC 6.12. You have to use 6.10.4. An alternative is not to use the Template Haskell stuff and provide explicit type signatures expanding the PF type family in the from/to functions... Cheers, Pedro On Tue, Jun 22, 2010 at 06:02, Dominique Devriese < dominique.devriese@cs.kuleuven.be> wrote:
Hi,
I'm having a compile issue with multirec TH. Upon investigation, it seems the same problem occurs in the compilation of one of the examples in the multirec distribution:
domi@arial:/tmp> wget -q
http://hackage.haskell.org/packages/archive/multirec/0.4.1/multirec-0.4.1.ta... domi@arial:/tmp> tar xzf multirec-0.4.1.tar.gz domi@arial:/tmp> cd multirec-0.4.1/examples domi@arial:/tmp/multirec-0.4.1/examples> ghc --make ASTTHUse.hs [1 of 2] Compiling AST ( AST.hs, AST.o ) [2 of 2] Compiling ASTTHUse ( ASTTHUse.hs, ASTTHUse.o ) Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package array-0.3.0.0 ... linking ... done. Loading package containers-0.3.0.0 ... linking ... done. Loading package pretty-1.0.1.1 ... linking ... done. Loading package template-haskell ... linking ... done. Loading package multirec-0.4.1 ... linking ... done.
ASTTHUse.hs:31:2: GADT pattern match in non-rigid context for `Tag' Probable solution: add a type signature for `to' In the pattern: Tag L C K f0 In the pattern: L Tag L C K f0 In the definition of `to': to Expr L Tag L C K f0 = Const f0 domi@arial:/tmp/multirec-0.4.1/examples> ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.1
Can you please tell me if this is a known problem and if so, if there is a workaround?
Thanks in advance for your help! Dominique _______________________________________________ Generics mailing list Generics@haskell.org http://www.haskell.org/mailman/listinfo/generics

José,
2010/6/22 José Pedro Magalhães
It is a known problem---multirec does not work with GHC 6.12. You have to use 6.10.4.
An alternative is not to use the Template Haskell stuff and provide explicit type signatures expanding the PF type family in the from/to functions...
Thanks for the information. Providing my own PF type families is indeed what I've been doing succesfully. Is this a fundamental problem, or is there hope for a solution in a future version? Thanks Dominique

Hi Dominique,
Check http://hackage.haskell.org/trac/ghc/ticket/3851
Cheers,
Pedro
2010/6/22 Dominique Devriese
José,
2010/6/22 José Pedro Magalhães
: It is a known problem---multirec does not work with GHC 6.12. You have to use 6.10.4.
An alternative is not to use the Template Haskell stuff and provide explicit type signatures expanding the PF type family in the from/to functions...
Thanks for the information. Providing my own PF type families is indeed what I've been doing succesfully. Is this a fundamental problem, or is there hope for a solution in a future version?
Thanks Dominique

José,
2010/6/22 José Pedro Magalhães
That's what I wanted to know. Thanks Dominique
participants (2)
-
Dominique Devriese
-
José Pedro Magalhães