Commit 3b698e89 authored by niteria's avatar niteria
Browse files

Document determinism in pprintClosureCommand

Like described in the comment, it's OK here.

GHC Trac: #4012
parent ad8e2032
......@@ -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
......
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