[Haskell-cafe] Re: Derived Read instance for types with infix constructors (ghc 6.4.1)

Misha Aizatulin avatar at hot.ee
Sat Aug 26 15:55:37 EDT 2006

Jason Dagit wrote:

> Before you get too caught up in deriving Read, remember that in
> Haskell it's very easy to create your own custom parser.  Assuming you
> have previous experience with happy or parsec you could probably have
> already created a custom parser with time you've spent debugging this
> automatic Read instance flaw.  And if you had your own parser couldn't
> you define read to use that parser?  Just a thought...

  You are right, I will probably end up rolling my own instances with
Template Haskell or DrIFT (there are a lot of types where I need these
instances). I just wanted to make sure that I'm not missing something
stupid and that there is no easier way to do that.

  By the way, if someone already has TH code for deriving Read
instances, sharing would be greatly appreciated :)


More information about the Haskell-Cafe mailing list