@@ -45,7 +45,7 @@ duplicateValues decls =
48− "Naming Error: There can only be one definition of '" ++ x ++ "'."
48+ "Name Collision: There can only be one definition of '" ++ x ++ "'."
50 (defPatterns, defExprs) =
50 (defPatterns, defExprs) =
51 unzip [ (pat,expr) | D.Definition (Valid.Definition pat expr _) <- decls ]
51 unzip [ (pat,expr) | D.Definition (Valid.Definition pat expr _) <- decls ]
@@ -85,12 +85,14 @@ duplicateTypeDeclarations decls =
86dupTypeError :: String -> String
86dupTypeError :: String -> String
87dupTypeError name =
87dupTypeError name =
88− "Naming Error: There can only be one type named '" ++ name ++ "'"
88+ "Name Collision: There can only be one type named '" ++ name ++ "'"
91dupCtorError :: String -> String
91dupCtorError :: String -> String
92dupCtorError name =
92dupCtorError name =
93− "Naming Error: There can only be one type or record constructor named '" ++ name ++ "'"
93+ "Name Collision: There can only be one constructor named '" ++ name ++ "'.\n"
94+ ++ " Constructors are created for record type aliases and for union types, so\n"
95+ ++ " something should be renamed or moved to a different module."
96illFormedTypes :: [D.ValidDecl] -> [Doc]
98illFormedTypes :: [D.ValidDecl] -> [Doc]