[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / tests / deriving / drv003.hs
diff --git a/ghc/compiler/tests/deriving/drv003.hs b/ghc/compiler/tests/deriving/drv003.hs
new file mode 100644 (file)
index 0000000..3da22bd
--- /dev/null
@@ -0,0 +1,15 @@
+--!!! This is the example given in TcDeriv
+--
+data T a b
+  = C1 (Foo a) (Bar b) 
+  | C2 Int (T b a) 
+  | C3 (T a a)
+  deriving Eq
+
+data Foo a = MkFoo Double a deriving ()
+instance (Eq a) => Eq (Foo a)
+
+data Bar a = MkBar Int Int deriving ()
+instance (Ping b) => Eq (Bar b)
+
+class Ping a