Safe Haskell | None |
---|
Personal game configuration file support.
- newtype CP = CP ConfigParser
- toCP :: ConfigParser -> CP
- forceEither :: Show a => Either a b -> b
- getOption :: Get_C a => CP -> SectionSpec -> OptionSpec -> Maybe a
- get :: Get_C a => CP -> SectionSpec -> OptionSpec -> a
- getItems :: CP -> SectionSpec -> [(String, String)]
Documentation
The content of the configuration file. It's parsed in a case sensitive way (unlike by default in ConfigFile).
toCP :: ConfigParser -> CPSource
Switches all names to case sensitive (unlike by default in the ConfigFile library) and wraps in the constructor.
forceEither :: Show a => Either a b -> bSource
In case of corruption, just fail.
getOption :: Get_C a => CP -> SectionSpec -> OptionSpec -> Maybe aSource
A simplified access to an option in a given section, with simple error reporting (no internal errors are caught nor hidden). If there is no such option, gives Nothing.
get :: Get_C a => CP -> SectionSpec -> OptionSpec -> aSource
Simplified access to an option in a given section. Fails if the option is not present.