on master help sign in
Explicit export lists
commitd8b183bd01f181077729fdc52bd50e086b863b9a authorIndex Int <vlad.z.4096@gmail.com> dateMon 8 Jun 2015, 13:11 (11 years ago) parentf5c0582
2 files changed+38−5
src/Control/Monad/Ether/Reader.hs+18−2 src/Control/Monad/Trans/Ether/Reader.hs+20−3
src/Control/Monad/Ether/Reader.hs+18−2
@@ -10,8 +10,24 @@
1010{-# LANGUAGE ScopedTypeVariables #-}
1111{-# LANGUAGE GeneralizedNewtypeDeriving #-}
1212module Control.Monad.Ether.Reader
13− ( module Control.Monad.Ether.Reader
14− , module Control.Monad.Trans.Ether.Reader
13+ ( EtherReaderT
14+ , EtherReader
15+ , ReaderT'
16+ , Reader'
17+ , runEtherReaderT
18+ , runEtherReader
19+ , runReaderT'
20+ , runReader'
21+ --
22+ , MonadEtherReader
23+ , etherLocal
24+ , etherAsk
25+ , etherReader
26+ --
27+ , MonadReader'
28+ , local'
29+ , ask'
30+ , reader'
1531 ) where
1632
1733import Data.Proxy (Proxy(Proxy))
src/Control/Monad/Trans/Ether/Reader.hs+20−3
@@ -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