clean up _Import

This commit is contained in:
darkf 2013-12-17 00:56:46 -08:00
parent 347fc15ba8
commit a85db6aca7
1 changed files with 1 additions and 3 deletions

View File

@ -206,9 +206,7 @@ _Import (StrV modname) = do
(_,[modenv]) <- get -- get the module env
let (_, [initialEnv]) = initialState
let modenv' = M.difference modenv initialEnv -- subtract prelude stuff
-- convert String to StrV in env keys
let modenv'' = map (\(k,v) -> (StrV k, v)) $ M.toAscList modenv'
let mod = DictV (M.fromAscList modenv'') -- package module into a dict
let mod = toDict modenv'
let env' = bind env modname mod -- bind it
put (h,env') -- restore state
return mod -- return module value