@@ -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