Bang patterns, ~ patterns, and lazy let

John Hughes rjmh at cs.chalmers.se
Wed Feb 8 05:56:08 EST 2006


Simon Peyton-Jones wrote:

>I've updated the Wiki to add your strict proposal, but rather briefly.
>If you want to add stuff, send it to me and I'll add it.
>
>Meanwhile:
>
>| And as a consequence, it is no longer possible to transform a pair of
>| bindings into a binding of a pair. In Haskell 98,
>| 
>|     p1 = e1
>|     p2 = e2
>| 
>| is always equivalent to
>| 
>|     (~p1, ~p2) = (e1,e2)
>
>In your strict proposal, I'm sure you hope that the above pair would be
>equivalent to
>	(p1,p2) = (e1,e2)
>which would be even nicer.
>
>But sadly I don't think it is, because that'd change the strongly
>connected component structure.  Somehow that smells wrong.
>
>Simon
>  
>
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.

John



More information about the Haskell-prime mailing list