[Haskell-cafe] Making HList's field access operators (#) and (.!.)
left-associative?
Josh Triplett
josh at joshtriplett.org
Mon Nov 15 12:48:42 EST 2010
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.
Comments? Objections?
Thanks,
Josh Triplett
More information about the Haskell-Cafe
mailing list