aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/InterfaceFile.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2009-09-11 11:22:29 +0000
committerDavid Waern <david.waern@gmail.com>2009-09-11 11:22:29 +0000
commit96549f4c87d3b4662f8caa20035ab4fb30f65ef3 (patch)
treecdd9611ce53f76784fab46f1f79aee48af814532 /src/Haddock/InterfaceFile.hs
parenta88b0de4a3cb3d183d29af8eefe15b7bbb617125 (diff)
Use Map.fromList/toList intead of fromAscList/toAscList when serializing Maps
This fixes the missing docs problem. The Eq and Ord instances for Name uses the unique number in Name. This number is created at deserialization time by GHC's magic Binary instance for Name, and it is random. Thus, fromAscList can't be used at deserialization time, even though toAscList was used at serialization time.
Diffstat (limited to 'src/Haddock/InterfaceFile.hs')
-rw-r--r--src/Haddock/InterfaceFile.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs
index d2416afe..fbe3a712 100644
--- a/src/Haddock/InterfaceFile.hs
+++ b/src/Haddock/InterfaceFile.hs
@@ -308,8 +308,8 @@ serialiseName bh name _ = do
-- Hmm, why didn't we dare to make this instance already? It makes things
-- much easier.
instance (Ord k, Binary k, Binary v) => Binary (Map k v) where
- put_ bh m = put_ bh (Map.toAscList m)
- get bh = fmap (Map.fromAscList) (get bh)
+ put_ bh m = put_ bh (Map.toList m)
+ get bh = fmap (Map.fromList) (get bh)
instance Binary InterfaceFile where