[Haskell-cafe] generalize RecordPuns and RecordWildCards to work with qualified names?

Evan Laforge qdunkan at gmail.com
Fri Jul 17 18:56:41 EDT 2009

Record punning is not all that useful with qualified module names.  If
I write '(M.Record { M.rec_x })' it says " Qualified variable in
pattern" and if I write '(M.Record { rec_x })' it says 'Not in scope:
`rec_x''.  Could it be this extension be further extended slightly so
that 'f (M.Record { M.rec_x })' will desugar to 'f (M.Record { M.rec_x
= rec_x })'?

Similarly, RecordWildCards could support this too.

It seems simple and useful to me... am I missing anything fatally
problematic about this?  Would anyone else use it?

More information about the Haskell-Cafe mailing list