[Haskell-cafe] Names in a record changes read behavior?

Brandon Allbery allbery.b at gmail.com
Mon Jul 27 20:56:29 UTC 2015

On Mon, Jul 27, 2015 at 4:25 PM, Mike Meyer <mwm at mired.org> wrote:

> OK, why won't read accept the same syntax as the REPL? I can see wanting
> Read and Show to be inverses of each other, though I think it's a bit
> misguided. But if we're going to be that strict about them being inverses,
> shouldn't we also insist that the READ eval print loop only accept what
> read will accept?

Partly because ReadS isn't a very good parser, partly because of compliance

   - If the constructor is defined using record syntax, the derived Read will
   parse only the record-syntax form, and furthermore, the fields must be
   given in the same order as the original declaration.

brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150727/30b9c743/attachment.html>

More information about the Haskell-Cafe mailing list