@@ -19,7 +19,7 @@ import qualified Reporting.Render.Type as RenderType
19import qualified Reporting.Report as Report
19import qualified Reporting.Report as Report
20import qualified Reporting.Helpers as Help
20import qualified Reporting.Helpers as Help
21import Reporting.Helpers
21import Reporting.Helpers
22− ( Doc, (<>), dullyellow, fillSep, i2t, indent, maybeYouWant, reflowParagraph, text
22+ ( Doc, (<>), dullyellow, fillSep, i2t, indent, reflowParagraph, text
@@ -141,14 +141,18 @@ toReport localizer err =
141 variableName =
141 variableName =
142 kind <> " `" <> name <> "`"
142 kind <> " `" <> name <> "`"
144− learnMore =
144+ learnMore orMaybe =
145− Help.toHint $
145+ Help.reflowParagraph $
146− "New to Elm? Unsure exactly how `import` works? Learn all about it here: "
146+ orMaybe <> " `import` works different than you expect? Learn all about it here: "
147 <> Help.hintLink "imports"
147 <> Help.hintLink "imports"
149 namingError overview maybeStarter specializedSuggestions =
149 namingError overview maybeStarter specializedSuggestions =
150 Report.report "NAMING ERROR" Nothing overview $
150 Report.report "NAMING ERROR" Nothing overview $
151− maybeYouWant maybeStarter specializedSuggestions (Just learnMore)
151+ case Help.maybeYouWant' maybeStarter specializedSuggestions of
155+ Help.stack [ doc, learnMore "Or maybe" ]
153 case problem of
157 case problem of
154 Ambiguous ->
158 Ambiguous ->
@@ -244,17 +248,17 @@ toReport localizer err =
244 ModuleNotFound suggestions ->
248 ModuleNotFound suggestions ->
245 Report.report "IMPORT ERROR" Nothing
249 Report.report "IMPORT ERROR" Nothing
246 ("Could not find a module named `" <> ModuleName.toText name <> "`")
250 ("Could not find a module named `" <> ModuleName.toText name <> "`")
247− (maybeYouWant Nothing suggestions Nothing)
251+ (Help.maybeYouWant Nothing suggestions)
249 ValueNotFound value suggestions ->
253 ValueNotFound value suggestions ->
250 Report.report "IMPORT ERROR" Nothing
254 Report.report "IMPORT ERROR" Nothing
251 ("Module `" <> ModuleName.toText name <> "` does not expose `" <> value <> "`")
255 ("Module `" <> ModuleName.toText name <> "` does not expose `" <> value <> "`")
252− (maybeYouWant Nothing suggestions Nothing)
256+ (Help.maybeYouWant Nothing suggestions)
254 Export name suggestions ->
258 Export name suggestions ->
255 Report.report "EXPOSING ERROR" Nothing
259 Report.report "EXPOSING ERROR" Nothing
256 ("Could not expose `" <> name <> "` which is not defined in this module.")
260 ("Could not expose `" <> name <> "` which is not defined in this module.")
257− (maybeYouWant Nothing suggestions Nothing)
261+ (Help.maybeYouWant Nothing suggestions)
259 DuplicateExport name ->
263 DuplicateExport name ->
260 Report.report "EXPOSING ERROR" Nothing
264 Report.report "EXPOSING ERROR" Nothing