[project @ 2001-01-03 11:50:23 by simonpj]
authorsimonpj <unknown>
Wed, 3 Jan 2001 11:50:23 +0000 (11:50 +0000)
committersimonpj <unknown>
Wed, 3 Jan 2001 11:50:23 +0000 (11:50 +0000)
Add tc111

ghc/tests/typecheck/should_compile/tc111.hs [new file with mode: 0644]
ghc/tests/typecheck/should_compile/tc111.stderr [new file with mode: 0644]

diff --git a/ghc/tests/typecheck/should_compile/tc111.hs b/ghc/tests/typecheck/should_compile/tc111.hs
new file mode 100644 (file)
index 0000000..83fffd1
--- /dev/null
@@ -0,0 +1,20 @@
+{-# OPTIONS -fglasgow-exts #-}
+
+-- !!! 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
+ #-}
+
+
diff --git a/ghc/tests/typecheck/should_compile/tc111.stderr b/ghc/tests/typecheck/should_compile/tc111.stderr
new file mode 100644 (file)
index 0000000..e69de29