@@ -28,6 +28,8 @@ data Error
29 | InfixDuplicate String
29 | InfixDuplicate String
30 | TypeWithoutDefinition String
30 | TypeWithoutDefinition String
32+ | DuplicateArgument String String
31 | DuplicateFieldName String
33 | DuplicateFieldName String
32 | DuplicateValueDeclaration String
34 | DuplicateValueDeclaration String
33 | DuplicateTypeDeclaration String
35 | DuplicateTypeDeclaration String
@@ -135,7 +137,7 @@ toReport _localizer err =
135 "If you just wanted a normal module, change the keywords `effect module`\
137 "If you just wanted a normal module, change the keywords `effect module`\
136 \ to `module` and you should be all set. If you want a proper effect module,\
138 \ to `module` and you should be all set. If you want a proper effect module,\
137 \ you need to specify your commands and/or subscriptions. Read more about this\
139 \ you need to specify your commands and/or subscriptions. Read more about this\
138− \ here: <TODO> (please forgive me if I forgot to fill this in!)"
140+ \ here: <http://guide.elm-lang.org/effect_managers/>"
141 MissingManagerOnEffectModule name ->
143 MissingManagerOnEffectModule name ->
@@ -147,7 +149,7 @@ toReport _localizer err =
147 "There is a small set of top-level functions and values that must be defined\
149 "There is a small set of top-level functions and values that must be defined\
148 \ in any complete effect module. The best thing is probably to just read more\
150 \ in any complete effect module. The best thing is probably to just read more\
149 \ about effect modules here:\
151 \ about effect modules here:\
150− \ <TODO> (please forgive me if I forgot to fill this in!)"
152+ \ <http://guide.elm-lang.org/effect_managers/>"
153 UnexpectedPort name ->
155 UnexpectedPort name ->
@@ -184,6 +186,20 @@ toReport _localizer err =
184 ++ " " ++ valueName ++ " = 42"
186 ++ " " ++ valueName ++ " = 42"
189+ DuplicateArgument funcName argName ->
191+ "DUPLICATE ARGUMENT"
193+ ( "The name `" ++ argName
194+ ++ "` is used more than once in the arguments of `"
197+ ( Help.reflowParagraph $
198+ "Rename things until `" ++ argName ++ "` is used only once.\
199+ \ Otherwise how can we tell which one you want when you\
200+ \ say `" ++ argName ++ "` it in the body of your function?"
187 DuplicateFieldName name ->
203 DuplicateFieldName name ->
188 Report.report
204 Report.report
189 "DUPLICATE FIELD"
205 "DUPLICATE FIELD"
@@ -282,7 +298,7 @@ unboundTypeVars declKind typeName givenVars unboundVars =
282 , Help.reflowParagraph $
298 , Help.reflowParagraph $
283 "Here's why. Imagine one `" ++ typeName ++ "` where `" ++ head unboundVars ++
299 "Here's why. Imagine one `" ++ typeName ++ "` where `" ++ head unboundVars ++
284 "` is an Int and another where it is a Bool. When we explicitly list the type\
300 "` is an Int and another where it is a Bool. When we explicitly list the type\
285− \ variables, type checker can see that they are actually different types."
301+ \ variables, the type checker can see that they are actually different types."