Document how GHC disambiguates between multiple COMPLETE sets

Authored by RyanGlScott on Sep 21 2017, 8:49 AM.



Up until now, the knowledge of how GHC chooses which
COMPLETE set to use in the presence of multiple applicable
COMPLETE sets for a single data type constructor was only
documented in the GHC wiki. But this really should be advertised to
anyone who uses COMPLETE pragmas heavily, so per SPJ's advice in, this adds
this wisdom to the GHC users' guide.

Test Plan

Read it

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
RyanGlScott created this revision.Sep 21 2017, 8:49 AM
RyanGlScott edited the summary of this revision. (Show Details)Sep 21 2017, 9:01 AM
mpickering added inline comments.

This it the wrong way around I think. The Provenance is compared using derived equality and the lesser of the two is preferred. See Check.getResult

RyanGlScott marked an inline comment as done.
  • Fix point (4)

Huh, you are right! I must say that this is somewhat surprising to me, since I would expect it to be the other way around (a view I expressed in But that's a battle for another time and place, so I'll update this Diff to accurately reflect the current behavior.

This revision was automatically updated to reflect the committed changes.