On the record pattern synonyms patch

Edward Z. Yang ezyang at mit.edu
Fri Nov 13 00:51:47 UTC 2015

Hello Matthew,

I have a question about the record pattern synonyms patch
which you landed in the last month (2a74a64e8329ab9e0c74bec47198cb492d25affb).

In IfaceSyn, you made the following change:

     data IfaceIdDetails
       = IfVanillaId
    -  | IfRecSelId IfaceTyCon Bool
    +  | IfRecSelId (Either IfaceTyCon IfaceDecl) Bool
       | IfDFunId

I don't understand why IfRecSelIds can now store IfaceDecls.  Why aren't
these declarations stored at the *top level* list of declarations in an
interface file?  If they are, you shouldn't be storing the entire
IfaceDecl structure when serializing to disk.  If they are not, I
am afraid I don't understand this code.

I also noticed that the commit message is quite long, and many of the
comments I see are not replicated anywhere in the source.  Is there any
reason why they should not be written down as proper notes, with
cross-references from the appropriate code?


More information about the ghc-devs mailing list