[Haskell-cafe] Making HList's field access operators (#) and (.!.) left-associative?

Henning Thielemann schlepptop at henning-thielemann.de
Sun Nov 21 08:42:28 EST 2010


Josh Triplett schrieb:
> Hello,
> 
> In experimenting with HList's very impressive extensible records, I
> discovered that the field access operators (#) and (.!.) have right
> associativity; this means I can't write (r # f1 # f2) to access field f2
> of the record stored in field f1 of r.  If (#) and (.!) had
> left-associativity instead, then I could write such nested record
> operations.  As far as I can tell, the right-associative binding would
> only make sense if attempting to store field labels inside a record,
> which seems much more unlikely.
> 
> I wrote to the author of HList about this issue, and he agreed that this
> sounded reasonable, but he wanted me to confirm via haskell-cafe that
> nobody had code which relied on the existing behavior.

Reverse dependencies on Hackage may spot packages that use the '#' operator.


More information about the Haskell-Cafe mailing list