summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/ghci043.script
blob: 87f9877b9adcaacda6063231fe98e85682f3c9d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
--Testing custom classes and instances as well as data type shadowing
class C a
instance C Int

data Foo = Bar | Baz
class MyEq a where ; myeq :: a -> a -> Bool ; a `myeq` b = True
instance MyEq Foo
Bar `myeq` Baz
data Foo = Bar | Baz
instance MyEq Foo where ; a `myeq` b = False
Baz `myeq` Bar