LambdaHack-0.2.6: A roguelike game engine in early and active development

Safe HaskellNone

Game.LambdaHack.Config

Description

Personal game configuration file support.

Synopsis

Documentation

newtype CP Source

The content of the configuration file. It's parsed in a case sensitive way (unlike by default in ConfigFile).

Constructors

CP ConfigParser 

Instances

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.

getItems :: CP -> SectionSpec -> [(String, String)]Source

An association list corresponding to a section. Fails if no such section.