A small and simple text file configuration library written in Haskell. It is similar to the INI file format, but lacks a few of it's features, such as sections which will be added eventually. It is suitable for simple games that need to keep track of certain information between plays.
- data Configuration
- getValue :: Key -> [Configuration] -> Maybe Value
- repConfig :: Key -> Value -> [Configuration] -> [Configuration]
- readConfig :: FilePath -> IO [Configuration]
- writeConfig :: FilePath -> [Configuration] -> IO ()
- remKey :: Key -> [Configuration] -> [Configuration]
- addKey :: Key -> Value -> [Configuration] -> [Configuration]
Configuration type takes a key and a value,
and returns a Configuration type.
Utility function. Searches a Configuration for a key, and returns it's value.
Utility function. Replaces the value for a key in a Configuration.
Reads and parses a string from a file into a Configuration.
Parses a parsed Configuration back to a file.
Utility function. Removes a key and it's value from the configuration.