@@ -3883,11 +3883,13 @@ toRecordReport source context record startRow startCol =
3883 D.reflow $
3883 D.reflow $
3884 "I am partway through parsing a record, but I got stuck after that last comma:"
3884 "I am partway through parsing a record, but I got stuck after that last comma:"
3886− addNoteForRecordError $
3886+ D.stack
3887− D.reflow $
3887+ [ D.reflow $
3888− "Trailing commas are not allowed in records, so I was expecting to see another\
3888+ "Trailing commas are not allowed in records, so I was expecting to see another\
3889− \ record field defined next. If you are done defining the record, the fix may\
3889+ \ record field defined next. If you are done defining the record, the fix may\
3890− \ be to delete that last comma?"
3890+ \ be to delete that last comma?"
3891+ , noteForRecordError
3893 RecordEquals row col ->
3895 RecordEquals row col ->
@@ -3901,11 +3903,13 @@ toRecordReport source context record startRow startCol =
3901 D.reflow $
3903 D.reflow $
3902 "I am partway through parsing a record, but I got stuck here:"
3904 "I am partway through parsing a record, but I got stuck here:"
3904− addNoteForRecordError $
3906+ D.stack
3905− D.fillSep $
3907+ [ D.fillSep $
3906− ["I","just","saw","a","field","name,","so","I","was","expecting","to","see"
3908+ ["I","just","saw","a","field","name,","so","I","was","expecting","to","see"
3907− ,"an","equals","sign","next.","So","try","putting","an",D.green "=","sign","here?"
3909+ ,"an","equals","sign","next.","So","try","putting","an",D.green "=","sign","here?"
3911+ , noteForRecordError
3911 RecordExpr expr row col ->
3915 RecordExpr expr row col ->
@@ -3960,11 +3964,13 @@ toRecordReport source context record startRow startCol =
3960 D.reflow $
3964 D.reflow $
3961 "I am partway through parsing a record, but I got stuck after that last comma:"
3965 "I am partway through parsing a record, but I got stuck after that last comma:"
3963− addNoteForRecordError $
3967+ D.stack
3964− D.reflow $
3968+ [ D.reflow $
3965− "Trailing commas are not allowed in records, so the fix may be to\
3969+ "Trailing commas are not allowed in records, so the fix may be to\
3966− \ delete that last comma? Or maybe you were in the middle of defining\
3970+ \ delete that last comma? Or maybe you were in the middle of defining\
3967− \ an additional field?"
3971+ \ an additional field?"
3972+ , noteForRecordError
3970 RecordIndentEquals row col ->
3976 RecordIndentEquals row col ->
@@ -4004,11 +4010,9 @@ toRecordReport source context record startRow startCol =
4007−addNoteForRecordError :: D.Doc -> D.Doc
4013+noteForRecordError :: D.Doc
4008−addNoteForRecordError normalRecommendation =
4014+noteForRecordError =
4009 D.stack $
4015 D.stack $
4010− normalRecommendation
4012 [ D.toSimpleNote
4016 [ D.toSimpleNote
4013 "If you are trying to define a record across multiple lines, I recommend using this format:"
4017 "If you are trying to define a record across multiple lines, I recommend using this format:"
4014 , D.indent 4 $ D.vcat $
4018 , D.indent 4 $ D.vcat $