@@ -612,8 +612,8 @@ toParseErrorReport source modul =
612612 [ D.reflow $
613613 "Here are some examples of valid `module` declarations:"
614614 , D.indent 4 $ D.vcat $
615− [ D.fillSep [D.blue "module","Main",D.blue "exposing","(..)"]
616− , D.fillSep [D.blue "module","Dict",D.blue "exposing","(Dict, empty, get)"]
615+ [ D.fillSep [D.cyan "module","Main",D.cyan "exposing","(..)"]
616+ , D.fillSep [D.cyan "module","Dict",D.cyan "exposing","(Dict, empty, get)"]
617617 ]
618618 , D.reflow $
619619 "I generally recommend using an explicit exposing list. I can skip compiling a bunch\
@@ -636,10 +636,10 @@ toParseErrorReport source modul =
636636 [ D.reflow $
637637 "I was expecting to see the module name next, like in these examples:"
638638 , D.indent 4 $ D.vcat $
639− [ D.fillSep [D.blue "module","Dict",D.blue "exposing","(..)"]
640− , D.fillSep [D.blue "module","Maybe",D.blue "exposing","(..)"]
641− , D.fillSep [D.blue "module","Html.Attributes",D.blue "exposing","(..)"]
642− , D.fillSep [D.blue "module","Json.Decode",D.blue "exposing","(..)"]
639+ [ D.fillSep [D.cyan "module","Dict",D.cyan "exposing","(..)"]
640+ , D.fillSep [D.cyan "module","Maybe",D.cyan "exposing","(..)"]
641+ , D.fillSep [D.cyan "module","Html.Attributes",D.cyan "exposing","(..)"]
642+ , D.fillSep [D.cyan "module","Json.Decode",D.cyan "exposing","(..)"]
643643 ]
644644 , D.reflow $
645645 "Notice that the module names all start with capital letters. That is required!"
@@ -663,8 +663,8 @@ toParseErrorReport source modul =
663663 [ D.reflow $
664664 "Here are some examples of valid `port module` declarations:"
665665 , D.indent 4 $ D.vcat $
666− [ D.fillSep [D.blue "port",D.blue "module","WebSockets",D.blue "exposing","(send, listen, keepAlive)"]
667− , D.fillSep [D.blue "port",D.blue "module","Maps",D.blue "exposing","(Location, goto)"]
666+ [ D.fillSep [D.cyan "port",D.cyan "module","WebSockets",D.cyan "exposing","(send, listen, keepAlive)"]
667+ , D.fillSep [D.cyan "port",D.cyan "module","Maps",D.cyan "exposing","(Location, goto)"]
668668 ]
669669 , D.link "Note" "Read" "ports" "for more help."
670670 ]
@@ -684,8 +684,8 @@ toParseErrorReport source modul =
684684 [ D.reflow $
685685 "I was expecting to see the module name next, like in these examples:"
686686 , D.indent 4 $ D.vcat $
687− [ D.fillSep [D.blue "port",D.blue "module","WebSockets",D.blue "exposing","(send, listen, keepAlive)"]
688− , D.fillSep [D.blue "port",D.blue "module","Maps",D.blue "exposing","(Location, goto)"]
687+ [ D.fillSep [D.cyan "port",D.cyan "module","WebSockets",D.cyan "exposing","(send, listen, keepAlive)"]
688+ , D.fillSep [D.cyan "port",D.cyan "module","Maps",D.cyan "exposing","(Location, goto)"]
689689 ]
690690 , D.reflow $
691691 "Notice that the module names start with capital letters. That is required!"
@@ -743,7 +743,7 @@ toParseErrorReport source modul =
743743 "I am not sure what is going on, but I recommend starting an Elm\
744744 \ file with the following lines:"
745745 , D.vcat
746− [ D.fillSep [D.blue "import","Html"]
746+ [ D.fillSep [D.cyan "import","Html"]
747747 , ""
748748 , D.fillSep [D.green "main","="]
749749 , D.indent 2 $ D.fillSep [D.cyan "Html" <> ".text",D.dullyellow "\"Hello!\""]
@@ -773,10 +773,10 @@ toParseErrorReport source modul =
773773 [ D.reflow $
774774 "I was expecting to see a module name next, like in these examples:"
775775 , D.indent 4 $ D.vcat $
776− [ D.fillSep [D.blue "import","Dict"]
777− , D.fillSep [D.blue "import","Maybe"]
778− , D.fillSep [D.blue "import","Html.Attributes"]
779− , D.fillSep [D.blue "import","Json.Decode"]
776+ [ D.fillSep [D.cyan "import","Dict"]
777+ , D.fillSep [D.cyan "import","Maybe"]
778+ , D.fillSep [D.cyan "import","Html.Attributes"]
779+ , D.fillSep [D.cyan "import","Json.Decode"]
780780 ]
781781 , D.reflow $
782782 "Notice that the module names all start with capital letters. That is required!"
@@ -800,9 +800,9 @@ toParseErrorReport source modul =
800800 [ D.reflow $
801801 "I was expecting to see an alias next, like in these examples:"
802802 , D.indent 4 $ D.vcat $
803− [ D.fillSep [D.blue "import","Html.Attributes",D.blue "as","Attr"]
804− , D.fillSep [D.blue "import","WebGL.Texture",D.blue "as","Texture"]
805− , D.fillSep [D.blue "import","Json.Decode",D.blue "as","D"]
803+ [ D.fillSep [D.cyan "import","Html.Attributes",D.cyan "as","Attr"]
804+ , D.fillSep [D.cyan "import","WebGL.Texture",D.cyan "as","Texture"]
805+ , D.fillSep [D.cyan "import","Json.Decode",D.cyan "as","D"]
806806 ]
807807 , D.reflow $
808808 "Notice that the alias always starts with a capital letter. That is required!"
@@ -839,8 +839,8 @@ toParseErrorReport source modul =
839839 "I was expecting to see the list of exposed values next. For example, here\
840840 \ are two ways to expose values from the `Html` module:"
841841 , D.indent 4 $ D.vcat $
842− [ D.fillSep [D.blue "import","Html",D.blue "exposing","(..)"]
843− , D.fillSep [D.blue "import","Html",D.blue "exposing","(Html, div, text)"]
842+ [ D.fillSep [D.cyan "import","Html",D.cyan "exposing","(..)"]
843+ , D.fillSep [D.cyan "import","Html",D.cyan "exposing","(Html, div, text)"]
844844 ]
845845 , D.reflow $
846846 "I generally recommend the second style. It is more explicit, making it\
@@ -886,10 +886,10 @@ toImportReport source row col =
886886 [ D.reflow $
887887 "Here are some examples of valid `import` declarations:"
888888 , D.indent 4 $ D.vcat $
889− [ D.fillSep [D.blue "import","Html"]
890− , D.fillSep [D.blue "import","Html",D.blue "as","H"]
891− , D.fillSep [D.blue "import","Html",D.blue "exposing","(Html, div, text)"]
892− , D.fillSep [D.blue "import","Html",D.blue "as","H",D.blue "exposing","(..)"]
889+ [ D.fillSep [D.cyan "import","Html"]
890+ , D.fillSep [D.cyan "import","Html",D.cyan "as","H"]
891+ , D.fillSep [D.cyan "import","Html",D.cyan "as","H",D.cyan "exposing","(..)"]
892+ , D.fillSep [D.cyan "import","Html",D.cyan "exposing","(Html, div, text)"]
893893 ]
894894 , D.reflow $
895895 "You are probably trying to import a different module, but try to make it look like one of these examples!"
@@ -1019,9 +1019,6 @@ toDeclDefReport source name declDef startRow startCol =
10191019
10201020 DeclDefNameMatch defName row col ->
10211021 let
1022− expected = Name.toChars name
1023− actual = Name.toChars defName
1024−
10251022 surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
10261023 region = toRegion row col
10271024 in
@@ -1029,13 +1026,13 @@ toDeclDefReport source name declDef startRow startCol =
10291026 Code.toSnippet source surroundings (Just region)
10301027 (
10311028 D.reflow $
1032− "I got stuck after parsing the `" ++ expected ++ "` type annotation:"
1029+ "I just saw a type annotation for `" ++ Name.toChars name ++ "`, but it is followed by a definition for `" ++ Name.toChars defName ++ "`:"
10331030 ,
10341031 D.stack
10351032 [ D.reflow $
1036− "I am seeing `" ++ actual ++ "` defined next. These names do not match! Is there a typo?"
1033+ "These names do not match! Is there a typo?"
10371034 , D.indent 4 $ D.fillSep $
1038− [D.dullyellow (D.fromChars actual),"->",D.green (D.fromChars expected)]
1035+ [D.dullyellow (D.fromName defName),"->",D.green (D.fromName name)]
10391036 ]
10401037 )
10411038