foldl' ?

RichardE.Adams RichardE.Adams
Sat, 16 Nov 2002 17:58:31 -0800

I don't know if this will help, but I am using GHC Interactive, version 
5.03, for Haskell 98, and I wanted to use the 'toUpper' function.  
'toUpper' is defined in Data.Char, but is not loaded when ghci is  

      Prelude> :info toUpper

      Variable not in scope: `toUpper'

To bring 'toUpper' into scope, I put "import Char" in my program (a very 
simple program named "Text1.hs"):

      module Text1 where
      import Char

      f = Char.toUpper 'a'

After starting ghci from the operating system shell, I enter ":load 
<program name>" at the ghci prompt, then evaluate the function 'f':

      [localhost:~/Documents/myHaskellProgs] richard% ghci
      Loading package base ... linking ... done.
      Loading package haskell98 ... linking ... done.
      Prelude> :load Text1.hs
      Compiling Text1            ( Text1.hs, interpreted )
      Ok, modules loaded: Text1.
      *Text1> f

Richard E. Adams

On Saturday, November 16, 2002, at 06:55 AM, Mark Carroll wrote:

> Where do I find foldl' in GHC? It's mentioned on
> but
> importing List and using "-package data" don't seem to make it appear. 
> I'm
> using GHC 5.02.2. I must be making some simple mistake.
> -- Mark
> _______________________________________________
> Glasgow-haskell-users mailing list