rascal-1.1.6: A command-line client for Reddit

Safe HaskellSafe-Inferred



This module does the strict minimum needed parsing INI-style config files



parseConfig :: String -> ConfSource

Parses a string into a Map String String

configLine :: String -> BoolSource

keep only lines that will lead to some configuration element stripping out comments, empty lines, etc.

getKeyValue :: String -> (Key, Value)Source

Turns a line into a key, value pair

stripWhite :: String -> StringSource

drop leading and ending white space

getUserConfig :: String -> [(String, String)] -> IO ConfSource

search for fileName in the user's home directory and combine it with default options to provide a Conf map