@@ -6,7 +6,21 @@
6{-# LANGUAGE DataKinds #-}
6{-# LANGUAGE DataKinds #-}
7{-# LANGUAGE TypeOperators #-}
7{-# LANGUAGE TypeOperators #-}
8{-# LANGUAGE GeneralizedNewtypeDeriving #-}
8{-# LANGUAGE GeneralizedNewtypeDeriving #-}
9−module Control.Monad.Trans.Ether.Reader where
9+module Control.Monad.Trans.Ether.Reader
11import Data.Proxy (Proxy(Proxy))
25import Data.Proxy (Proxy(Proxy))
12import Data.Functor.Identity (Identity(..))
26import Data.Functor.Identity (Identity(..))
@@ -54,10 +68,13 @@ liftCatch _proxy f m h = EtherReaderT $ R.liftCatch f (coerce m) (coerce h)
54liftCallCC :: proxy tag -> Sig.CallCC m a b -> Sig.CallCC (EtherReaderT tag r m) a b
68liftCallCC :: proxy tag -> Sig.CallCC m a b -> Sig.CallCC (EtherReaderT tag r m) a b
55liftCallCC _proxy callCC f = EtherReaderT $ R.liftCallCC callCC (coerce f)
69liftCallCC _proxy callCC f = EtherReaderT $ R.liftCallCC callCC (coerce f)
71+type ReaderT' r = EtherReaderT r r
72+type Reader' r = EtherReader r r
57−runReaderT' :: EtherReaderT r r m a -> r -> m a
74+runReaderT' :: ReaderT' r m a -> r -> m a
58runReaderT' = runEtherReaderT Proxy
75runReaderT' = runEtherReaderT Proxy
60−runReader' :: EtherReader r r a -> r -> a
77+runReader' :: Reader' r a -> r -> a
61runReader' m r = runIdentity (runEtherReaderT Proxy m r)
78runReader' m r = runIdentity (runEtherReaderT Proxy m r)
63-- Instances for mtl classes
80-- Instances for mtl classes