@@ -0,0 +1,62 @@
1+module Main
2+
3+test : DecEq a => a -> a -> Bool
4+test i1 i2 with (decEq i1 i2)
5+ test i1 i1 | Yes refl = True
6+ test i1 i2 | No p = False
7+
8+main : IO ()
9+main = do
10+-- Primitives
11+ putStrLn . show $ test (the Int 3) (the Int 3)
12+ putStrLn . show $ test (the Integer 3) (the Integer 4)
13+ putStrLn . show $ test "hello" "hello"
14+ putStrLn . show $ test "hello" "world"
15+ putStrLn . show $ test (the Char '\0') (the Char '\0')
16+ putStrLn . show $ test (the Char '\1') (the Char '\2')
17+-- Non-primitives
18+ -- Vect
19+ putStrLn . show $
20+ test (the (Vect _ Int) [1,2,3]) (the (Vect _ Int) [1,2,3])
21+ putStrLn . show $
22+ test (the (Vect _ Int) [1,2,3]) (the (Vect _ Int) [1,2,4])
23+ -- List
24+ putStrLn . show $
25+ test (the (List Int) [1,2,3]) (the (List Int) [1,2,3])
26+ putStrLn . show $
27+ test (the (List Int) [1,2,3]) (the (List Int) [1,2])
28+ putStrLn . show $
29+ test (the (List Int) [1,2,3]) (the (List Int) [1,2,4])
30+ -- Tuple
31+ putStrLn . show $
32+ test (the (Int, Int) (1, 1)) (the (Int, Int) (1, 1))
33+ putStrLn . show $
34+ test (the (Int, Int) (1, 2)) (the (Int, Int) (1, 1))
35+ -- Unit
36+ putStrLn . show $ test () ()
37+ -- Booleans
38+ putStrLn . show $ test True True
39+ putStrLn . show $ test True False
40+ -- Float
41+ putStrLn . show $ test 1.0 1.0
42+ putStrLn . show $ test 1.0 2.0
43+ -- Maybe
44+ putStrLn . show $ test (Just "hello") (Just "hello")
45+ putStrLn . show $ test (Just "hello") (Just "world")
46+ putStrLn . show $ test (Just "hello") Nothing
47+ -- Either
48+ putStrLn . show $ test (the (Either String Bool) (Left "hello"))
49+ (the (Either String Bool) (Left "hello"))
50+ putStrLn . show $ test (the (Either String Bool) (Left "hello"))
51+ (the (Either String Bool) (Left "world"))
52+ putStrLn . show $ test (Left "hello") (Right "world")
53+ putStrLn . show $ test (Left "hello") (Right False)
54+ -- Fin
55+ putStrLn . show $ test (the (Fin (S (S (S (Z))))) (fS (fS (fZ))))
56+ (the (Fin (S (S (S (Z))))) (fS (fS (fZ))))
57+ putStrLn . show $ test (the (Fin (S (S (S (Z))))) (fS (fS (fZ))))
58+ (the (Fin (S (S (S (Z))))) (fS (fZ)))
59+ -- Nat
60+ putStrLn . show $ test (S (S (S Z))) (S (S (S Z)))
61+ putStrLn . show $ test (S (S (S Z))) (S (S Z))
62+