| License | GPL-3.0-or-later |
|---|---|
| Safe Haskell | None |
| Language | Haskell2010 |
CabalFmt.Monad
Description
Copyright: Oleg Grenrus
Synopsis
- class (HasOptions r, MonadReader r m, MonadError Error m) => MonadCabalFmt r m | m -> r where
- listDirectory :: FilePath -> m [FilePath]
- doesDirectoryExist :: FilePath -> m Bool
- displayWarning :: String -> m ()
- getFiles :: MonadCabalFmt r m => FilePath -> m [FilePath]
- data CabalFmt a
- runCabalFmt :: Options -> CabalFmt a -> Either Error a
- data CabalFmtIO a
- runCabalFmtIO :: Maybe FilePath -> Options -> CabalFmtIO a -> IO (Either Error a)
Monad class
class (HasOptions r, MonadReader r m, MonadError Error m) => MonadCabalFmt r m | m -> r where Source #
Methods
listDirectory :: FilePath -> m [FilePath] Source #
doesDirectoryExist :: FilePath -> m Bool Source #
displayWarning :: String -> m () Source #
Instances
| MonadCabalFmt Options CabalFmt Source # | |
Defined in CabalFmt.Monad | |
Pure implementation
Pure MonadCabalFmt.
listDirectory always return empty list.
Instances
| Monad CabalFmt Source # | |
| Functor CabalFmt Source # | |
| Applicative CabalFmt Source # | |
| MonadReader Options CabalFmt Source # | |
| MonadError Error CabalFmt Source # | |
Defined in CabalFmt.Monad Methods throwError :: Error -> CabalFmt a # catchError :: CabalFmt a -> (Error -> CabalFmt a) -> CabalFmt a # | |
| MonadCabalFmt Options CabalFmt Source # | |
Defined in CabalFmt.Monad | |
IO implementation
data CabalFmtIO a Source #
Instances
runCabalFmtIO :: Maybe FilePath -> Options -> CabalFmtIO a -> IO (Either Error a) Source #