blob: feb16c7de1ded03fcd3b8e2d73d16718da865ffd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
{-# LANGUAGE GADTs #-}
module ShouldSucceed1 where
data T1 a where
C :: (T2 b) -> b -> T1 Int
D :: Bool -> T1 Bool
-- should this work?
data T2 a where
F :: Int -> T2 Int
-- Should work, even though we start as wobbly
-- the existential makes us rigid again
foo x = case x of
C (F _) z -> (z + 1)
|