diff options
Diffstat (limited to 'ghc/compiler/tests/deriving/drv003.hs')
-rw-r--r-- | ghc/compiler/tests/deriving/drv003.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ghc/compiler/tests/deriving/drv003.hs b/ghc/compiler/tests/deriving/drv003.hs new file mode 100644 index 0000000000..3da22bd9d0 --- /dev/null +++ b/ghc/compiler/tests/deriving/drv003.hs @@ -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 |