@@ -421,6 +421,7 @@ resolveImport currentModule importModule exps imps impQual =
421421 checkTypeRef (TypeRef _ Nothing) acc (TypeRef _ (Just _)) = acc
422422 checkTypeRef (TypeRef name (Just dctor)) _ (TypeRef name' (Just dctor')) = name == name' && dctor == dctor'
423423 checkTypeRef (TypeRef name _) _ (TypeRef name' Nothing) = name == name'
424+ checkTypeRef (PositionedDeclarationRef _ r) acc hiddenRef = checkTypeRef r acc hiddenRef
424425 checkTypeRef _ acc _ = acc
425426 in foldl (checkTypeRef ref) False hidden
426427 isHidden hidden ref = ref `elem` hidden
@@ -449,7 +450,7 @@ resolveImport currentModule importModule exps imps impQual =
449450 return $ imp { importedTypeClasses = typeClasses' }
450451 importExplicit _ _ = error "Invalid argument to importExplicit"
451452
452− -- Check if DeclarationRef points to a existent symbol
453+ -- Check if DeclarationRef points to an existent symbol
453454 checkedRefs :: [DeclarationRef] -> Either ErrorStack [DeclarationRef]
454455 checkedRefs refs = mapM check refs
455456 where
@@ -478,7 +479,7 @@ resolveImport currentModule importModule exps imps impQual =
478479 Just x@(Qualified (Just mn) _) -> throwError $ mkErrorStack err Nothing
479480 where
480481 err = if mn == currentModule || importModule == currentModule
481− then "Definition '" ++ show name ++ "' conflicts with import '" ++ show (Qualified (Just importModule) name) ++ "'"
482+ then "Definition '" ++ show name ++ "' conflicts with import '" ++ show (Qualified (Just mn) name) ++ "'"
482483 else "Conflicting imports for '" ++ show name ++ "': '" ++ show x ++ "', '" ++ show (Qualified (Just importModule) name) ++ "'"
483484
484485 -- The available values, types, and classes in the module being imported