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  
started:

      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
      'A'
      *Text1>

Richard E. Adams
Email: r.adams@computer.org
   (or) radams@iglide.net


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

> Where do I find foldl' in GHC? It's mentioned on
> http://www.haskell.org/ghc/docs/latest/html/base/Data.List.html 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
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
>