aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Class.hs
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2016-11-27 15:32:28 -0500
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:40 +0100
commitb34bb8be015ab05f582bddf8f9acd2a5dbcce793 (patch)
tree1421ef0a4d9865752c652c152cf6356c0a809139 /src/Text/Pandoc/Class.hs
parent97be338188b19abbe9931a4e4b765d9fd14583a4 (diff)
downloadpandoc-b34bb8be015ab05f582bddf8f9acd2a5dbcce793.tar.gz
List derived instances vertically one-per-line for readability.
Diffstat (limited to 'src/Text/Pandoc/Class.hs')
-rw-r--r--src/Text/Pandoc/Class.hs16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Class.hs b/src/Text/Pandoc/Class.hs
index ab1cc32b8..bcd0d4172 100644
--- a/src/Text/Pandoc/Class.hs
+++ b/src/Text/Pandoc/Class.hs
@@ -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