summaryrefslogtreecommitdiff
path: root/testsuite/tests/boxy/Base1.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/boxy/Base1.hs')
-rw-r--r--testsuite/tests/boxy/Base1.hs35
1 files changed, 19 insertions, 16 deletions
diff --git a/testsuite/tests/boxy/Base1.hs b/testsuite/tests/boxy/Base1.hs
index 88e7e80f17..3f027bb93c 100644
--- a/testsuite/tests/boxy/Base1.hs
+++ b/testsuite/tests/boxy/Base1.hs
@@ -1,30 +1,33 @@
{-# OPTIONS_GHC -XImpredicativeTypes -fno-warn-deprecated-flags #-}
-module Base1 where
--- basic examples of impredicative instantiation of variables
+-- Sept 16: now failing, beause I've furter reduced the scop
+-- of impredicative types
-data MEither a b = MLeft a
- | MRight b
+module Base1 where
+-- basic examples of impredicative instantiation of variables
+
+data MEither a b = MLeft a
+ | MRight b
| MEmpty
-type Sid = forall a. a -> a
+type Sid = forall a. a -> a
--- no need for impredicativity
-test0 = MRight id
+-- no need for impredicativity
+test0 = MRight id
--- requires impredicativity
+-- requires impredicativity
test1 :: Sid -> MEither Sid b
-test1 fid = MLeft fid
+test1 fid = MLeft fid
-test2 :: MEither b Sid -> Maybe (Sid,Sid)
-test2 m = case (test1 id) of
- MLeft x -> case m of
- MRight y -> Just (x,y)
- _ -> Nothing
+test2 :: MEither b Sid -> Maybe (Sid,Sid)
+test2 m = case (test1 id) of
+ MLeft x -> case m of
+ MRight y -> Just (x,y)
+ _ -> Nothing
_ -> Nothing
test3 :: MEither a b -> b
-test3 (MRight x) = x
+test3 (MRight x) = x
-test4 = test3 (test1 id)
+test4 = test3 (test1 id)