@@ -115,12 +115,11 @@ resolveExports env mn imps exps refs =
115115 -> (a -> String)
116116 -> M.Map (Qualified a) [(Qualified a, ModuleName)]
117117 -> m [Qualified a]
118− extract useQual name render = fmap (map (fst . head . snd)) . go useQual . M.toList
118+ extract useQual name render = fmap (map (fst . head . snd)) . go . M.toList
119119 where
120− go True = filterM (return . eqQual name . fst)
121− go False = filterM $ \(_, options) -> do
122− let isMatch = any (eqQual name . fst) options
123− when (length options > 1) $ checkImportConflicts render options
120+ go = filterM $ \(name', options) -> do
121+ let isMatch = if useQual then eqQual name name' else any (eqQual name . fst) options
122+ when (isMatch && length options > 1) $ checkImportConflicts render options
124123 return isMatch
125124
126125 -- Check whether a module name refers to a "pseudo module" that came into