summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc047.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc047.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc047.hs23
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc047.hs b/testsuite/tests/typecheck/should_compile/tc047.hs
new file mode 100644
index 0000000000..b8c197d185
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc047.hs
@@ -0,0 +1,23 @@
+module ShouldSucceed where
+
+type OL a = [a]
+
+-- produces the interface:
+-- data OL a = MkOL [a] deriving ()
+-- ranOAL :: (OL (a, a)) -> [a]
+-- this interface was produced by BOTH hbc and nhc
+
+-- the following bogus type sig. was accepted by BOTH hbc and nhc
+f x = ranOAL where -- ranOAL :: OL (a,v) -> [a]
+--ranOAL :: OL (a,v) -> [v], the right sig.
+ ranOAL ( xs) = mp sd xs
+
+
+mp f [] = []
+mp f (x:xs) = (f x) : mp f xs
+
+sd (f,s) = s
+
+
+
+