@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
21{-# LANGUAGE TemplateHaskell #-}
32
43module Control.EnvT
@@ -19,10 +18,6 @@ import Control.Monad.Reader as X
1918import Control.Monad.Trans.Control
2019import Control.Monad.Trans.Resource
2120import Control.Monad.Zip
22−#ifndef ghcjs_HOST_OS
23−import Katip
24−import Katip.Monadic
25−#endif
2621
2722
2823-- | The only reason this exists is that there are a lot of instances for
@@ -63,27 +58,5 @@ execEnvT :: forall r m a. r -> EnvT r m a -> m a
6358execEnvT = flip runEnvT
6459{-# INLINE execEnvT #-}
6560
66−#ifndef ghcjs_HOST_OS
67−-- FIXME: These lens should probably be moved into a separate package
68−-- or sent to upstream katip.
69−makeLensesFor
70− [ ("ltsLogEnv", "_ltsLogEnv")
71− , ("ltsContext", "_ltsContext")
72− , ("ltsNamespace", "_ltsNamespace")
73− ] ''KatipContextTState
74−
75−instance (Has KatipContextTState r, MonadIO m)
76− => KatipContext (EnvT r m) where
77− getKatipContext = view $ part . _ltsContext
78− localKatipContext f = local (part . _ltsContext %~ f)
79− getKatipNamespace = view $ part . _ltsNamespace
80− localKatipNamespace f = local (part . _ltsNamespace %~ f)
81−
82−instance (Has KatipContextTState r, MonadIO m)
83− => Katip (EnvT r m) where
84− getLogEnv = view $ part . _ltsLogEnv
85− localLogEnv f = local (part . _ltsLogEnv %~ f)
86−#endif
87−
8861instance MonadResource m => MonadResource (EnvT r m) where
8962 liftResourceT = lift . liftResourceT