summaryrefslogtreecommitdiff
path: root/compiler/utils/GraphPpr.hs
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2016-07-01 04:58:39 -0700
committerBartosz Nitka <niteria@gmail.com>2016-07-01 05:44:27 -0700
commitcbfeff4b3caade8092c13f0f71371e6525ece9ac (patch)
tree300101b60cea80cfd2640e4db74efdaa489b7cd9 /compiler/utils/GraphPpr.hs
parent6377757918c1e7f63638d6f258cad8d5f02bb6a7 (diff)
downloadhaskell-cbfeff4b3caade8092c13f0f71371e6525ece9ac.tar.gz
Remove uniqSetToList
This documents nondeterminism in code generation and removes the nondeterministic ufmToList function. In the future someone will have to use nonDetEltsUFM (with proper explanation) or pprUFM.
Diffstat (limited to 'compiler/utils/GraphPpr.hs')
-rw-r--r--compiler/utils/GraphPpr.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/utils/GraphPpr.hs b/compiler/utils/GraphPpr.hs
index 6f7e9d5bb2..9c246893f7 100644
--- a/compiler/utils/GraphPpr.hs
+++ b/compiler/utils/GraphPpr.hs
@@ -86,7 +86,8 @@ dotNode colorMap triv node
excludes
= hcat $ punctuate space
$ map (\n -> text "-" <> ppr n)
- $ uniqSetToList $ nodeExclusions node
+ $ nonDetEltsUFM $ nodeExclusions node
+ -- See Note [Unique Determinism and code generation]
preferences
= hcat $ punctuate space
@@ -144,12 +145,14 @@ dotNodeEdges visited node
| otherwise
= let dconflicts
= map (dotEdgeConflict (nodeId node))
- $ uniqSetToList
+ $ nonDetEltsUFM
+ -- See Note [Unique Determinism and code generation]
$ minusUniqSet (nodeConflicts node) visited
dcoalesces
= map (dotEdgeCoalesce (nodeId node))
- $ uniqSetToList
+ $ nonDetEltsUFM
+ -- See Note [Unique Determinism and code generation]
$ minusUniqSet (nodeCoalesce node) visited
out = vcat dconflicts