on master help sign in
Switch the top bar to dull cyan, like in the real errors
commit4290da54d02a7119ebc35ec4b9ab886ac45836bd authorEvan Czaplicki <evancz@users.noreply.github.com> dateSun 8 Apr 2018, 14:32 (9 years ago) parent9850e43
1 file changed+32−1
ui/browser/src/Errors.elm+32−1
ui/browser/src/Errors.elm+32−1
@@ -88,11 +88,42 @@ viewProblem filePath problem =
8888 "-- " ++ problem.title ++ " " ++ String.padLeft leftover '-' (" " ++ filePath) ++ "\n\n"
8989 in
9090 span []
91− ( span [ style "color" "cyan" ] [ text header ]
91+ ( span [ style "color" "rgb(51,187,200)" ] [ text header ]
9292 :: viewMessage problem.message
9393 )
9494
9595
96+{-
97+toDocHelp :: Exit -> [Exit] -> [D.Doc]
98+toDocHelp e1 exits =
99+ case exits of
100+ [] ->
101+ [exitToDoc e1]
102+
103+ e2 : otherErrors ->
104+ exitToDoc e1 : separator (_name e1) (_name e2) : toDocHelp e2 otherErrors
105+
106+
107+exitToDoc :: Exit -> D.Doc
108+exitToDoc (Exit _name path _time source errors) =
109+ Compiler.errorsToDoc path source errors
110+
111+
112+separator :: Module.Raw -> Module.Raw -> D.Doc
113+separator beforeName afterName =
114+ let
115+ before = Module.nameToString beforeName ++ " ↑ "
116+ after = " ↓ " ++ Module.nameToString afterName
117+ in
118+ D.dullred $ D.vcat $
119+ [ D.indent (80 - length before) (D.fromString before)
120+ , "====o======================================================================o===="
121+ , D.fromString after
122+ , D.empty
123+ , D.empty
124+ ]
125+-}
126+
96127
97128-- VIEW MESSAGE
98129