on master help sign in
improve error message a bit for missing else branch
5eddcb2Evan Czaplicki
compiler/src/Reporting/Error/Syntax.hs+5−4
@@ -3758,10 +3758,11 @@ toIfReport source context if_ startRow startCol =
3758 "I was expecting to see an `else` branch after this:"
3758 "I was expecting to see an `else` branch after this:"
3759 ,
3759 ,
3760 D.stack
3760 D.stack
3761− [ D.reflow $
3761+ [ D.fillSep
3762− "I know what to do when the condition is `True`, but not when it is `False`."
3762+ ["I","know","what","to","do","when","the","condition","is","True,"
3763− , D.fillSep
3763+ ,"but","what","happens","when","it","is","False?"
3764− ["Add","an",D.cyan "else","branch","to","handle","that","scenario!"]
3764+ ,"Add","an",D.cyan "else","branch","to","handle","that","scenario!"
3765+ ]
3765 ]
3766 ]
3766 )
3767 )
3767
3768