Bang patterns, ~ patterns, and lazy let
Simon Peyton-Jones
simonpj at microsoft.com
Wed Feb 8 06:02:40 EST 2006
| What have you got in mind? ANY tupling of bindings may change the SCC
| structure, and hence the results of type inference--I'm taking that as
| read. But that still leaves the question of whether the dynamic
| semantics of the program is changed. Let's assume for the time being
| that all bindings carry a type signature--then the SCC structure is
| irrelevant, isn't it? Or am I missing something here? I'm under the
| impression that the *dynamic* semantics of
|
| p1 = e1
| p2 = e2
|
| *would* be the same as (p1,p2) = (e1,e2) under my strict matching
| proposal. I don't see how the SCC structure can affect that.
Well I put the example that you sent me on the Wiki, right at the
bottom. Did I get it wrong?
let { (y:ys) = xs; (z:zs) = ys } in body
means
case xs of (y:ys) -> case ys of (z:zs) -> body
whereas
let (y:ys, z:zs) = (xs,ys) in body
means
case (fix (\~(y:ys, z:zs). (xs,ys))) of (y:ys, z:zs) -> body
which isn't the same.
Simon
More information about the Haskell-prime
mailing list