Safe Haskell | None |
---|---|
Language | Haskell2010 |
Extensions to ConfigFile
and utility functions for dealing with
configuration in general and reading/writing files.
- allOn :: (a -> Maybe Bool) -> a -> a -> Maybe Bool
- lastOn :: (a -> Maybe b) -> a -> a -> Maybe b
- data SystemPath
- resolve :: MonadIO m => SystemPath -> m FilePath
- ensureDir :: MonadIO m => FilePath -> m ()
- readIniFile :: MonadIO m => SystemPath -> m ConfigParser
- getOptionM :: (Get_C a, Read a) => ConfigParser -> SectionSpec -> OptionSpec -> Maybe a
- getOption :: (Get_C a, Monoid a) => ConfigParser -> SectionSpec -> OptionSpec -> a
- getOptionOr :: (Get_C a, Read a) => ConfigParser -> SectionSpec -> OptionSpec -> a -> a
- data IniFileException = IniFileException FilePath CPError
- module Data.ConfigFile
- newtype UUID = UUID (Word32, Word16, Word16, Word16, Word32, Word16)
- randomUUID :: MonadIO m => m UUID
- tell :: (MonadIO m, Show a) => FilePath -> a -> m ()
- consult :: (MonadIO m, Read a) => FilePath -> m a
- getDirectoryFiles :: MonadIO m => FilePath -> m [FilePath]
- maybeConsult :: (MonadIO m, Read a) => Maybe FilePath -> a -> m a
- maybeConsultSystemPath :: (MonadIO m, Read a) => Maybe SystemPath -> a -> m a
Documentation
data SystemPath Source
resolve :: MonadIO m => SystemPath -> m FilePath Source
readIniFile :: MonadIO m => SystemPath -> m ConfigParser Source
getOptionM :: (Get_C a, Read a) => ConfigParser -> SectionSpec -> OptionSpec -> Maybe a Source
getOption :: (Get_C a, Monoid a) => ConfigParser -> SectionSpec -> OptionSpec -> a Source
getOptionOr :: (Get_C a, Read a) => ConfigParser -> SectionSpec -> OptionSpec -> a -> a Source
data IniFileException Source
module Data.ConfigFile
randomUUID :: MonadIO m => m UUID Source
getDirectoryFiles :: MonadIO m => FilePath -> m [FilePath] Source
Get all files from dir
that is get ONLY files not directories
maybeConsultSystemPath :: (MonadIO m, Read a) => Maybe SystemPath -> a -> m a Source