@@ -4127,11 +4127,13 @@ toRecordReport source context record startRow startCol =
41274127 D.reflow $
41284128 "I just saw the opening curly brace of a record, but then I got stuck here:"
41294129 ,
4130− addNoteForRecordIndentError $
4131− D.fillSep $
4132− ["I","am","expecting","a","record","like",D.dullyellow "{ x = 3, y = 4 }","here."
4133− ,"Try","defining","some","fields","of","your","own?"
4134− ]
4130+ D.stack
4131+ [ D.fillSep $
4132+ ["I","am","expecting","a","record","like",D.dullyellow "{ x = 3, y = 4 }","here."
4133+ ,"Try","defining","some","fields","of","your","own?"
4134+ ]
4135+ , noteForRecordIndentError
4136+ ]
41354137 )
41364138
41374139 RecordIndentEnd row col ->
@@ -4165,11 +4167,13 @@ toRecordReport source context record startRow startCol =
41654167 D.reflow $
41664168 "I was partway through parsing a record, but I got stuck here:"
41674169 ,
4168− addNoteForRecordIndentError $
4169− D.fillSep $
4170− ["I","was","expecting","to","see","a","closing","curly","brace","next."
4171− ,"Try","putting","a",D.green "}","next","and","see","if","that","helps?"
4172− ]
4170+ D.stack
4171+ [ D.fillSep $
4172+ ["I","was","expecting","to","see","a","closing","curly","brace","next."
4173+ ,"Try","putting","a",D.green "}","next","and","see","if","that","helps?"
4174+ ]
4175+ , noteForRecordIndentError
4176+ ]
41734177 )
41744178
41754179 RecordIndentField row col ->
@@ -4204,10 +4208,12 @@ toRecordReport source context record startRow startCol =
42044208 "I am partway through parsing a record. I just saw a record\
42054209 \ field, so I was expecting to see an equals sign next:"
42064210 ,
4207− addNoteForRecordIndentError $
4208− D.fillSep $
4209− ["Try","putting","an",D.green "=","followed","by","an","expression?"
4210− ]
4211+ D.stack
4212+ [ D.fillSep $
4213+ ["Try","putting","an",D.green "=","followed","by","an","expression?"
4214+ ]
4215+ , noteForRecordIndentError
4216+ ]
42114217 )
42124218
42134219 RecordIndentExpr row col ->
@@ -4221,11 +4227,13 @@ toRecordReport source context record startRow startCol =
42214227 D.reflow $
42224228 "I am partway through parsing a record, and I was expecting to run into an expression next:"
42234229 ,
4224− addNoteForRecordIndentError $
4225− D.fillSep $
4226− ["Try","putting","something","like"
4227− ,D.dullyellow "42","or",D.dullyellow"\"hello\"","for","now?"
4228− ]
4230+ D.stack
4231+ [ D.fillSep $
4232+ ["Try","putting","something","like"
4233+ ,D.dullyellow "42","or",D.dullyellow"\"hello\"","for","now?"
4234+ ]
4235+ , noteForRecordIndentError
4236+ ]
42294237 )
42304238
42314239
@@ -4246,11 +4254,9 @@ noteForRecordError =
42464254 ]
42474255
42484256
4249−addNoteForRecordIndentError :: D.Doc -> D.Doc
4250−addNoteForRecordIndentError normalRecommendation =
4251− D.stack $
4252− normalRecommendation
4253− :
4257+noteForRecordIndentError :: D.Doc
4258+noteForRecordIndentError =
4259+ D.stack
42544260 [ D.toSimpleNote
42554261 "I may be confused by indentation. For example, if you are trying to define\
42564262 \ a record across multiple lines, I recommend using this format:"