summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_compile/tc051.hs
blob: 7f14282fb8d53c9dfcff5e18f7b8a5407435027d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module ShouldSucceed where

class Eq' a where
 doubleeq :: a -> a -> Bool

class (Eq' a) => Ord' a where
 lt :: a -> a -> Bool

instance Eq' Int where
 doubleeq x y = True

instance (Eq' a) => Eq' [a] where
 doubleeq x y = True

instance Ord' Int where
 lt x y = True

{-
class (Ord a) => Ix a where
 range :: (a,a) -> [a]

instance Ix Int where
 range (x,y) = [x,y]
-}