on master help sign in
Use friendlier term "Name Collision" and clearer message
commit39f4127767c701bd63406cc23f0fd63d81a55b07 authorEvan Czaplicki <info@elm-lang.org> dateMon 17 Nov 2014, 13:31 (12 years ago) parentdb31fe2
1 file changed+5−3
src/Transform/Check.hs+5−3
src/Transform/Check.hs+5−3
@@ -45,7 +45,7 @@ duplicateValues decls =
4545
4646 where
4747 msg x =
48− "Naming Error: There can only be one definition of '" ++ x ++ "'."
48+ "Name Collision: There can only be one definition of '" ++ x ++ "'."
4949
5050 (defPatterns, defExprs) =
5151 unzip [ (pat,expr) | D.Definition (Valid.Definition pat expr _) <- decls ]
@@ -85,12 +85,14 @@ duplicateTypeDeclarations decls =
8585
8686dupTypeError :: String -> String
8787dupTypeError name =
88− "Naming Error: There can only be one type named '" ++ name ++ "'"
88+ "Name Collision: There can only be one type named '" ++ name ++ "'"
8989
9090
9191dupCtorError :: String -> String
9292dupCtorError 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."
9496
9597
9698illFormedTypes :: [D.ValidDecl] -> [Doc]