chr and ord not in standard prelude
Stefan O'Rear
stefanor at cox.net
Fri Mar 9 18:17:59 EST 2007
On Fri, Mar 09, 2007 at 03:40:08PM -0500, Colletta, Edward wrote:
> When I try to use functions chr or ord, I get a not in scope error.
> If I ":browse Prelude" I do not see these functions. Is there another
> module I should load?
Don't use chr and ord - they aren't polymorphic, they restrict your
code to work only on Chars. Use fromEnum and toEnum (which are in the
Prelude) instead.
Stefan
More information about the Glasgow-haskell-users
mailing list