On Dec 11, 2006, at 03:50 , Johannes Waldmann wrote:


let data Bar = ... in  ...


If you allow this you need to be very careful about type equality. When is Bar equal to Bar? If it's inside a recursive function, does each invocation get its own Bar? (In SML the answer is yes.) If you decide the answer is no, then is the beta rule still valid? E.g.,
  let x = (let Bar = ... in ...) in ... x ... x ...
expand x (which has always been semantically valid in Haskell)
  ... (let Bar = ... in ...) ... (let Bar = ... in ...) ...
Are those two Bar types equal?

In Cayenne I allowed all these things, but the price is that Cayenne has structural equality on types rather than nominal. Switching to nominal to structural would be a major change in Haskell.

So this change may look innocuous, but it has big ramifications.

        -- Lennart
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to