diff options
author | Bartosz Nitka <niteria@gmail.com> | 2016-06-07 07:33:45 -0700 |
---|---|---|
committer | Bartosz Nitka <niteria@gmail.com> | 2016-06-07 07:35:02 -0700 |
commit | 3b698e8938ccfa3e0dbf192abf4984d6937a196e (patch) | |
tree | 1b91fdf23c2f0afb57fe2c4b04d37d49944ab3a1 /compiler | |
parent | ad8e2032b86389814f4e1da64c84ab3d3c4c3802 (diff) | |
download | haskell-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.hs | 5 |
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 |