cabal-fmt-0.1.12: Format .cabal files
CopyrightOleg Grenrus
LicenseGPL-3.0-or-later
Safe HaskellSafe-Inferred
LanguageHaskell2010

CabalFmt.Monad

Description

 
Synopsis

Monad class

class (HasOptions r, MonadReader r m, MonadError Error m) => MonadCabalFmt r m | m -> r where Source #

cabal-fmt interface.

Pure implementation

data CabalFmt a Source #

Pure MonadCabalFmt.

listDirectory always return empty list.

Instances

Instances details
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 #

Functor CabalFmt Source # 
Instance details

Defined in CabalFmt.Monad

Methods

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

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

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 #

MonadCabalFmt Options CabalFmt Source # 
Instance details

Defined in CabalFmt.Monad

MonadError Error CabalFmt Source # 
Instance details

Defined in CabalFmt.Monad

Methods

throwError :: Error -> CabalFmt a #

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

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 #

IO implementation

data CabalFmtIO a Source #

Instances

Instances details
MonadIO CabalFmtIO Source # 
Instance details

Defined in CabalFmt.Monad

Methods

liftIO :: IO a -> 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 #

Functor CabalFmtIO Source # 
Instance details

Defined in CabalFmt.Monad

Methods

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

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

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 #

MonadError Error CabalFmtIO Source # 
Instance details

Defined in CabalFmt.Monad