on master help sign in
Make the error message for arbitrary unknown binops better
commit2abb904deae5dfb281cd0d00377f5561684c70b0 authorEvan Czaplicki <evancz@users.noreply.github.com> dateTue 6 Feb 2018, 16:05 (9 years ago) parent1d1e763
1 file changed+9−7
src/Reporting/Error/Canonicalize.hs+9−7
src/Reporting/Error/Canonicalize.hs+9−7
@@ -478,13 +478,15 @@ toReport source err =
478478 H.reflow $
479479 "I do not recognize this (" ++ N.toString op ++ ") operator."
480480 ,
481− case map H.text suggestions of
482− [] ->
483− H.reflow "Is there an `import` and `exposing` entry for it?"
484−
485− alts ->
486− H.fillSep $
487− ["Maybe","you","want"] ++ H.commaSep "or" format alts ++ ["instead?"]
481+ H.fillSep $
482+ ["Is","there","an","`import`","and","`exposing`","entry","for","it?"]
483+ ++
484+ case map H.text suggestions of
485+ [] ->
486+ []
487+
488+ alts ->
489+ ["Maybe","you","want"] ++ H.commaSep "or" format alts ++ ["instead?"]
488490 )
489491
490492 PatternHasRecordCtor region name ->