cabal-fmt-0.1.1: Format .cabal files

LicenseGPL-3.0-or-later
Safe HaskellNone
LanguageHaskell2010

CabalFmt.Monad

Contents

Description

Copyright: Oleg Grenrus

Synopsis

Monad class

Pure implementation

data CabalFmt a Source #

Pure MonadCabalFmt.

listDirectory always return empty list.

Instances
Monad CabalFmt Source # 
Instance details

Defined in CabalFmt.Monad

Methods

(>>=) :: CabalFmt a -> (a -> CabalFmt b) -> CabalFmt b #

(>>) :: CabalFmt a -> CabalFmt b -> CabalFmt b #

return :: a -> CabalFmt a #

fail :: String -> CabalFmt a #

Functor CabalFmt Source # 
Instance details

Defined in CabalFmt.Monad

Methods

fmap :: (a -> b) -> CabalFmt a -> CabalFmt b #

(<$) :: a -> CabalFmt b -> CabalFmt a #

Applicative CabalFmt Source # 
Instance details

Defined in CabalFmt.Monad

Methods

pure :: a -> CabalFmt a #

(<*>) :: CabalFmt (a -> b) -> CabalFmt a -> CabalFmt b #

liftA2 :: (a -> b -> c) -> CabalFmt a -> CabalFmt b -> CabalFmt c #

(*>) :: CabalFmt a -> CabalFmt b -> CabalFmt b #

(<*) :: CabalFmt a -> CabalFmt b -> CabalFmt a #

MonadCabalFmt CabalFmt Source # 
Instance details

Defined in CabalFmt.Monad

MonadReader Options CabalFmt Source # 
Instance details

Defined in CabalFmt.Monad

Methods

ask :: CabalFmt Options #

local :: (Options -> Options) -> CabalFmt a -> CabalFmt a #

reader :: (Options -> a) -> CabalFmt a #

MonadError Error CabalFmt Source # 
Instance details

Defined in CabalFmt.Monad

Methods

throwError :: Error -> CabalFmt a #

catchError :: CabalFmt a -> (Error -> CabalFmt a) -> CabalFmt a #

IO implementation

data CabalFmtIO a Source #

Instances
Monad CabalFmtIO Source # 
Instance details

Defined in CabalFmt.Monad

Methods

(>>=) :: CabalFmtIO a -> (a -> CabalFmtIO b) -> CabalFmtIO b #

(>>) :: CabalFmtIO a -> CabalFmtIO b -> CabalFmtIO b #

return :: a -> CabalFmtIO a #

fail :: String -> CabalFmtIO a #

Functor CabalFmtIO Source # 
Instance details

Defined in CabalFmt.Monad

Methods

fmap :: (a -> b) -> CabalFmtIO a -> CabalFmtIO b #

(<$) :: a -> CabalFmtIO b -> CabalFmtIO a #

Applicative CabalFmtIO Source # 
Instance details

Defined in CabalFmt.Monad

Methods

pure :: a -> CabalFmtIO a #

(<*>) :: CabalFmtIO (a -> b) -> CabalFmtIO a -> CabalFmtIO b #

liftA2 :: (a -> b -> c) -> CabalFmtIO a -> CabalFmtIO b -> CabalFmtIO c #

(*>) :: CabalFmtIO a -> CabalFmtIO b -> CabalFmtIO b #

(<*) :: CabalFmtIO a -> CabalFmtIO b -> CabalFmtIO a #

MonadIO CabalFmtIO Source # 
Instance details

Defined in CabalFmt.Monad

Methods

liftIO :: IO a -> CabalFmtIO a #

MonadCabalFmt CabalFmtIO Source # 
Instance details

Defined in CabalFmt.Monad

MonadReader Options CabalFmtIO Source # 
Instance details

Defined in CabalFmt.Monad

MonadError Error CabalFmtIO Source # 
Instance details

Defined in CabalFmt.Monad