Simon Peyton-Jones wrote:
> |
> | The let-binding can be recursive. However, it is much more common for
> | the let-binding to be non-recursive, in which case the following law
> | holds: (let !p = rhs in body) is equivalent to (case rhs of !p -> body)
> |
> |
> | Shouldn't the bang be removed i
|
| The let-binding can be recursive. However, it is much more common for
| the let-binding to be non-recursive, in which case the following law
| holds: (let !p = rhs in body) is equivalent to (case rhs of !p -> body)
|
|
| Shouldn't the bang be removed in the final case pattern?
No. If p was
Brian Bloniarz wrote:
> I got confused by the GHC documentation recently, I was wondering how
> it could be improved. From:
> http://www.haskell.org/ghc/docs/latest/html/users_guide/bang-patterns.html
The let-binding can be recursive. However, it is much more common for
the let-binding to be non-
Brian Bloniarz wrote:
> I got confused by the GHC documentation recently, I was wondering how
> it could be improved. From:
> http://www.haskell.org/ghc/docs/latest/html/users_guide/bang-patterns.html
Seeing the rule
pat ::= !pat
you'll probably want to avoid patterns like: "!!pat", "! ! pat", o
good idea. done
| -Original Message-
| From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-users-
| boun...@haskell.org] On Behalf Of Brian Bloniarz
| Sent: 27 February 2009 03:56
| To: glasgow-haskell-users@haskell.org
| Subject: Suggestion for bang patterns
I got confused by the GHC documentation recently, I was wondering how
it could be improved. From:
http://www.haskell.org/ghc/docs/latest/html/users_guide/bang-patterns.html
> A bang only really has an effect if it precedes a variable or wild-card
> pattern:
> f3 !(x,y) = [x,y]
> f4 (x,y) = [x,y