FAQ: Why no interactive definitions?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

FAQ: Why no interactive definitions?

Gregory Woodhouse
In neither GHCi nor Hugs (so far as I know) is it possible to
interactively enter definitions. coming from Scheme, this was a bit of
a surprise, as I'm used to being able to enter, say

(define mysquare
    (lambda (x)
      (* x x)))

Is this just a matter of the feature not being implemented, or is there
a deeper reason for this?

===
Gregory Woodhouse  <[hidden email]>
"Interaction is the mind-body problem of computing."
--Philip L. Wadler
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: FAQ: Why no interactive definitions?

J. Garrett Morris
In ghci at least, you can enter definitions like that using let binding:

let mysquare x = x * x

 /g

On 12/22/05, Greg Woodhouse <[hidden email]> wrote:

> In neither GHCi nor Hugs (so far as I know) is it possible to
> interactively enter definitions. coming from Scheme, this was a bit of
> a surprise, as I'm used to being able to enter, say
>
> (define mysquare
>     (lambda (x)
>       (* x x)))
>
> Is this just a matter of the feature not being implemented, or is there
> a deeper reason for this?
>
> ===
> Gregory Woodhouse  <[hidden email]>
> "Interaction is the mind-body problem of computing."
> --Philip L. Wadler
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


--
We have lingered in the chambers of the sea
By sea-girls wreathed with seaweed red and brown
Till human voices wake us, and we drown.
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: FAQ: Why no interactive definitions?

Jared Updike
There was a good discussion about this on an earlier thread.

http://www.mail-archive.com/haskell-cafe@.../msg11372.html

In fact, this exact question sparked a number of long threads. :-)
(First steps in Haskell, Tutorial upload, Proposal for a First Tutorial.)

Cheers,
  Jared.
--
[hidden email]
http://www.updike.org/~jared/
reverse ")-:"
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe