on master help sign in
Fill in some of the new error messages
commit8aa55e0a981988cb04306f0dd4b75e845010e411 authorEvan Czaplicki <info@elm-lang.org> dateTue 15 Mar 2016, 13:44 (11 years ago) parent7de84bc
1 file changed+35−4
src/Reporting/Error/Syntax.hs+35−4
src/Reporting/Error/Syntax.hs+35−4
@@ -126,16 +126,47 @@ toReport _localizer err =
126126 )
127127
128128 DuplicateSettingOnEffectModule name ->
129− error "TODO - DuplicateSettingOnEffectModule" name
129+ Report.report
130+ "EFFECT MODULE PROBLEM"
131+ Nothing
132+ ("You have defined " ++ Help.functionName name ++ " multiple times.")
133+ ( Help.reflowParagraph $
134+ "There can only be one " ++ Help.functionName name
135+ ++ " though! Remove until there is one left."
136+ )
130137
131138 BadSettingOnEffectModule name ->
132− error "TODO - BadSettingOnEffectModule" name
139+ Report.report
140+ "EFFECT MODULE PROBLEM"
141+ Nothing
142+ ("Setting " ++ Help.functionName name ++ " is not recognized.")
143+ ( Help.reflowParagraph $
144+ "Remove this entry and you should be all set!"
145+ )
133146
134147 NoSettingsOnEffectModule ->
135− error "TODO - NoSettingsOnEffectModule"
148+ Report.report
149+ "EFFECT MODULE PROBLEM"
150+ Nothing
151+ ("You are defining an effect module, but it has no settings.")
152+ ( Help.reflowParagraph $
153+ "If you just wanted a normal module, change the keywords `effect module`\
154+ \ to `module` and you should be all set. If you want a proper effect module,\
155+ \ you need to specify your commands and/or subscriptions. Read more about this\
156+ \ here: <TODO> (please forgive me if I forgot to fill this in!)"
157+ )
136158
137159 MissingManagerOnEffectModule name ->
138− error "TODO - MissingManagerOnEffectModule" name
160+ Report.report
161+ "EFFECT MODULE PROBLEM"
162+ Nothing
163+ ("You are defining an effect module, but there is no " ++ Help.functionName name ++ " defined.")
164+ ( Help.reflowParagraph $
165+ "There is a small set of top-level functions and values that must be defined\
166+ \ in any complete effect module. The best thing is probably to just read more\
167+ \ about effect modules here:\
168+ \ <TODO> (please forgive me if I forgot to fill this in!)"
169+ )
139170
140171 InfixDuplicate opName ->
141172 Report.report