@@ -139,4 +139,5 @@ typeCheckAll (ImportDeclaration modulePath idents : rest) = do
139 forM_ idents $ \ident ->
139 forM_ idents $ \ident ->
140 case M.lookup (modulePath, ident) (names env) of
140 case M.lookup (modulePath, ident) (names env) of
141 Nothing -> throwError $ show modulePath ++ "." ++ show ident ++ " is undefined"
141 Nothing -> throwError $ show modulePath ++ "." ++ show ident ++ " is undefined"
142+ Just (pt, _) -> getEnv >>= \env' ->
142− Just (pt, _) -> putEnv (env { names = M.insert (omp, ident) (pt, Alias modulePath ident) (names env) })
143+ putEnv (env' { names = M.insert (omp, ident) (pt, Alias modulePath ident) (names env') })