Refactoring for derived Read
authorsimonpj@microsoft.com <unknown>
Mon, 4 Sep 2006 13:22:12 +0000 (13:22 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 4 Sep 2006 13:22:12 +0000 (13:22 +0000)
commitddf73bf71eeaf80bf41ea4054d161dda839b2573
tree184310982018541c4d9c25c2ae886f67b3b6c7b8
parent56dfaffd65d96d27a74c906c2201fd392e06f154
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.
compiler/typecheck/TcGenDeriv.lhs