@@ -2023,6 +2023,33 @@ toDeclDefReport source name declDef startRow startCol =
2023 "This is a reserved word! Try using some other name?"
2023 "This is a reserved word! Try using some other name?"
2026+ Code.Operator "->" ->
2028+ surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
2029+ region = toWiderRegion row col 2
2031+ Report.Report "MISSING COLON?" region [] $
2032+ Code.toSnippet source surroundings (Just region)
2035+ "I was not expecting to see an arrow here:"
2039+ ["This","usually","means","a",D.green ":","is","missing","a","bit","earlier","in"
2040+ ,"a","type","annotation.","It","could","be","something","else","though,","so"
2041+ ,"here","is","a","valid","definition","for","reference:"
2044+ [ D.fillSep [D.green "add",":","Int","->","Int","->","Int"]
2045+ , D.fillSep [D.green "add","x","y","="]
2046+ , D.fillSep [" ","x","+","y"]
2049+ "Try to use that format with your `" ++ Name.toChars name ++ "` definition!"
2026 Code.Operator op ->
2053 Code.Operator op ->
2028 surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
2055 surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
@@ -3087,6 +3114,33 @@ toLetDefReport source name def startRow startCol =
3087 "This is a reserved word! Try using some other name?"
3114 "This is a reserved word! Try using some other name?"
3117+ Code.Operator "->" ->
3119+ surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
3120+ region = toWiderRegion row col 2
3122+ Report.Report "MISSING COLON?" region [] $
3123+ Code.toSnippet source surroundings (Just region)
3126+ "I was not expecting to see an arrow here:"
3130+ ["This","usually","means","a",D.green ":","is","missing","a","bit","earlier","in"
3131+ ,"a","type","annotation.","It","could","be","something","else","though,","so"
3132+ ,"here","is","a","valid","definition","for","reference:"
3135+ [ D.indent 4 $ D.fillSep [D.green "add",":","Int","->","Int","->","Int"]
3136+ , D.indent 4 $ D.fillSep [D.green "add","x","y","="]
3137+ , D.indent 6 $ D.fillSep ["x","+","y"]
3140+ "Try to use that format with your `" ++ Name.toChars name ++ "` definition!"
3090 Code.Operator op ->
3144 Code.Operator op ->
3092 surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
3146 surroundings = A.Region (A.Position startRow startCol) (A.Position row col)