Commit 46d2da00 authored by niteria's avatar niteria

Document putDictionary determinism

Summary: Like explained in the comment it's OK here.

Test Plan: ./validate

Reviewers: simonmar, austin, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2306

GHC Trac Issues: #4012
parent 31ba8d64
......@@ -650,7 +650,9 @@ type Dictionary = Array Int FastString -- The dictionary
putDictionary :: BinHandle -> Int -> UniqFM (Int,FastString) -> IO ()
putDictionary bh sz dict = do
put_ bh sz
mapM_ (putFS bh) (elems (array (0,sz-1) (eltsUFM dict)))
mapM_ (putFS bh) (elems (array (0,sz-1) (nonDetEltsUFM dict)))
-- It's OK to use nonDetEltsUFM here because the elements have indices
-- that array uses to create order
getDictionary :: BinHandle -> IO Dictionary
getDictionary bh = do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment