@@ -2980,7 +2980,29 @@ toPatternReport source context pattern startRow startCol =
2982 PAlias row col ->
2982 PAlias row col ->
2983− error "TODO PAlias" row col
2983+ let
2984+ region = toRegion row col
2986+ Report.Report "UNFINISHED PATTERN" region [] $
2987+ Code.toSnippet source region Nothing $
2990+ "I was expecting to see a variable name after the `as` keyword:"
2994+ ["The","`as`","keyword","lets","you","write","patterns","like"
2995+ ,"((" <> D.dullyellow "x" <> "," <> D.dullyellow "y" <> ") " <> D.cyan "as" <> D.dullyellow " point" <> ")"
2996+ ,"so","you","can","refer","to","individual","parts","of","the","tuple","with"
2997+ ,D.dullyellow "x","and",D.dullyellow "y","or","you","refer","to","the","whole"
2998+ ,"thing","with",D.dullyellow "point."
3001+ "So I was expecting to see a variable name after the `as` keyword here. Sometimes\
3002+ \ people just want to use `as` as a variable name though. Try using a different name\
2985 PWildcardNotVar name width row col ->
3007 PWildcardNotVar name width row col ->
@@ -3009,7 +3031,29 @@ toPatternReport source context pattern startRow startCol =
3009 error "TODO PIndentStart" row col
3031 error "TODO PIndentStart" row col
3011 PIndentAlias row col ->
3033 PIndentAlias row col ->
3012− error "TODO PIndentAlias" row col
3034+ let
3035+ region = toRegion row col
3037+ Report.Report "UNFINISHED PATTERN" region [] $
3038+ Code.toSnippet source region Nothing $
3041+ "I was expecting to see a variable name after the `as` keyword:"
3045+ ["The","`as`","keyword","lets","you","write","patterns","like"
3046+ ,"((" <> D.dullyellow "x" <> "," <> D.dullyellow "y" <> ") " <> D.cyan "as" <> D.dullyellow " point" <> ")"
3047+ ,"so","you","can","refer","to","individual","parts","of","the","tuple","with"
3048+ ,D.dullyellow "x","and",D.dullyellow "y","or","you","refer","to","the","whole"
3049+ ,"thing","with",D.dullyellow "point."
3052+ "So I was expecting to see a variable name after the `as` keyword here. Sometimes\
3053+ \ people just want to use `as` as a variable name though. Try using a different name\
3015toPRecordReport :: Code.Source -> PRecord -> Row -> Col -> Report.Report
3059toPRecordReport :: Code.Source -> PRecord -> Row -> Col -> Report.Report