summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail069.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail069.hs')
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail069.hs48
1 files changed, 48 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail069.hs b/testsuite/tests/typecheck/should_fail/tcfail069.hs
new file mode 100644
index 0000000000..63684fa9db
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/tcfail069.hs
@@ -0,0 +1,48 @@
+{-
+From: Marc van Dongen <dongen@cs.ucc.ie>
+Date: Wed, 9 Apr 1997 14:06:39 +0100 (BST)
+
+I just wanted to report that the erroneous and tiny
+program added below can not be compiled within 6MB of
+heap (Admitted it can be compiled with a bigger heap).
+It was part of a bigger program that could not be
+compiled within 20MB of heap.
+
+[GHC 2.03 and earlier.] Turned out to be a bug in the
+error recovery mechanism.
+
+-}
+
+module ShouldFail where
+
+too_much :: [Int] -> [(Int,Int)] -> [(Int,[Int])] -> Bool
+too_much ds ((k,m):q1) s0
+ = case (list1,list2) of
+ [] -> error "foo" -- too_much ds q2m s2m
+ where list1 = ds
+ list2 = ds
+ {-
+ list1 = [k' | k' <- ds, k == k']
+ list2 = [k' | k' <- ds, m == k']
+ s1 = aas s0 k
+ raM = []
+ raKM = listUnion (\a b -> a) [] []
+ s1k = s1
+ q1k = raM
+ s2k = s1
+ q2k = raM
+ s2m = s1
+ q2m = raM
+ s2km = foldr (flip aas) s1 raKM
+ q2km = raKM
+ -}
+
+listUnion :: (v -> v -> Bool) -> [v] -> [v] -> [v]
+listUnion _ _ _
+ = []
+
+aas :: (a,b) -> a -> (a,b)
+aas s _
+ = s
+
+