summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc111.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc111.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc111.hs19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc111.hs b/testsuite/tests/typecheck/should_compile/tc111.hs
new file mode 100644
index 0000000000..26eb942970
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc111.hs
@@ -0,0 +1,19 @@
+
+-- !!! Test monomorphism + RULES
+
+module ShouldCompile where
+
+-- This example crashed GHC 4.08.1.
+-- The reason was that foobar is monomorphic, so the RULE
+-- should not generalise over it.
+
+foo 1 = 2
+bar 0 = 1
+
+foobar = 2
+
+{-# RULES
+ "foo/bar" foo bar = foobar
+ #-}
+
+