Fix deserialization of docs (#15240)
authorSimon Jakobi <simon.jakobi@gmail.com>
Thu, 14 Jun 2018 13:18:35 +0000 (09:18 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 14 Jun 2018 14:03:28 +0000 (10:03 -0400)
commit69b50efe08bdd09de0b4f0208fe52804ad938853
tree948e388faab4d574ca8b0b4be91ffda5b7312b4c
parent87d691c025fa7cff44717d9a860d40bae2dc4cc9
Fix deserialization of docs (#15240)

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.

Reviewers: alexbiehl, hvr, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #15240

Differential Revision: https://phabricator.haskell.org/D4816
compiler/basicTypes/Name.hs
compiler/hsSyn/HsDoc.hs
testsuite/tests/showIface/DocsInHiFile1.stdout