[Haskell-cafe] Derived Read for records

Conal Elliott conal at conal.net
Wed Jun 13 02:58:21 CEST 2012


Someone at work just asked me about the inflexibility of the derived Read
instances for records -- specifically that they require fields to be given
in the same order as in the type definition and that fields cannot be
omitted. I hadn't been aware of these restrictions.

A few questions:

* Are there known work-arounds?
* Is it particularly difficult to synthesize more flexible Read instances?
* Do people just not mind the restrictions?

Thanks,

-- Conal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120612/979b95d3/attachment.htm>


More information about the Haskell-Cafe mailing list