blob: 7e52d3ce54e35ebccd742724ba1acd4072053d1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{-# LANGUAGE Rank2Types #-}
-- Crashed GHC 5.04 with tcTyC
-- panic: tcSplitTyConApp forall x{-r6S-} :: *.
-- Main.L{-rr-} x{-r6S-}
-- GHC 6.3: this is now an error (can do subsumption in patterns)
module Main where
newtype FA c = FA (forall x . c x)
newtype L x = L [x]
my_nil = FA (L []) :: FA L
sample :: String
sample = case my_nil of FA (L x) -> "foo"++x
-- -- but this works fine
-- sample = case my_nil of FA x -> case x of L y -> "foo"++y
main = print sample
|