blob: 1d6de577acfe533faed3c72bd3f920676b2d0cf1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
-- Run with -funbox-strict-fields
-- Bug in GHC 5.04.3
module Main where
data Foo = Foo Int String
data Bar = Bar Int Foo
instance Ord Bar where
compare (Bar i _) (Bar j _) = compare i j
instance Eq Bar where
(Bar i _) == (Bar j _) = i == j
data Zot = Zot !Bar !String deriving (Ord,Eq)
main = putStrLn "Success"
|