From: simonpj Date: Tue, 28 Nov 2000 08:23:42 +0000 (+0000) Subject: [project @ 2000-11-28 08:23:42 by simonpj] X-Git-Tag: Approximately_9120_patches~3229 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f9fb93ae6521b48810c41cdfc671f5b797b9c5c0;p=ghc-hetmet.git [project @ 2000-11-28 08:23:42 by simonpj] Add functional dependency test --- diff --git a/ghc/tests/typecheck/should_compile/tc109.hs b/ghc/tests/typecheck/should_compile/tc109.hs new file mode 100644 index 0000000..656fe11 --- /dev/null +++ b/ghc/tests/typecheck/should_compile/tc109.hs @@ -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 index 0000000..e69de29