[Hs-Generics] Compile issue with multirec TH

José Pedro Magalhães jpm at cs.uu.nl
Tue Jun 22 10:10:56 EDT 2010


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 at 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 at arial:/tmp> wget -q
>
> http://hackage.haskell.org/packages/archive/multirec/0.4.1/multirec-0.4.1.tar.gz
>         domi at arial:/tmp> tar xzf multirec-0.4.1.tar.gz
>         domi at arial:/tmp> cd multirec-0.4.1/examples
>         domi at 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 at 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/generics
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/generics/attachments/20100622/9b5af6e2/attachment.html


More information about the Generics mailing list