summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc040.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc040.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc040.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc040.hs b/testsuite/tests/typecheck/should_compile/tc040.hs
new file mode 100644
index 0000000000..4897a2b9b3
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc040.hs
@@ -0,0 +1,9 @@
+module ShouldSucceed where
+
+-- !!! tests the deduction of contexts.
+
+f :: (Eq a) => a -> [a]
+
+f x = g x
+ where
+ g y = if (y == x) then [] else [y]