patch applied (ghc-6.6/ghc): Refactoring for derived Read
Ian Lynagh
igloo at earth.li
Tue Sep 5 15:21:10 EDT 2006
Mon Sep 4 06:22:12 PDT 2006 simonpj at microsoft.com
* Refactoring for derived Read
There are no functional changes in this commit. But the code for
derived Read is refactored to make it tidier --- and also to make
it very easy if we want derived Read to parse the prefix form of
infix ocnstructors.
For example,
data T = Int `T1` Int
According to the H98 report, the derived Read instance will parse
infix uses of T1, but not prefix uses (T1 4 3). It's arguable that it
should parse both -- and easy to implement, but it would cause a little bit
of code bloat.
Similarly records.
Anyway this commit doesn't implement the change; just makes it easy
to do so.
M ./compiler/typecheck/TcGenDeriv.lhs -19 +29
More information about the Cvs-ghc
mailing list