summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2016-06-07 07:33:45 -0700
committerBartosz Nitka <niteria@gmail.com>2016-06-07 07:35:02 -0700
commit3b698e8938ccfa3e0dbf192abf4984d6937a196e (patch)
tree1b91fdf23c2f0afb57fe2c4b04d37d49944ab3a1 /compiler
parentad8e2032b86389814f4e1da64c84ab3d3c4c3802 (diff)
downloadhaskell-3b698e8938ccfa3e0dbf192abf4984d6937a196e.tar.gz
Document determinism in pprintClosureCommand
Like described in the comment, it's OK here. GHC Trac: #4012
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ghci/Debugger.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/ghci/Debugger.hs b/compiler/ghci/Debugger.hs
index acc900f688..64ac1540aa 100644
--- a/compiler/ghci/Debugger.hs
+++ b/compiler/ghci/Debugger.hs
@@ -26,6 +26,7 @@ import IfaceEnv( newInteractiveBinder )
import Name
import Var hiding ( varName )
import VarSet
+import UniqFM
import Type
import Kind
import GHC
@@ -99,7 +100,9 @@ pprintClosureCommand bindThings force str = do
my_tvs = termTyCoVars t
tvs = env_tvs `minusVarSet` my_tvs
tyvarOccName = nameOccName . tyVarName
- tidyEnv = (initTidyOccEnv (map tyvarOccName (varSetElems tvs))
+ tidyEnv = (initTidyOccEnv (map tyvarOccName (nonDetEltsUFM tvs))
+ -- It's OK to use nonDetEltsUFM here because initTidyOccEnv
+ -- forgets the ordering immediately by creating an env
, env_tvs `intersectVarSet` my_tvs)
return$ mapTermType (snd . tidyOpenType tidyEnv) t