@@ -207,6 +207,12 @@ instance Enum Int where
207 go [] = []
207 go [] = []
208 go (x :: xs) = n + (cast x * inc) :: go xs
208 go (x :: xs) = n + (cast x * inc) :: go xs
210+instance Enum Char where
211+ toNat c = toNat (ord c)
212+ fromNat n = chr (fromNat n)
214+ pred c = fromNat (pred (toNat c))
210syntax "[" [start] ".." [end] "]"
216syntax "[" [start] ".." [end] "]"
211 = enumFromTo start end
217 = enumFromTo start end
212syntax "[" [start] "," [next] ".." [end] "]"
218syntax "[" [start] "," [next] ".." [end] "]"