
Jon Fairbairn wrote:
Ian Lynagh
writes: http://hackage.haskell.org/trac/haskell-prime/wiki/StricterLabelledFieldSynt...
I approve of the principle -- the binding level is confusing, but I would far rather make a bigger change, so that rather than being confusable with the binding level of function application, it /has/ the binding level of function application. ie, instead of a{x=42} one would have to write {x=42}a,
we already know which record type it is, because record fields don't have disambiguation. If it's (data D = D { x, y :: Int }) then (x :: D -> Int) and we would have (({x=42}) :: D -> D). Or (data E n = E1 { ex, ey :: n } | E2 { ey :: n } | E3 {ex :: n}), (ey :: E n -> n), (({ex=42}) :: Num n => E n -> E n), but probably not ever allowing to change (E n1 -> E n2) even if it changes both ex and ey. I think it wouldn't be a terrible syntax, ({...}), kind of like infix operators can be made into functions like (+). If you wanted to make a proposal for such an extension. -Isaac