on master help sign in
update for new names and new encoding primitives
641600aEvan Czaplicki
builder/src/Reporting.hs+2−2
@@ -252,8 +252,8 @@ putDownload :: D.Doc -> Pkg.Name -> V.Version -> IO ()
252putDownload mark pkg vsn =
252putDownload mark pkg vsn =
253 Help.toStdout $ D.indent 2 $
253 Help.toStdout $ D.indent 2 $
254 mark
254 mark
255− <+> D.fromUtf8 (Pkg.toString pkg)
255+ <+> D.fromPackage pkg
256− <+> D.fromUtf8 (V.toString vsn)
256+ <+> D.fromVersion vsn
257 <> "\n"
257 <> "\n"
258
258
259
259
builder/src/Reporting/Exit/Help.hs+4−5
@@ -14,7 +14,6 @@ module Reporting.Exit.Help
14 where
14 where
15
15
16
16
17−import qualified Data.Utf8 as Utf8
18import GHC.IO.Handle (hIsTerminalDevice)
17import GHC.IO.Handle (hIsTerminalDevice)
19import System.IO (Handle, hPutStr, stderr, stdout)
18import System.IO (Handle, hPutStr, stderr, stdout)
20
19
@@ -97,15 +96,15 @@ reportToJson report_ =
97 case report_ of
96 case report_ of
98 CompilerReport e es ->
97 CompilerReport e es ->
99 E.object
98 E.object
100− [ "type" ==> E.string "compile-errors"
99+ [ "type" ==> E.chars "compile-errors"
101 , "errors" ==> E.list Error.toJson (e:es)
100 , "errors" ==> E.list Error.toJson (e:es)
102 ]
101 ]
103
102
104 Report title maybePath message ->
103 Report title maybePath message ->
105 E.object
104 E.object
106− [ "type" ==> E.string "error"
105+ [ "type" ==> E.chars "error"
107− , "path" ==> maybe E.null (E.string . Utf8.fromChars) maybePath
106+ , "path" ==> maybe E.null E.chars maybePath
108− , "title" ==> E.string (Utf8.fromChars title)
107+ , "title" ==> E.chars title
109 , "message" ==> D.encode message
108 , "message" ==> D.encode message
110 ]
109 ]
111
110