@@ -14,6 +14,22 @@
1414test : Monoid a => a -> a
1515test x = x <+> x <+> neutral
1616
17−main : IO ()
18−main = do printLn (test @{PlusNatMonoid} 6)
19− printLn (test @{MultNatMonoid} 6)
17+[CmpLess] Ord Int where
18+ compare x y = if (x == y) then EQ else
19+ if (boolOp prim__sltInt x y) then GT else LT
20+
21+foo : Int -> Int -> Bool
22+foo x y = x < y
23+
24+using implementation CmpLess
25+ foo' : Int -> Int -> Bool
26+ foo' x y = x < y
27+
28+using implementation PlusNatMonoid
29+ main : IO ()
30+ main = do printLn (test (the Nat 6))
31+ printLn (test @{MultNatMonoid} 6)
32+
33+ printLn (foo 3 4)
34+ printLn (foo' 3 4)
35+