on master help sign in
add some missing lazy/strict instances
commit141a6b11f0ab283e79a849582d300be6dd3e1880 authorMichael Xavier <michael@michaelxavier.net> dateMon 26 Jun 2017, 14:18 (9 years ago) parent551689b
1 file changed+17−3
katip/src/Katip/Core.hs+17−3
katip/src/Katip/Core.hs+17−3
@@ -35,8 +35,12 @@ import Control.Monad.Trans.Except
3535import Control.Monad.Trans.Maybe
3636import Control.Monad.Trans.Reader
3737import Control.Monad.Trans.Resource
38−import Control.Monad.Trans.State
39−import Control.Monad.Trans.Writer
38+import Control.Monad.Trans.State.Lazy (StateT)
39+import qualified Control.Monad.Trans.State.Strict as Strict (StateT)
40+import Control.Monad.Trans.Writer.Lazy (WriterT)
41+import qualified Control.Monad.Trans.Writer.Strict as Strict (WriterT)
42+import Control.Monad.Trans.RWS.Lazy (RWST)
43+import qualified Control.Monad.Trans.RWS.Strict as Strict (RWST)
4044import Data.Aeson (FromJSON (..), ToJSON (..),
4145 object)
4246import qualified Data.Aeson as A
@@ -623,14 +627,24 @@ instance Katip m => Katip (ExceptT s m) where
623627instance Katip m => Katip (MaybeT m) where
624628 getLogEnv = lift getLogEnv
625629
626−
627630instance Katip m => Katip (StateT s m) where
628631 getLogEnv = lift getLogEnv
629632
633+instance (Katip m, Monoid w) => Katip (RWST r w s m) where
634+ getLogEnv = lift getLogEnv
635+
636+instance (Katip m, Monoid w) => Katip (Strict.RWST r w s m) where
637+ getLogEnv = lift getLogEnv
638+
639+instance Katip m => Katip (Strict.StateT s m) where
640+ getLogEnv = lift getLogEnv
630641
631642instance (Katip m, Monoid s) => Katip (WriterT s m) where
632643 getLogEnv = lift getLogEnv
633644
645+instance (Katip m, Monoid s) => Katip (Strict.WriterT s m) where
646+ getLogEnv = lift getLogEnv
647+
634648instance (Katip m) => Katip (ResourceT m) where
635649 getLogEnv = lift getLogEnv
636650