Fix deserialization of docs (#15240)
ClosedPublic

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

Details

Summary

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

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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
compiler/basicTypes/Name.hs
468

Thanks for the comment

Thanks Simon. Glad you found it!

This revision was automatically updated to reflect the committed changes.