@@ -6,7 +6,21 @@
66{-# LANGUAGE DataKinds #-}
77{-# LANGUAGE TypeOperators #-}
88{-# LANGUAGE GeneralizedNewtypeDeriving #-}
9−module Control.Monad.Trans.Ether.Reader where
9+module Control.Monad.Trans.Ether.Reader
10+ ( EtherReaderT
11+ , EtherReader
12+ , ReaderT'
13+ , Reader'
14+ , runEtherReaderT
15+ , runEtherReader
16+ , runReaderT'
17+ , runReader'
18+ --
19+ , etherReaderT
20+ , mapEtherReaderT
21+ , liftCatch
22+ , liftCallCC
23+ ) where
1024
1125import Data.Proxy (Proxy(Proxy))
1226import Data.Functor.Identity (Identity(..))
@@ -54,10 +68,13 @@ liftCatch _proxy f m h = EtherReaderT $ R.liftCatch f (coerce m) (coerce h)
5468liftCallCC :: proxy tag -> Sig.CallCC m a b -> Sig.CallCC (EtherReaderT tag r m) a b
5569liftCallCC _proxy callCC f = EtherReaderT $ R.liftCallCC callCC (coerce f)
5670
57−runReaderT' :: EtherReaderT r r m a -> r -> m a
71+type ReaderT' r = EtherReaderT r r
72+type Reader' r = EtherReader r r
73+
74+runReaderT' :: ReaderT' r m a -> r -> m a
5875runReaderT' = runEtherReaderT Proxy
5976
60−runReader' :: EtherReader r r a -> r -> a
77+runReader' :: Reader' r a -> r -> a
6178runReader' m r = runIdentity (runEtherReaderT Proxy m r)
6279
6380-- Instances for mtl classes