Fix deserialization of docs (#15240)

Authored by sjakobi on Jun 8 2018, 8:30 AM.



We were using Map.fromDistinctAscList to deserialize a
(Map Name HsDocString). As the Names' Uniques had changed, we
ended up with an invalid map in which we couldn't lookup certain keys.

Switching to Map.fromList fixed the issue.

Added comments in several places.

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.
sjakobi created this revision.Jun 8 2018, 8:30 AM
sjakobi updated this revision to Diff 16797.Jun 8 2018, 4:59 PM
  • Testsuite: Accept corrected output for DocsInHiFile1
sjakobi updated this revision to Diff 16798.Jun 8 2018, 5:03 PM
  • Add reference to stableNameCmp
bgamari accepted this revision.Jun 9 2018, 11:37 AM

Good catch!

This revision is now accepted and ready to land.Jun 9 2018, 11:37 AM
bgamari added inline comments.Jun 9 2018, 11:38 AM

Thanks for the comment

Thanks Simon. Glad you found it!

This revision was automatically updated to reflect the committed changes.