List derived instances vertically one-per-line for readability.
This commit is contained in:
parent
97be338188
commit
b34bb8be01
1 changed files with 14 additions and 2 deletions
|
@ -139,7 +139,13 @@ runIOorExplode ma = do
|
|||
|
||||
newtype PandocIO a = PandocIO {
|
||||
unPandocIO :: ExceptT PandocExecutionError (StateT PandocStateIO IO) a
|
||||
} deriving (MonadIO, Functor, Applicative, Monad, MonadState PandocStateIO, MonadError PandocExecutionError)
|
||||
} deriving ( MonadIO
|
||||
, Functor
|
||||
, Applicative
|
||||
, Monad
|
||||
, MonadState PandocStateIO
|
||||
, MonadError PandocExecutionError
|
||||
)
|
||||
|
||||
instance PandocMonad PandocIO where
|
||||
lookupEnv = liftIO . IO.lookupEnv
|
||||
|
@ -219,7 +225,13 @@ instance E.Exception PandocExecutionError
|
|||
newtype PandocPure a = PandocPure {
|
||||
unPandocPure :: ExceptT PandocExecutionError
|
||||
(ReaderT PureEnv (State PureState)) a
|
||||
} deriving (Functor, Applicative, Monad, MonadReader PureEnv, MonadState PureState, MonadError PandocExecutionError)
|
||||
} deriving ( Functor
|
||||
, Applicative
|
||||
, Monad
|
||||
, MonadReader PureEnv
|
||||
, MonadState PureState
|
||||
, MonadError PandocExecutionError
|
||||
)
|
||||
|
||||
runPure :: PandocPure a -> Either PandocExecutionError a
|
||||
runPure x = flip evalState def $ flip runReaderT def $ runExceptT $ unPandocPure x
|
||||
|
|
Loading…
Add table
Reference in a new issue