[Template-haskell] Using arrowT in a constructor class

Peter Gammie peteg at gungnir.csbnet.se
Tue Dec 14 11:12:00 EST 2004


(I'm using GHC 6.2.2 on SPARC/Solaris.)

I've got a class:

class (Arrow arrow) => ArrowComb arrow b where
    or2  :: arrow (b, b) b
    ...

and want to make an instance for it:

data DCin b = MkDCin { field :: b }

instance ArrowComb (->) b => ArrowComb (->) (DCin b) where
    or2 = ...

using Template Haskell. Trying to use "arrowT" as a constructor in this
context leads to the runtime error:

*** Exception: hsSyn/Convert.lhs:317: Non-exhaustive patterns in function
trans

I can provide a test case if you need one.

I don't have access to a CVS version, so this may already have been fixed.

regards,
Peter.


More information about the template-haskell mailing list