@@ -1,6 +1,7 @@
1{-# LANGUAGE BangPatterns, OverloadedStrings #-}
1{-# LANGUAGE BangPatterns, OverloadedStrings #-}
2module Reporting
2module Reporting
@@ -49,10 +50,16 @@ import qualified Reporting.Exit.Help as Help
53 | Terminal (MVar ())
55 | Terminal (MVar ())
56json :: Style
63json :: Style
@@ -84,6 +91,9 @@ attemptWithStyle style toReport work =
84 Right a -> return a
91 Right a -> return a
86 case style of
93 case style of
88 do B.hPutBuilder stderr (Encode.encodeUgly (Exit.toJson (toReport x)))
98 do B.hPutBuilder stderr (Encode.encodeUgly (Exit.toJson (toReport x)))
89 Exit.exitFailure
99 Exit.exitFailure
@@ -168,6 +178,9 @@ type DKey = Key DMsg
168trackDetails :: Style -> (DKey -> IO a) -> IO a
178trackDetails :: Style -> (DKey -> IO a) -> IO a
169trackDetails style callback =
179trackDetails style callback =
170 case style of
180 case style of
182+ callback (Key (\_ -> return ()))
172 callback (Key (\_ -> return ()))
185 callback (Key (\_ -> return ()))
@@ -297,6 +310,9 @@ type BResult a = Either Exit.BuildProblem a
297trackBuild :: Style -> (BKey -> IO (BResult a)) -> IO (BResult a)
310trackBuild :: Style -> (BKey -> IO (BResult a)) -> IO (BResult a)
298trackBuild style callback =
311trackBuild style callback =
299 case style of
312 case style of
314+ callback (Key (\_ -> return ()))
301 callback (Key (\_ -> return ()))
317 callback (Key (\_ -> return ()))
@@ -366,6 +382,9 @@ toFinalMessage done result =
366reportGenerate :: Style -> NE.List ModuleName.Raw -> FilePath -> IO ()
382reportGenerate :: Style -> NE.List ModuleName.Raw -> FilePath -> IO ()
367reportGenerate style names output =
383reportGenerate style names output =
368 case style of
384 case style of
370 return ()
389 return ()