summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc189.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc189.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc189.hs26
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc189.hs b/testsuite/tests/typecheck/should_compile/tc189.hs
new file mode 100644
index 0000000000..3f9a2879b0
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc189.hs
@@ -0,0 +1,26 @@
+{-# LANGUAGE NoMonoPatBinds #-}
+ -- Disable experimetal monomorphic pattern bindings
+
+-- Nasty test for type signatures
+-- In both groups of declarations below, the type variables 'a' and 'b'
+-- end up being unified together.
+
+module ShouldCompile where
+
+-------------
+ x :: a
+ x = z `asTypeOf` y
+
+ y :: b
+ y = z
+
+ z = x
+-------------
+ p :: [a]
+ q :: b
+ (p,q,r) = ([q,r], r, head p)
+
+-------------
+ t :: a
+ u :: b
+ (t,u,v) = (v,v,t)