summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2016-06-03 09:11:50 -0700
committerBartosz Nitka <niteria@gmail.com>2016-06-03 09:11:59 -0700
commit2046297ec03bdcd4901f69cd6ae03e84dc974683 (patch)
tree1ad4869dab3fb8bc50330b83e3d7b1bd82076757
parent9cc6fac5c096eb4120173495faf2c948f7a28487 (diff)
downloadhaskell-2046297ec03bdcd4901f69cd6ae03e84dc974683.tar.gz
Document putSymbolTable determinism
Like explained in the comment it's OK here. Test Plan: ./validate Reviewers: bgamari, austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2298 GHC Trac Issues: #4012
-rw-r--r--compiler/iface/BinIface.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs
index 0b70e8c725..42907049f3 100644
--- a/compiler/iface/BinIface.hs
+++ b/compiler/iface/BinIface.hs
@@ -254,7 +254,9 @@ binaryInterfaceMagic dflags
putSymbolTable :: BinHandle -> Int -> UniqFM (Int,Name) -> IO ()
putSymbolTable bh next_off symtab = do
put_ bh next_off
- let names = elems (array (0,next_off-1) (eltsUFM symtab))
+ let names = elems (array (0,next_off-1) (nonDetEltsUFM symtab))
+ -- It's OK to use nonDetEltsUFM here because the elements have
+ -- indices that array uses to create order
mapM_ (\n -> serialiseName bh n symtab) names
getSymbolTable :: BinHandle -> NameCacheUpdater -> IO SymbolTable