@@ -3892,12 +3892,12 @@ toRecordReport source context record startRow startCol =
3895− _ ->
3895+ Code.Close _ '}' ->
3897 surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
3897 surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
3898 region = toRegion row col
3898 region = toRegion row col
3900− Report.Report "UNFINISHED RECORD" region [] $
3900+ Report.Report "EXTRA COMMA" region [] $
3901 Code.toSnippet source surroundings (Just region)
3901 Code.toSnippet source surroundings (Just region)
3903 D.reflow $
3903 D.reflow $
@@ -3905,9 +3905,29 @@ toRecordReport source context record startRow startCol =
3907 [ D.reflow $
3907 [ D.reflow $
3908− "Trailing commas are not allowed in records, so I was expecting to see another\
3908+ "Trailing commas are not allowed in records. Try deleting the comma that appears\
3909+ \ before this closing curly brace."
3910+ , noteForRecordError
3916+ surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
3917+ region = toRegion row col
3919+ Report.Report "PROBLEM IN RECORD" region [] $
3920+ Code.toSnippet source surroundings (Just region)
3923+ "I am partway through parsing a record, but I got stuck here:"
3909− \ record field defined next. If you are done defining the record, the fix may\
3927+ ["I","was","expecting","to","see","another","record","field","defined","next,"
3910− \ be to delete that last comma?"
3928+ ,"so","I","am","looking","for","a","lower-case","name","like"
3929+ ,D.dullyellow "userName","or",D.dullyellow "plantHeight" <> "."
3911 , noteForRecordError
3931 , noteForRecordError
@@ -5277,22 +5297,42 @@ toTRecordReport source context record startRow startCol =
5280− _ ->
5300+ Code.Close _ '}' ->
5282 surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
5302 surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
5283 region = toRegion row col
5303 region = toRegion row col
5285− Report.Report "UNFINISHED RECORD TYPE" region [] $
5305+ Report.Report "EXTRA COMMA" region [] $
5286 Code.toSnippet source surroundings (Just region)
5306 Code.toSnippet source surroundings (Just region)
5288 D.reflow $
5308 D.reflow $
5289− "I am partway through parsing a record type, but I got stuck after that last comma:"
5309+ "I am partway through parsing a record type, but I got stuck here:"
5292 [ D.reflow $
5312 [ D.reflow $
5293− "Trailing commas are not allowed in records, so I was expecting to see another\
5313+ "Trailing commas are not allowed in record types. Try deleting the comma that\
5314+ \ appears before this closing curly brace."
5315+ , noteForRecordTypeError
5321+ surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
5322+ region = toRegion row col
5324+ Report.Report "PROBLEM IN RECORD TYPE" region [] $
5325+ Code.toSnippet source surroundings (Just region)
5328+ "I am partway through parsing a record type, but I got stuck here:"
5294− \ record field defined next. If you are done defining the record, the fix may\
5332+ ["I","was","expecting","to","see","another","record","field","defined","next,"
5295− \ be to delete that last comma?"
5333+ ,"so","I","am","looking","for","a","lower-case","name","like"
5334+ ,D.dullyellow "userName","or",D.dullyellow "plantHeight" <> "."
5296 , noteForRecordTypeError
5336 , noteForRecordTypeError