
Hi, My Prelude docs must be out of date because chr and ord don't seem to be there. How do I access these functions? Michael =============== [michael@localhost ~]$ ghci GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. Prelude> chr 65 <interactive>:1:0: Not in scope: `chr' Prelude> ord 'A' <interactive>:1:0: Not in scope: `ord' Prelude>

Michael, those functions are not in the Prelude, they're in Data.Char.
On Tue, Apr 28, 2009 at 8:08 PM, michael rice
Hi,
My Prelude docs must be out of date because chr and ord don't seem to be there. How do I access these functions?
Michael
===============
[michael@localhost ~]$ ghci GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. Prelude> chr 65
<interactive>:1:0: Not in scope: `chr' Prelude> ord 'A'
<interactive>:1:0: Not in scope: `ord' Prelude>
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Tim Wawrzynczak
On Tue, Apr 28, 2009 at 8:08 PM, michael rice <[1]nowgate@yahoo.com> wrote:
Hi,
My Prelude docs must be out of date because chr and ord don't seem to be there. How do I access these functions?
Michael, those functions are not in the Prelude, they're in Data.Char.
But they're not really necessary anyway: Prelude> fromEnum 'A' 65 Prelude> toEnum 42::Char '*' -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html (updated 2009-01-31)
participants (3)
-
Jon Fairbairn
-
michael rice
-
Tim Wawrzynczak