Copyright | Oleg Grenrus |
---|---|
License | GPL-3.0-or-later |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- class (HasOptions r, MonadReader r m, MonadError Error m) => MonadCabalFmt r m | m -> r where
- listDirectory :: FilePath -> m [FilePath]
- doesDirectoryExist :: FilePath -> m Bool
- readFileBS :: FilePath -> m Contents
- displayWarning :: String -> m ()
- getFiles :: MonadCabalFmt r m => FilePath -> m [FilePath]
- data Contents
- data CabalFmt a
- runCabalFmt :: Map FilePath ByteString -> Options -> CabalFmt a -> Either Error (a, [String])
- 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 #
listDirectory :: FilePath -> m [FilePath] Source #
doesDirectoryExist :: FilePath -> m Bool Source #
readFileBS :: FilePath -> m Contents Source #
displayWarning :: String -> m () Source #
Instances
MonadCabalFmt Options CabalFmt Source # | |
Defined in CabalFmt.Monad |
Pure implementation
Pure MonadCabalFmt
.
listDirectory
always return empty list.
Instances
Applicative CabalFmt Source # | |
Functor CabalFmt Source # | |
Monad CabalFmt Source # | |
MonadCabalFmt Options CabalFmt Source # | |
Defined in CabalFmt.Monad | |
MonadError Error CabalFmt Source # | |
Defined in CabalFmt.Monad throwError :: Error -> CabalFmt a # catchError :: CabalFmt a -> (Error -> CabalFmt a) -> CabalFmt a # | |
MonadReader Options CabalFmt Source # | |
runCabalFmt :: Map FilePath ByteString -> Options -> CabalFmt a -> Either Error (a, [String]) Source #
IO implementation
data CabalFmtIO a Source #
Instances
MonadIO CabalFmtIO Source # | |
Defined in CabalFmt.Monad liftIO :: IO a -> CabalFmtIO a # | |
Applicative CabalFmtIO Source # | |
Defined in CabalFmt.Monad 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 # | |
Defined in CabalFmt.Monad fmap :: (a -> b) -> CabalFmtIO a -> CabalFmtIO b # (<$) :: a -> CabalFmtIO b -> CabalFmtIO a # | |
Monad CabalFmtIO Source # | |
Defined in CabalFmt.Monad (>>=) :: CabalFmtIO a -> (a -> CabalFmtIO b) -> CabalFmtIO b # (>>) :: CabalFmtIO a -> CabalFmtIO b -> CabalFmtIO b # return :: a -> CabalFmtIO a # | |
MonadError Error CabalFmtIO Source # | |
Defined in CabalFmt.Monad throwError :: Error -> CabalFmtIO a # catchError :: CabalFmtIO a -> (Error -> CabalFmtIO a) -> CabalFmtIO a # |
runCabalFmtIO :: Maybe FilePath -> Options -> CabalFmtIO a -> IO (Either Error a) Source #