[Haskell-cafe] Silly question

Bayley, Alistair Alistair_Bayley at ldn.invesco.com
Mon Oct 31 05:04:43 EST 2005

> From: Joel Reymont [mailto:joelr1 at gmail.com] 
> I didn't know about "it" in ghci, thanks. Are there multiple levels  
> of it?
> I wanted z "a" :: Maybe Int which I understand now.
>      Thanks, Joel

What do you mean by multiple levels? "It" just stores the most recent
expression/value. If you type "print it" then the result of the print
becomes the most recent value e.g.

*Foo> "boo"
*Foo> :t it
it :: [Char]
*Foo> print it
*Foo> :t it
it :: ()
*Foo> print it

The docs probably explain it better:

-------------- next part --------------
Confidentiality Note: The information contained in this message,
and any attachments, may contain confidential and/or privileged
material. It is intended solely for the person(s) or entity to
which it is addressed. Any review, retransmission, dissemination,
or taking of any action in reliance upon this information by
persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the
sender and delete the material from any computer.

More information about the Haskell-Cafe mailing list