summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc133.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc133.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc133.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc133.hs b/testsuite/tests/typecheck/should_compile/tc133.hs
new file mode 100644
index 0000000000..8b378a4f00
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc133.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE ExistentialQuantification, ScopedTypeVariables #-}
+
+-- !!! Existentials
+
+-- This one killed GHC 5.00.1:
+-- Inferred type is less polymorphic than expected
+-- Quantified type variable `a' is unified with another quantified type variable `a'
+-- When checking a pattern that binds f :: a -> Int
+-- In the definition of `f': f (T (x :: a) f) = T (undefined :: a) f
+
+module Test where
+
+data T = forall a. T a (a->Int)
+
+f :: T -> T
+f (T (x::a) f) = T (undefined::a) f