[project @ 2000-11-28 08:23:42 by simonpj]
authorsimonpj <unknown>
Tue, 28 Nov 2000 08:23:42 +0000 (08:23 +0000)
committersimonpj <unknown>
Tue, 28 Nov 2000 08:23:42 +0000 (08:23 +0000)
Add functional dependency test

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

diff --git a/ghc/tests/typecheck/should_compile/tc109.hs b/ghc/tests/typecheck/should_compile/tc109.hs
new file mode 100644 (file)
index 0000000..656fe11
--- /dev/null
@@ -0,0 +1,17 @@
+{-# OPTIONS -fglasgow-exts #-}
+
+module ShouldCompile
+
+-- This accepted by Hugs, but not by GHC 4.08.1
+-- Reported by Thomas Hallgren Nov 00
+
+class P a
+class R a b | b->a
+
+instance (P a,R a b) => P b
+
+{- GHC 4.08.1 doesn't seem to allow variables in the context that
+don't appear after the =>, but which are still ok since they are
+determined by the functional dependenices.  -}
+
+
diff --git a/ghc/tests/typecheck/should_compile/tc109.stderr b/ghc/tests/typecheck/should_compile/tc109.stderr
new file mode 100644 (file)
index 0000000..e69de29