@@ -203,6 +203,12 @@ instance Enum Int where
203203 go [] = []
204204 go (x :: xs) = n + (cast x * inc) :: go xs
205205
206+instance Enum Char where
207+ toNat c = toNat (ord c)
208+ fromNat n = chr (fromNat n)
209+
210+ pred c = fromNat (pred (toNat c))
211+
206212syntax "[" [start] ".." [end] "]"
207213 = enumFromTo start end
208214syntax "[" [start] "," [next] ".." [end] "]"