| I think a more consistent behavior would be to not print the LHS at
| all. If you wanted to print the result of the computation you could
| just do:
|
| Prelude bar 5
|
| or, if you also wanted bound variables afterwards:
|
| Prelude (x, Just y) - bar 5
| Prelude (x, Just y)
I've
| | It seems that GHCi outputs the contents of the variable you've created
| | when there's only one of them.
|
| Indeed, that is documented behaviour (first bullet here:
|
http://www.haskell.org/ghc/docs/latest/html/users_guide/ch03s04.html#ghci-stmts
| )
| Perhaps it's confusing behaviour? If
On 9/20/07, Simon Peyton-Jones [EMAIL PROTECTED] wrote:
Hmm. Currently GHCi prints the value of the *variable* that you bind. For
example
Just x - foo 4
will print the value of x, *not* the value of (Just x). So if two variables
are bound, there'd be two values to print.
But
On 20/09/2007, Ryan Ingram [EMAIL PROTECTED] wrote:
I think a more consistent behavior would be to not print the LHS at
all. If you wanted to print the result of the computation you could
just do:
Prelude bar 5
or, if you also wanted bound variables afterwards:
Prelude (x, Just
| It seems that GHCi outputs the contents of the variable you've created
| when there's only one of them.
Indeed, that is documented behaviour (first bullet here:
http://www.haskell.org/ghc/docs/latest/html/users_guide/ch03s04.html#ghci-stmts
)
Perhaps it's confusing behaviour? If so do suggest