No big deal after all.  Replacing the ($) uses with regular parenthesized
application allows compilation to go through.  - Conal

On 8/21/07, Conal Elliott <[EMAIL PROTECTED]> wrote:
>
> In going from ghc-6.6 to ghc-6.7, I've lost some GADT pattern matching
> that I'd really like to have back. The message:
>
>     c:/conal/Haskell/Eros/src/gadt-example.hs :23:32:
>     GADT pattern match in non-rigid context for `:*'
>       Tell GHC HQ if you'd like this to unify the context
>     In the pattern: a :* b
>     In a lambda abstraction: \ (a :* b) -> ((f a) :* b)
>     In the second argument of `($)', namely
>         `\ (a :* b) -> ((f a) :* b)'
>
> and the relevant code:
>
>     -- | Statically typed type representations
>     data Ty :: * -> * where
>       (:*)   :: Ty a -> Ty b -> Ty (a, b)
>       (:->)  :: Ty a -> Ty b -> Ty (a->b)
>       OtherTy :: TypeRep -> Ty a
>
>     -- | Type transformations
>     newtype TyFun a b = TyFun { unTyFun :: Ty a -> Ty b }
>
>     instance Arrow TyFun where
>       TyFun f >>> TyFun g = TyFun (f >>> g)
>       first  (TyFun f) = TyFun $ \ (a :* b) -> (f a :* b)
>       second (TyFun g) = TyFun $ \ (a :* b) -> (a :* g b)
>
> Full test module attached with many more example matchings.
>
> I'd really like to get this code working in ghc-6.7.  How likely is that?
> The best alternative I know is *much* less readable.
>
> Thanks,  - Conal
>
>
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to