on master help sign in
improve a bunch of syntax error messages

improvements include: - consistently use yellow for strings and ints - always indent 4 spaces for code examples - never use green in code examples - always use cyan for keywords in code examples - add examples of `as` and `exposing` for bad imports - switch reviewPowerLevel to greet function - have better message for unexpected capital letter decl - switch `add` to `greet` in example definition

commitc8e3b8a0138ed7688103286d1b4506f81bfd28cd authorEvan Czaplicki <evancz@users.noreply.github.com> dateTue 27 Aug 2019, 10:55 (7 years ago) parent249e595
1 file changed+199−128
compiler/src/Reporting/Error/Syntax.hs+199−128
compiler/src/Reporting/Error/Syntax.hs+199−128
@@ -693,6 +693,36 @@ toParseErrorReport source modul =
693693 "This " ++ bracket : " does not match up with an earlier open " ++ term ++ ". Try deleting it?"
694694 )
695695
696+ Code.Lower c cs ->
697+ let
698+ region = toKeywordRegion row col (c:cs)
699+ in
700+ Report.Report "UNEXPECTED NAME" region [] $
701+ Code.toSnippet source region Nothing
702+ (
703+ D.reflow $
704+ "I got stuck on this name:"
705+ ,
706+ D.reflow $
707+ "It is confusing me a lot! Normally I can give fairly specific hints, but\
708+ \ something is really tripping me up this time."
709+ )
710+
711+ Code.Upper c cs ->
712+ let
713+ region = toKeywordRegion row col (c:cs)
714+ in
715+ Report.Report "UNEXPECTED NAME" region [] $
716+ Code.toSnippet source region Nothing
717+ (
718+ D.reflow $
719+ "I got stuck on this name:"
720+ ,
721+ D.reflow $
722+ "It is confusing me a lot! Normally I can give fairly specific hints, but\
723+ \ something is really tripping me up this time."
724+ )
725+
696726 Code.Other maybeChar ->
697727 let
698728 region = toRegion row col
@@ -747,17 +777,15 @@ toParseErrorReport source modul =
747777 "It is not used for anything in Elm syntax. It is used for multi-line strings in\
748778 \ some languages though, so if you want a string that spans multiple lines, you\
749779 \ can use Elm's multi-line string syntax like this:"
750− , D.vcat
751− [ D.fillSep [D.green "markdown","=",D.dullyellow "\"\"\""]
752− , mempty
753− , D.dullyellow "# Multi-line Strings"
754− , mempty
755− , D.dullyellow "- start with triple double quotes"
756− , D.dullyellow "- write whatever you want"
757− , D.dullyellow "- no need to escape newlines or double quotes"
758− , D.dullyellow "- end with triple double quotes"
759− , mempty
760− , D.dullyellow "\"\"\""
780+ , D.dullyellow $ D.indent 4 $ D.vcat $
781+ [ "\"\"\""
782+ , "# Multi-line Strings"
783+ , ""
784+ , "- start with triple double quotes"
785+ , "- write whatever you want"
786+ , "- no need to escape newlines or double quotes"
787+ , "- end with triple double quotes"
788+ , "\"\"\""
761789 ]
762790 , D.reflow $
763791 "Otherwise I do not know what is going on! Try removing the character?"
@@ -944,11 +972,11 @@ toParseErrorReport source modul =
944972 [ D.reflow $
945973 "I am not sure what is going on, but I recommend starting an Elm\
946974 \ file with the following lines:"
947− , D.vcat
975+ , D.indent 4 $ D.vcat $
948976 [ D.fillSep [D.cyan "import","Html"]
949977 , ""
950− , D.fillSep [D.green "main","="]
951− , D.indent 2 $ D.fillSep [D.cyan "Html" <> ".text",D.dullyellow "\"Hello!\""]
978+ , "main ="
979+ , " Html.text " <> D.dullyellow "\"Hello!\""
952980 ]
953981 , D.reflow $
954982 "You should be able to copy those lines directly into your file. Check out the\
@@ -977,8 +1005,8 @@ toParseErrorReport source modul =
9771005 , D.indent 4 $ D.vcat $
9781006 [ D.fillSep [D.cyan "import","Dict"]
9791007 , D.fillSep [D.cyan "import","Maybe"]
980− , D.fillSep [D.cyan "import","Html.Attributes"]
981− , D.fillSep [D.cyan "import","Json.Decode"]
1008+ , D.fillSep [D.cyan "import","Html.Attributes",D.cyan "as","A"]
1009+ , D.fillSep [D.cyan "import","Json.Decode",D.cyan "exposing","(..)"]
9821010 ]
9831011 , D.reflow $
9841012 "Notice that the module names all start with capital letters. That is required!"
@@ -1439,8 +1467,8 @@ toDeclarationsReport source decl =
14391467 , D.toSimpleNote $
14401468 "If you are trying to write a `case` expression, it needs to be part of a\
14411469 \ definition. So you could write something like this instead:"
1442− , D.vcat $
1443− [ D.indent 0 $ D.fillSep [D.green "getWidth","maybeWidth","="]
1470+ , D.indent 4 $ D.vcat $
1471+ [ D.indent 0 $ D.fillSep ["getWidth","maybeWidth","="]
14441472 , D.indent 2 $ D.fillSep [D.cyan "case","maybeWidth",D.cyan "of"]
14451473 , D.indent 4 $ D.fillSep [D.blue "Just","width","->"]
14461474 , D.indent 6 $ D.fillSep ["width","+",D.dullyellow "200"]
@@ -1449,7 +1477,7 @@ toDeclarationsReport source decl =
14491477 , D.indent 6 $ D.fillSep [D.dullyellow "400"]
14501478 ]
14511479 , D.reflow $
1452− "This defines a `getWidth` function that we can use elsewhere in our program."
1480+ "This defines a `getWidth` function that you can use elsewhere in your program."
14531481 ]
14541482
14551483 "if" ->
@@ -1459,16 +1487,17 @@ toDeclarationsReport source decl =
14591487 , D.toSimpleNote $
14601488 "If you are trying to write an `if` expression, it needs to be part of a\
14611489 \ definition. So you could write something like this instead:"
1462− , D.vcat $
1463− [ D.indent 0 $ D.fillSep [D.green "reviewPowerLevel","powerLevel","="]
1464− , D.indent 2 $ D.fillSep $
1465− [D.cyan "if","powerLevel",">",D.dullyellow "9000"
1466− ,D.cyan "then",D.dullyellow "\"OVER 9000!!!\""
1467− ,D.cyan "else",D.dullyellow "\"not bad\""
1490+ , D.indent 4 $ D.vcat $
1491+ [ "greet name ="
1492+ , D.fillSep $
1493+ [" "
1494+ ,D.cyan "if","name","==",D.dullyellow "\"Abraham Lincoln\""
1495+ ,D.cyan "then",D.dullyellow "\"Greetings Mr. President.\""
1496+ ,D.cyan "else",D.dullyellow "\"Hey!\""
14681497 ]
14691498 ]
14701499 , D.reflow $
1471− "This defines a `reviewPowerLevel` function that we can use elsewhere in our program."
1500+ "This defines a `reviewPowerLevel` function that you can use elsewhere in your program."
14721501 ]
14731502
14741503 _ ->
@@ -1476,37 +1505,83 @@ toDeclarationsReport source decl =
14761505 "It is a reserved word. Try changing the name to something else?"
14771506 )
14781507
1479− _ ->
1508+ Code.Upper c cs ->
14801509 let
14811510 region = toRegion row col
14821511 in
1483− Report.Report "SYNTAX PROBLEM" region [] $
1512+ Report.Report "UNEXPECTED CAPITAL LETTER" region [] $
14841513 Code.toSnippet source region Nothing
14851514 (
14861515 D.reflow $
1487− "I was expecting to see a declaration, but I am getting stuck here:"
1516+ "Declarations always start with a lower-case letter, so I am getting stuck here:"
14881517 ,
14891518 D.stack
1490− [ case Code.whatIsNext source row col of
1491− Code.Other (Just char) | Char.isUpper char ->
1492− D.reflow $
1493− "All declarations start with lower-case letters in Elm, so maybe this letter can\
1494− \ be changed to lower-case?"
1495−
1496− _ ->
1497− D.reflow $
1498− "Declarations normally start with a lower-case name or the `type` keyword."
1499− , D.toSimpleHint $
1519+ [ D.fillSep $
1520+ ["Try","a","name","like"
1521+ ,D.green (D.fromChars (Char.toLower c : cs))
1522+ ,"instead?"
1523+ ]
1524+ , D.toSimpleNote $
15001525 "Here are a couple valid declarations for reference:"
1501− , D.vcat
1502− [ D.fillSep [D.green "add",":","Int","->","Int","->","Int"]
1503− , D.fillSep [D.green "add","x","y","="]
1504− , D.fillSep [" ","x","+","y"]
1526+ , D.indent 4 $ D.vcat $
1527+ [ "greet : String -> String"
1528+ , "greet name ="
1529+ , " " <> D.dullyellow "\"Hello \"" <> " ++ name ++ " <> D.dullyellow "\"!\""
1530+ , ""
1531+ , D.cyan "type" <> " User = Anonymous | LoggedIn String"
1532+ ]
1533+ , D.reflow $
1534+ "Notice that they always start with a lower-case letter. Capitalization matters!"
1535+ ]
1536+ )
1537+
1538+ Code.Other (Just char) | elem char ['(', '{', '[', '+', '-', '*', '/', '^', '&', '|', '"', '\'', '!', '@', '#', '$', '%'] ->
1539+ let
1540+ region = toRegion row col
1541+ in
1542+ Report.Report "UNEXPECTED SYMBOL" region [] $
1543+ Code.toSnippet source region Nothing
1544+ (
1545+ D.reflow $
1546+ "I am getting stuck because this line starts with the " ++ [char] ++ " symbol:"
1547+ ,
1548+ D.stack
1549+ [ D.reflow $
1550+ "When a line has no spaces at the beginning, I expect it to be a declaration like one of these:"
1551+ , D.indent 4 $ D.vcat $
1552+ [ "greet : String -> String"
1553+ , "greet name ="
1554+ , " " <> D.dullyellow "\"Hello \"" <> " ++ name ++ " <> D.dullyellow "\"!\""
1555+ , ""
1556+ , D.cyan "type" <> " User = Anonymous | LoggedIn String"
1557+ ]
1558+ , D.reflow $
1559+ "If this is not supposed to be a declaration, try adding some spaces before it?"
1560+ ]
1561+ )
1562+
1563+ _ ->
1564+ let
1565+ region = toRegion row col
1566+ in
1567+ Report.Report "WEIRD DECLARATION" region [] $
1568+ Code.toSnippet source region Nothing
1569+ (
1570+ D.reflow $
1571+ "I am trying to parse a declaration, but I am getting stuck here:"
1572+ ,
1573+ D.stack
1574+ [ D.reflow $
1575+ "I am not sure what is going wrong, so here are a couple valid declarations for reference:"
1576+ , D.indent 4 $ D.vcat $
1577+ [ "greet : String -> String"
1578+ , "greet name ="
1579+ , " " <> D.dullyellow "\"Hello \"" <> " ++ name ++ " <> D.dullyellow "\"!\""
1580+ , ""
1581+ , D.cyan "type" <> " User = Anonymous | LoggedIn String"
15051582 ]
1506− , D.fillSep [D.cyan "type",D.green "User","=","Anonymous","|","LoggedIn String"]
15071583 , D.reflow $
1508− "Notice that these declarations start with lower-case letters. Capitalization\
1509− \ makes a difference in Elm!"
1584+ "Try to make your declaration look like one of those?"
15101585 ]
15111586 )
15121587
@@ -1664,7 +1739,7 @@ toPortReport source port_ startRow startCol =
16641739 [ D.reflow $
16651740 "I was expecting to see a type next. Here are examples of outgoing and\
16661741 \ incoming ports for reference:"
1667− , D.vcat
1742+ , D.indent 4 $ D.vcat $
16681743 [ D.fillSep [D.cyan "port","send",":","String -> Cmd msg"]
16691744 , D.fillSep [D.cyan "port","receive",":","(String -> msg) -> Sub msg"]
16701745 ]
@@ -1683,7 +1758,7 @@ portNote =
16831758 D.stack
16841759 [ D.toSimpleNote $
16851760 "Here are some example `port` declarations for reference:"
1686− , D.vcat
1761+ , D.indent 4 $ D.vcat $
16871762 [ D.fillSep [D.cyan "port","send",":","String -> Cmd msg"]
16881763 , D.fillSep [D.cyan "port","receive",":","(String -> msg) -> Sub msg"]
16891764 ]
@@ -1866,8 +1941,8 @@ typeAliasNote =
18661941 [ D.toSimpleNote $
18671942 "Here is an example of a valid `type alias` for reference:"
18681943 , D.vcat $
1869− [ D.indent 0 $ D.fillSep [D.cyan "type",D.cyan "alias",D.green "Person","="]
1870− , D.indent 2 $ D.vcat $
1944+ [ D.indent 4 $ D.fillSep [D.cyan "type",D.cyan "alias","Person","="]
1945+ , D.indent 6 $ D.vcat $
18711946 ["{ name : String"
18721947 ,", age : Int"
18731948 ,", height : Float"
@@ -2067,10 +2142,10 @@ customTypeNote =
20672142 [ D.toSimpleNote $
20682143 "Here is an example of a valid `type` declaration for reference:"
20692144 , D.vcat $
2070− [ D.indent 0 $ D.fillSep [D.cyan "type",D.green "Status"]
2071− , D.indent 2 $ D.fillSep ["=","Failure"]
2072− , D.indent 2 $ D.fillSep ["|","Waiting"]
2073− , D.indent 2 $ D.fillSep ["|","Success","String"]
2145+ [ D.indent 4 $ D.fillSep [D.cyan "type","Status"]
2146+ , D.indent 6 $ D.fillSep ["=","Failure"]
2147+ , D.indent 6 $ D.fillSep ["|","Waiting"]
2148+ , D.indent 6 $ D.fillSep ["|","Success","String"]
20742149 ]
20752150 , D.reflow $
20762151 "This defines a new `Status` type with three variants. This could be useful if\
@@ -2142,10 +2217,10 @@ toDeclDefReport source name declDef startRow startCol =
21422217 ,"a","type","annotation.","It","could","be","something","else","though,","so"
21432218 ,"here","is","a","valid","definition","for","reference:"
21442219 ]
2145− , D.vcat
2146− [ D.fillSep [D.green "add",":","Int","->","Int","->","Int"]
2147− , D.fillSep [D.green "add","x","y","="]
2148− , D.fillSep [" ","x","+","y"]
2220+ , D.indent 4 $ D.vcat $
2221+ [ "greet : String -> String"
2222+ , "greet name ="
2223+ , " " <> D.dullyellow "\"Hello \"" <> " ++ name ++ " <> D.dullyellow "\"!\""
21492224 ]
21502225 , D.reflow $
21512226 "Try to use that format with your `" ++ Name.toChars name ++ "` definition!"
@@ -2167,10 +2242,10 @@ toDeclDefReport source name declDef startRow startCol =
21672242 [ D.reflow $
21682243 "I am not sure what is going wrong exactly, so here is a valid\
21692244 \ definition (with an optional type annotation) for reference:"
2170− , D.vcat
2171− [ D.fillSep [D.green "add",":","Int","->","Int","->","Int"]
2172− , D.fillSep [D.green "add","x","y","="]
2173− , D.fillSep [" ","x","+","y"]
2245+ , D.indent 4 $ D.vcat $
2246+ [ "greet : String -> String"
2247+ , "greet name ="
2248+ , " " <> D.dullyellow "\"Hello \"" <> " ++ name ++ " <> D.dullyellow "\"!\""
21742249 ]
21752250 , D.reflow $
21762251 "Try to use that format with your `" ++ Name.toChars name ++ "` definition!"
@@ -2192,10 +2267,10 @@ toDeclDefReport source name declDef startRow startCol =
21922267 [ D.reflow $
21932268 "I am not sure what is going wrong exactly, so here is a valid\
21942269 \ definition (with an optional type annotation) for reference:"
2195− , D.vcat
2196− [ D.fillSep [D.green "add",":","Int","->","Int","->","Int"]
2197− , D.fillSep [D.green "add","x","y","="]
2198− , D.fillSep [" ","x","+","y"]
2270+ , D.indent 4 $ D.vcat $
2271+ [ "greet : String -> String"
2272+ , "greet name ="
2273+ , " " <> D.dullyellow "\"Hello \"" <> " ++ name ++ " <> D.dullyellow "\"!\""
21992274 ]
22002275 , D.reflow $
22012276 "Try to use that format!"
@@ -2310,10 +2385,10 @@ declDefNote =
23102385 D.stack
23112386 [ D.reflow $
23122387 "Here is a valid definition (with a type annotation) for reference:"
2313− , D.vcat
2314− [ D.fillSep [D.green "add",":","Int","->","Int","->","Int"]
2315− , D.fillSep [D.green "add","x","y","="]
2316− , D.fillSep [" ","x","+","y"]
2388+ , D.indent 4 $ D.vcat $
2389+ [ "greet : String -> String"
2390+ , "greet name ="
2391+ , " " <> D.dullyellow "\"Hello \"" <> " ++ name ++ " <> D.dullyellow "\"!\""
23172392 ]
23182393 , D.reflow $
23192394 "The top line (called a \"type annotation\") is optional. You can leave it off\
@@ -2646,17 +2721,15 @@ toStringReport source string row col =
26462721 , D.toSimpleNote $
26472722 "For a string that spans multiple lines, you can use the multi-line string\
26482723 \ syntax like this:"
2649− , D.vcat
2650− [ D.fillSep [D.green "markdown","=",D.dullyellow "\"\"\""]
2651− , mempty
2652− , D.dullyellow "# Multi-line Strings"
2653− , mempty
2654− , D.dullyellow "- start with triple double quotes"
2655− , D.dullyellow "- write whatever you want"
2656− , D.dullyellow "- no need to escape newlines or double quotes"
2657− , D.dullyellow "- end with triple double quotes"
2658− , mempty
2659− , D.dullyellow "\"\"\""
2724+ , D.dullyellow $ D.indent 4 $ D.vcat $
2725+ [ "\"\"\""
2726+ , "# Multi-line Strings"
2727+ , ""
2728+ , "- start with triple double quotes"
2729+ , "- write whatever you want"
2730+ , "- no need to escape newlines or double quotes"
2731+ , "- end with triple double quotes"
2732+ , "\"\"\""
26602733 ]
26612734 ]
26622735 )
@@ -2675,17 +2748,15 @@ toStringReport source string row col =
26752748 [ D.reflow "Add a \"\"\" somewhere after this to end the string."
26762749 , D.toSimpleNote $
26772750 "Here is a valid multi-line string for reference:"
2678− , D.vcat
2679− [ D.fillSep [D.green "markdown","=",D.dullyellow "\"\"\""]
2680− , mempty
2681− , D.dullyellow "# Multi-line Strings"
2682− , mempty
2683− , D.dullyellow "- start with triple double quotes"
2684− , D.dullyellow "- write whatever you want"
2685− , D.dullyellow "- no need to escape newlines or double quotes"
2686− , D.dullyellow "- end with triple double quotes"
2687− , mempty
2688− , D.dullyellow "\"\"\""
2751+ , D.dullyellow $ D.indent 4 $ D.vcat $
2752+ [ "\"\"\""
2753+ , "# Multi-line Strings"
2754+ , ""
2755+ , "- start with triple double quotes"
2756+ , "- write whatever you want"
2757+ , "- no need to escape newlines or double quotes"
2758+ , "- end with triple double quotes"
2759+ , "\"\"\""
26892760 ]
26902761 ]
26912762 )
@@ -3150,8 +3221,8 @@ toUnfinishLetReport source row col startRow startCol message =
31503221 [ message
31513222 , D.toSimpleNote $
31523223 "Here is an example with a valid `let` expression for reference:"
3153− , D.vcat $
3154− [ D.indent 0 $ D.fillSep [D.green "viewPerson","person","="]
3224+ , D.indent 4 $ D.vcat $
3225+ [ D.indent 0 $ D.fillSep ["viewPerson","person","="]
31553226 , D.indent 2 $ D.fillSep [D.cyan "let"]
31563227 , D.indent 4 $ D.fillSep ["fullName","="]
31573228 , D.indent 6 $ D.fillSep ["person.firstName","++",D.dullyellow "\" \"","++","person.lastName"]
@@ -3269,10 +3340,10 @@ toLetDefReport source name def startRow startCol =
32693340 ,"a","type","annotation.","It","could","be","something","else","though,","so"
32703341 ,"here","is","a","valid","definition","for","reference:"
32713342 ]
3272− , D.vcat
3273− [ D.indent 4 $ D.fillSep [D.green "add",":","Int","->","Int","->","Int"]
3274− , D.indent 4 $ D.fillSep [D.green "add","x","y","="]
3275− , D.indent 6 $ D.fillSep ["x","+","y"]
3343+ , D.indent 4 $ D.vcat $
3344+ [ "greet : String -> String"
3345+ , "greet name ="
3346+ , " " <> D.dullyellow "\"Hello \"" <> " ++ name ++ " <> D.dullyellow "\"!\""
32763347 ]
32773348 , D.reflow $
32783349 "Try to use that format with your `" ++ Name.toChars name ++ "` definition!"
@@ -3294,10 +3365,10 @@ toLetDefReport source name def startRow startCol =
32943365 [ D.reflow $
32953366 "I am not sure what is going wrong exactly, so here is a valid\
32963367 \ definition (with an optional type annotation) for reference:"
3297− , D.vcat
3298− [ D.indent 4 $ D.fillSep [D.green "add",":","Int","->","Int","->","Int"]
3299− , D.indent 4 $ D.fillSep [D.green "add","x","y","="]
3300− , D.indent 6 $ D.fillSep ["x","+","y"]
3368+ , D.indent 4 $ D.vcat $
3369+ [ "greet : String -> String"
3370+ , "greet name ="
3371+ , " " <> D.dullyellow "\"Hello \"" <> " ++ name ++ " <> D.dullyellow "\"!\""
33013372 ]
33023373 , D.reflow $
33033374 "Try to use that format with your `" ++ Name.toChars name ++ "` definition!"
@@ -3319,10 +3390,10 @@ toLetDefReport source name def startRow startCol =
33193390 [ D.reflow $
33203391 "I am not sure what is going wrong exactly, so here is a valid\
33213392 \ definition (with an optional type annotation) for reference:"
3322− , D.vcat
3323− [ D.indent 4 $ D.fillSep [D.green "add",":","Int","->","Int","->","Int"]
3324− , D.indent 4 $ D.fillSep [D.green "add","x","y","="]
3325− , D.indent 4 $ D.fillSep ["x","+","y"]
3393+ , D.indent 4 $ D.vcat $
3394+ [ "greet : String -> String"
3395+ , "greet name ="
3396+ , " " <> D.dullyellow "\"Hello \"" <> " ++ name ++ " <> D.dullyellow "\"!\""
33263397 ]
33273398 , D.reflow $
33283399 "Try to use that format!"
@@ -3412,10 +3483,10 @@ defNote =
34123483 D.stack
34133484 [ D.reflow $
34143485 "Here is a valid definition (with a type annotation) for reference:"
3415− , D.vcat
3416− [ D.indent 4 $ D.fillSep [D.green "add",":","Int","->","Int","->","Int"]
3417− , D.indent 4 $ D.fillSep [D.green "add","x","y","="]
3418− , D.indent 6 $ D.fillSep ["x","+","y"]
3486+ , D.indent 4 $ D.vcat $
3487+ [ "greet : String -> String"
3488+ , "greet name ="
3489+ , " " <> D.dullyellow "\"Hello \"" <> " ++ name ++ " <> D.dullyellow "\"!\""
34193490 ]
34203491 , D.reflow $
34213492 "The top line (called a \"type annotation\") is optional. You can leave it off\
@@ -4164,9 +4235,9 @@ noteForRecordError =
41644235 [ D.toSimpleNote
41654236 "If you are trying to define a record across multiple lines, I recommend using this format:"
41664237 , D.indent 4 $ D.vcat $
4167− [ "{ name = \"Alice\""
4168− , ", age = 42"
4169− , ", height = 1.75"
4238+ [ "{ name = " <> D.dullyellow "\"Alice\""
4239+ , ", age = " <> D.dullyellow "42"
4240+ , ", height = " <> D.dullyellow "1.75"
41704241 , "}"
41714242 ]
41724243 , D.reflow $
@@ -4184,9 +4255,9 @@ addNoteForRecordIndentError normalRecommendation =
41844255 "I may be confused by indentation. For example, if you are trying to define\
41854256 \ a record across multiple lines, I recommend using this format:"
41864257 , D.indent 4 $ D.vcat $
4187− [ "{ name = \"Alice\""
4188− , ", age = 42"
4189− , ", height = 1.75"
4258+ [ "{ name = " <> D.dullyellow "\"Alice\""
4259+ , ", age = " <> D.dullyellow "42"
4260+ , ", height = " <> D.dullyellow "1.75"
41904261 , "}"
41914262 ]
41924263 , D.reflow $
@@ -4380,9 +4451,9 @@ toListReport source context list startRow startCol =
43804451 , D.toSimpleNote
43814452 "I recommend using the following format for lists that span multiple lines:"
43824453 , D.indent 4 $ D.vcat $
4383− [ "[ \"Alice\""
4384− , ", \"Bob\""
4385− , ", \"Chuck\""
4454+ [ "[ " <> D.dullyellow "\"Alice\""
4455+ , ", " <> D.dullyellow "\"Bob\""
4456+ , ", " <> D.dullyellow "\"Chuck\""
43864457 , "]"
43874458 ]
43884459 , D.reflow $
@@ -4440,9 +4511,9 @@ toListReport source context list startRow startCol =
44404511 "I may be confused by indentation. For example, if you are trying to define\
44414512 \ a list across multiple lines, I recommend using this format:"
44424513 , D.indent 4 $ D.vcat $
4443− [ "[ \"Alice\""
4444− , ", \"Bob\""
4445− , ", \"Chuck\""
4514+ [ "[ " <> D.dullyellow "\"Alice\""
4515+ , ", " <> D.dullyellow "\"Bob\""
4516+ , ", " <> D.dullyellow "\"Chuck\""
44464517 , "]"
44474518 ]
44484519 , D.reflow $
@@ -4471,9 +4542,9 @@ toListReport source context list startRow startCol =
44714542 "I may be confused by indentation. For example, if you are trying to define\
44724543 \ a list across multiple lines, I recommend using this format:"
44734544 , D.indent 4 $ D.vcat $
4474− [ "[ \"Alice\""
4475− , ", \"Bob\""
4476− , ", \"Chuck\""
4545+ [ "[ " <> D.dullyellow "\"Alice\""
4546+ , ", " <> D.dullyellow "\"Bob\""
4547+ , ", " <> D.dullyellow "\"Chuck\""
44774548 , "]"
44784549 ]
44794550 , D.reflow $
@@ -4499,9 +4570,9 @@ toListReport source context list startRow startCol =
44994570 , D.toSimpleNote
45004571 "I recommend using the following format for lists that span multiple lines:"
45014572 , D.indent 4 $ D.vcat $
4502− [ "[ \"Alice\""
4503− , ", \"Bob\""
4504− , ", \"Chuck\""
4573+ [ "[ " <> D.dullyellow "\"Alice\""
4574+ , ", " <> D.dullyellow "\"Bob\""
4575+ , ", " <> D.dullyellow "\"Chuck\""
45054576 , "]"
45064577 ]
45074578 , D.reflow $