on master help sign in
update for new names and new encoding primitives
commit641600ae06d065b7c4fef17313309f63630b3405 authorEvan Czaplicki <evancz@users.noreply.github.com> dateMon 3 Jun 2019, 14:19 (7 years ago) parent9307149
2 files changed+6−7
builder/src/Reporting.hs+2−2 builder/src/Reporting/Exit/Help.hs+4−5
builder/src/Reporting.hs+2−2
@@ -252,8 +252,8 @@ putDownload :: D.Doc -> Pkg.Name -> V.Version -> IO ()
252252putDownload mark pkg vsn =
253253 Help.toStdout $ D.indent 2 $
254254 mark
255− <+> D.fromUtf8 (Pkg.toString pkg)
256− <+> D.fromUtf8 (V.toString vsn)
255+ <+> D.fromPackage pkg
256+ <+> D.fromVersion vsn
257257 <> "\n"
258258
259259
builder/src/Reporting/Exit/Help.hs+4−5
@@ -14,7 +14,6 @@ module Reporting.Exit.Help
1414 where
1515
1616
17−import qualified Data.Utf8 as Utf8
1817import GHC.IO.Handle (hIsTerminalDevice)
1918import System.IO (Handle, hPutStr, stderr, stdout)
2019
@@ -97,15 +96,15 @@ reportToJson report_ =
9796 case report_ of
9897 CompilerReport e es ->
9998 E.object
100− [ "type" ==> E.string "compile-errors"
99+ [ "type" ==> E.chars "compile-errors"
101100 , "errors" ==> E.list Error.toJson (e:es)
102101 ]
103102
104103 Report title maybePath message ->
105104 E.object
106− [ "type" ==> E.string "error"
107− , "path" ==> maybe E.null (E.string . Utf8.fromChars) maybePath
108− , "title" ==> E.string (Utf8.fromChars title)
105+ [ "type" ==> E.chars "error"
106+ , "path" ==> maybe E.null E.chars maybePath
107+ , "title" ==> E.chars title
109108 , "message" ==> D.encode message
110109 ]
111110