At 12:49 29/07/04 -0700, John Meacham wrote:
out of curiosity, when is the = useful? I have never used it and I am
wondering if it could have been making my life easier. Perhaps I have
just not been trained to recognize when it should be used.
I don't know if this counts as useful, but I think it
It works really well stylistically inside the do notation:
x - f = xs
where you can view this as a process whereby each of the things in the
monadic container xs has f applied to it, and each result obtained
from that is then bound to x, so the data flows naturally.
- Cale Gibbard
On Mon, 02
John Meacham [EMAIL PROTECTED] writes:
Also, another small bug in the report:
in chapter 4,
the fixity table is refered to as table 4.1 in the text, but is labeled
'table 2'. It is also missing the (=) operator which is defined in the
prelude.
Thanks, noted in the errata. (However, the
I'm inclined to think John is right, thought the Report could be
clearer.
I'll open a GHC sourceforge bug for this.
Simon
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of John Peterson
| Sent: 29 July 2004 03:36
| To: [EMAIL PROTECTED]
| Subject:
John Peterson [EMAIL PROTECTED] writes:
The intention in the report was to match in the order listed in the
pattern - you need not consult the data declaration to understand the
ordering. I think the report is clear enough - it's just a bug in
ghc.
Just to be sure, I've added a
On Thu, Jul 29, 2004 at 09:06:05AM +0100, Simon Peyton-Jones wrote:
I'm inclined to think John is right, thought the Report could be
clearer.
Yeah, I agree that is the right behavior, the main reason for confusion
was the (para)phrase(d) 'just like normal matching except', as my first
thought
in section 3.17.2 case #6 of the haskell report
There is some confusing language in the report. Furthermore there is
either a bug in ghc, or hugs, depending on which way you interpret it.
it says:
# Matching against a constructor using labeled fields is the same as
# matching ordinary
The intention in the report was to match in the order listed in the
pattern - you need not consult the data declaration to understand the
ordering. I think the report is clear enough - it's just a bug in
ghc.
John
___
Haskell mailing list
[EMAIL