@@ -262,15 +262,12 @@ renameInModule env imports (Module ss coms mn decls exps) =
262 -- by qualified importing). If that's not the case, then we just need to
262 -- by qualified importing). If that's not the case, then we just need to
263 -- check it refers to a symbol in another module.
263 -- check it refers to a symbol in another module.
264 (Nothing, Just mn'') -> do
264 (Nothing, Just mn'') -> do
265− when (isExplicitQualModule mn'') . throwError . errorMessage $ unknown qname
266 modExports <- getExports mn''
265 modExports <- getExports mn''
267 maybe (throwError . errorMessage $ unknown qname) return (getE modExports name)
266 maybe (throwError . errorMessage $ unknown qname) return (getE modExports name)
268 -- If neither of the above cases are true then it's an undefined or
267 -- If neither of the above cases are true then it's an undefined or
269 -- unimported symbol.
268 -- unimported symbol.
270 _ -> throwError . errorMessage $ unknown qname
269 _ -> throwError . errorMessage $ unknown qname
272− isExplicitQualModule :: ModuleName -> Bool
273− isExplicitQualModule = flip elem $ mapMaybe (\(Qualified q _) -> q) (M.keys imps)
274 positioned err = case pos of
271 positioned err = case pos of
275 Nothing -> err
272 Nothing -> err
276 Just pos' -> rethrowWithPosition pos' err
273 Just pos' -> rethrowWithPosition pos' err