Mark Carroll <[EMAIL PROTECTED]> writes:

> Do any of the decent Haskell compilers allow you to just type function
> definitions at an interpreter prompt and use them in subsequent
> interactions, as you'd expect from a Lisp environment? I'm fed up of
> editing a tiny file separately and typing :reload each time, etc.

GHCi (part of GHC >= 5.00) allows you to use let to bind expressions at
the prompt. E.g. you can do something like

  Prelude> let foo n = sum [1..n]
  Prelude> foo 1000
  500500

which I agree with you is a very handy thing to be able to do. :-)

Cheers,
Chris.

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to