@@ -3,7 +3,6 @@
33{-# LANGUAGE FlexibleInstances #-}
44{-# LANGUAGE GeneralizedNewtypeDeriving #-}
55{-# LANGUAGE MultiParamTypeClasses #-}
6−{-# LANGUAGE TemplateHaskell #-}
76{-# LANGUAGE TypeFamilies #-}
87{-# LANGUAGE UndecidableInstances #-}
98
@@ -26,19 +25,6 @@ module Control.Monad.Trans.PagerDuty
2625 -- * Running
2726 , runPagerDutyT
2827
29− -- * Configuration
30− -- ** Environment
31− , Env
32− , envDomain
33− , envAuth
34− , envManager
35− , envLogger
36− , scoped
37−
38− -- ** Logging
39− , Logger (..)
40− , debug
41−
4228 -- * Integration events
4329 , submit
4430 , submitCatch
@@ -49,30 +35,11 @@ module Control.Monad.Trans.PagerDuty
4935 , paginate
5036 , paginateCatch
5137
52− -- * Errors
53− , Error(..)
54− , _Internal
55− , _Integration
56− , _REST
57−
58− -- ** Integration
59− , IntegrationError
60− , status
61−
62− -- ** REST
63− , RESTError
64− , code
65−
66− -- ** Code
67− , Code (..)
68− , description
69−
70− -- ** Fields
71− , message
72− , errors
73−
74− -- ** Lifting
38+ -- ** Lifting errors
7539 , hoistError
40+
41+ -- * Re-exported types
42+ , module Network.PagerDuty.Types
7643 ) where
7744
7845import Control.Applicative
@@ -88,6 +55,7 @@ import Network.PagerDuty.Integration (Event, Response)
8855import qualified Network.PagerDuty.Integration as Int
8956import Network.PagerDuty.Internal.Types
9057import qualified Network.PagerDuty.REST as REST
58+import Network.PagerDuty.Types
9159
9260-- | A convenient alias for 'PagerDutyT' 'IO'.
9361type PagerDuty s = PagerDutyT s IO
@@ -114,28 +82,24 @@ instance MonadBase b m => MonadBase b (PagerDutyT s m) where
11482 {-# INLINE liftBase #-}
11583
11684instance MonadTransControl (PagerDutyT s) where
117− newtype StT (PagerDutyT s) a = StTPDT
118− { unStT :: StT (ExceptT Error) (StT (ReaderT (Env s)) a)
119− }
85+ type StT (PagerDutyT s) a = StT (ExceptT Error) (StT (ReaderT (Env s)) a)
12086
12187 liftWith f = PagerDutyT $
12288 liftWith $ \g ->
123− liftWith $ \h ->
124− f (liftM StTPDT . h . g . unPagerDutyT)
89+ liftWith $ \h ->
90+ f (h . g . unPagerDutyT)
12591 {-# INLINE liftWith #-}
12692
12793 restoreT = PagerDutyT . restoreT . restoreT . liftM unStT
12894 {-# INLINE restoreT #-}
12995
13096instance MonadBaseControl b m => MonadBaseControl b (PagerDutyT s m) where
131− newtype StM (PagerDutyT s m) a = StMPDT
132− { unStMPDT :: ComposeSt (PagerDutyT s) m a
133− }
97+ type StM (PagerDutyT s m) a = ComposeSt (PagerDutyT s) m a
13498
135− liftBaseWith = defaultLiftBaseWith StMPDT
99+ liftBaseWith = defaultLiftBaseWith
136100 {-# INLINE liftBaseWith #-}
137101
138− restoreM = defaultRestoreM unStMPDT
102+ restoreM = defaultRestoreM
139103 {-# INLINE restoreM #-}
140104
141105instance MFunctor (PagerDutyT s) where