@@ -207,6 +207,12 @@ instance Enum Int where
207207 go [] = []
208208 go (x :: xs) = n + (cast x * inc) :: go xs
209209
210+instance Enum Char where
211+ toNat c = toNat (ord c)
212+ fromNat n = chr (fromNat n)
213+
214+ pred c = fromNat (pred (toNat c))
215+
210216syntax "[" [start] ".." [end] "]"
211217 = enumFromTo start end
212218syntax "[" [start] "," [next] ".." [end] "]"