@@ -3977,21 +3977,42 @@ toRecordReport source context record startRow startCol =
3979 RecordIndentEnd row col ->
3979 RecordIndentEnd row col ->
3980+ case Code.nextLineStartsWithCloseCurly source row of
3981+ Just (curlyRow, curlyCol) ->
3983+ surroundings = A.Region (A.Position startRow startCol) (A.Position curlyRow curlyCol)
3984+ region = toRegion curlyRow curlyCol
3986+ Report.Report "NEED MORE INDENTATION" region [] $
3987+ Code.toSnippet source surroundings (Just region)
3990+ "I was partway through parsing a record, but I got stuck here:"
3994+ "I need this curly brace to be indented more. Try adding some spaces before it!"
3995+ , noteForRecordError
3981− surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
4001+ surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
3982− region = toRegion row col
4002+ region = toRegion row col
3984− Report.Report "UNFINISHED RECORD" region [] $
4004+ Report.Report "UNFINISHED RECORD" region [] $
3985− Code.toSnippet source surroundings (Just region)
4005+ Code.toSnippet source surroundings (Just region)
3987− D.reflow $
4007+ D.reflow $
3988− "I was expecting to see a closing curly brace next:"
4008+ "I was partway through parsing a record, but I got stuck here:"
3990− addNoteForRecordIndentError $
4010+ addNoteForRecordIndentError $
3991− D.fillSep $
4011+ D.fillSep $
4012+ ["I","was","expecting","to","see","a","closing","curly","brace","next."
3992− ["Try","putting","an",D.green "}","and","see","if","that","helps?"
4013+ ,"Try","putting","a",D.green "}","next","and","see","if","that","helps?"
3996 RecordIndentField row col ->
4017 RecordIndentField row col ->
@@ -5384,23 +5405,44 @@ toTRecordReport source context record startRow startCol =
5386 TRecordIndentEnd row col ->
5407 TRecordIndentEnd row col ->
5408+ case Code.nextLineStartsWithCloseCurly source row of
5409+ Just (curlyRow, curlyCol) ->
5388− surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
5411+ surroundings = A.Region (A.Position startRow startCol) (A.Position curlyRow curlyCol)
5389− region = toRegion row col
5412+ region = toRegion curlyRow curlyCol
5391− Report.Report "UNFINISHED RECORD TYPE" region [] $
5414+ Report.Report "NEED MORE INDENTATION" region [] $
5392− Code.toSnippet source surroundings (Just region)
5415+ Code.toSnippet source surroundings (Just region)
5394− D.reflow $
5417+ D.reflow $
5395− "I was expecting to see a closing curly brace next:"
5418+ "I was partway through parsing a record type, but I got stuck here:"
5397− D.stack
5420+ D.stack
5398− [ D.fillSep $
5421+ [ D.reflow $
5399− ["Try","putting","an",D.green "}","and","see","if","that","helps?"
5422+ "I need this curly brace to be indented more. Try adding some spaces before it!"
5423+ , noteForRecordTypeError
5429+ surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
5430+ region = toRegion row col
5432+ Report.Report "UNFINISHED RECORD TYPE" region [] $
5433+ Code.toSnippet source surroundings (Just region)
5436+ "I was partway through parsing a record type, but I got stuck here:"
5440+ ["I","was","expecting","to","see","a","closing","curly","brace","next."
5441+ ,"Try","putting","a",D.green "}","next","and","see","if","that","helps?"
5401− , noteForRecordTypeIndentError
5443+ , noteForRecordTypeIndentError
5405 TRecordIndentField row col ->
5447 TRecordIndentField row col ->