blob: 0254ee41c40fbfc5fa6e179b1d1cac3a8d36b205 (
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
|
foreign import "ilxHello" unsafe ilxHello :: IO ()
foreign import "ilxBad" unsafe ilxBad :: IO ()
class Eqq a where
eqq :: a -> Bool
eqq2 :: a -> Bool
-- x /= y = not (x == y)
-- x == y = not (x /= y)
-- x /= y = True
eqq x = False
eqq2 x = True
data Unit = Unit
instance Eqq Unit
-- where
-- eqq Unit = True
-- eqq2 Unit = False
choose x = if eqq x then ilxHello else if eqq2 x then ilxBad else ilxBad
main = choose Unit
|