ushalow
[clean-tests.git] / fixwidthstr / test.icl
1 module test
2
3 import StdEnv
4
5 :: Z = Z
6 :: S a = S a
7
8 class peano a :: a
9 instance peano Z where peano = Z
10 instance peano (S a) | peano a where peano = S peano
11
12 class peanoplus a b ~c
13 where
14 peanoplus :: a b -> c
15
16 instance peanoplus a Z a | peano a
17 where
18 peanoplus a b = a
19
20 :: FString n = FS [Char]
21
22 fsempty :: FString Z
23 fsempty = FS []
24
25 fappend :: (FString a) Char -> FString (S a) | peano a
26 fappend (FS l) c = FS (l ++ [c])
27
28 Start = peanoplus Z Z