Commit 845aff2a authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Add test for Trac #3440

parent d7304d8f
{-# LANGUAGE TypeFamilies, GADTs #-}
module T3440 where
type family Fam a :: *
data GADT :: * -> * where
GADT :: a -> Fam a -> GADT (Fam a)
unwrap :: GADT (Fam a) -> (a, Fam a)
unwrap (GADT x y) = (x, y)
T3440.hs:11:22:
Could not deduce (a1 ~ a) from the context (Fam a ~ Fam a1)
`a1' is a rigid type variable bound by
a pattern with constructor
GADT :: forall a. a -> Fam a -> GADT (Fam a)
at T3440.hs:11:9
`a' is a rigid type variable bound by
the type signature for `unwrap' at T3440.hs:10:21
In the expression: x
In the expression: (x, y)
In an equation for `unwrap': unwrap (GADT x y) = (x, y)
......@@ -62,4 +62,4 @@ test('T3330c', normal, compile_fail, [''])
test('T4179', normal, compile_fail, [''])
test('T4254', normal, compile_fail, [''])
test('T2239', normal, compile_fail, [''])
test('T3440', normal, compile_fail, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment