Fix incorrect ambiguity error on identically-named data constructors
[ghc.git] / testsuite / tests / typecheck / should_fail / tcfail179.hs
1 {-# LANGUAGE ExistentialQuantification #-}
2
3 -- Examples from Doaitse Swierstra and Brandon Moore
4 -- GHC users mailing list, April 07, title "Release plans"
5
6 -- This one should fail, but Hugs passes it
7
8 module ShouldFail where
9
10 data T s = forall x. T (s -> (x -> s) -> (x, s, Int))
11
12 run :: T s -> Int
13 run ts = case ts of
14 T g -> let (x,_, b) = g x id
15 in b
16