On the record pattern synonyms patch

Matthew Pickering matthewtpickering at gmail.com
Fri Nov 13 09:39:10 UTC 2015

Hi Edward,

I don't understand what should and shouldn't be in interface files. I
tried to make the least changes to get everything still to work. The
change was because of the corresponding change to the datatype.


If you have a concrete suggestion about how this should be changed
then please say and I will do it.

With regards to the comments, it seems like the only relevant one for
the long run is to do with mixing pattern synonym and record field
selectors. This is also included in the source. Maybe it would be good
to put the one about duplicate record fields somewhere as well, do you
have a suggestion as to where might be appropriate?


On Fri, Nov 13, 2015 at 12:51 AM, Edward Z. Yang <ezyang at mit.edu> wrote:
> 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?
> Thanks,
> Edward

More information about the ghc-devs mailing list