[project @ 2001-08-22 12:24:41 by simonmar]
[ghc-hetmet.git] / ghc / tests / typecheck / should_compile / tc125.hs
diff --git a/ghc/tests/typecheck/should_compile/tc125.hs b/ghc/tests/typecheck/should_compile/tc125.hs
deleted file mode 100644 (file)
index 89bb66a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-{-# OPTIONS -fglasgow-exts #-}
-
--- !!! Functional dependency test. Hugs [Apr 2001] fails to typecheck this
--- We should infer this type for foo
---     foo :: Q (S (S Z)) (S Z)
-
-module ShouldCompile where
-
-data Z = Z
-data S a = S a
-
-class Add a b c | a b -> c where add :: a -> b -> c
-
-instance Add Z a a
-instance Add a b c => Add (S a) b (S c)
-
-class Mul a b c | a b -> c where mul :: a -> b -> c
-
-instance Mul Z a Z
-instance (Mul a b c, Add b c d) => Mul (S a) b d
-
-data Q a b = Q a b
-
--- Problem here.  This is the addition of rational
--- numbers: (a/b) + (c/d) = (ad+bc)/bd
-
-instance (Mul a d ad,
-          Mul b c bc,
-          Mul b d bd,
-          Add ad bc ad_bc) => Add (Q a b) (Q c d) (Q ad_bc bd)
-
-z = Z
-sz = S Z
-ssz = S (S Z)
-
-foo = add (Q sz sz) (Q sz sz)