
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 :) Cheers, Misha