module Logging.Deprecated
( runJson
, jsonToManager
) where
import Data.Aeson
import Logging.Aeson
import Logging.Internal
import Logging.Types
{-# DEPRECATED runJson "will be removed in 1.0.0" #-}
runJson :: Value -> IO a -> IO a
runJson v io = sequence (fromJSON v) >>= \result ->
case result of
Error _ -> error "Logging.Aeson: no parse (manager)"
Success mgr -> run mgr io
{-# DEPRECATED jsonToManager "will be removed in 1.0.0" #-}
jsonToManager :: Value -> IO Manager
jsonToManager v = sequence (fromJSON v) >>= \result ->
case result of
Error _ -> error "Logging.Aeson: no parse (manager)"
Success mgr -> return mgr