gameServer/Data/TConfig.hs
changeset 4995 d3ca68e4860e
parent 4993 905b349af377
equal deleted inserted replaced
4994:2d9a52d6ea24 4995:d3ca68e4860e
    37 -- |Adds a key and value to the end of the configuration.
    37 -- |Adds a key and value to the end of the configuration.
    38 addKey :: Key -> Value -> Conf -> Conf
    38 addKey :: Key -> Value -> Conf -> Conf
    39 addKey = M.insert
    39 addKey = M.insert
    40 
    40 
    41 -- |Utility function.
    41 -- |Utility function.
    42 -- Removes a key and it's value from the configuration.
    42 -- Removes a key and its value from the configuration.
    43 remKey :: Key -> Conf -> Conf
    43 remKey :: Key -> Conf -> Conf
    44 remKey = M.delete
    44 remKey = M.delete
    45 
    45 
    46 -- |Utility function. Searches a configuration for a
    46 -- |Utility function. Searches a configuration for a
    47 -- key, and returns it's value.
    47 -- key, and returns its value.
    48 getValue :: Key -> Conf -> Maybe Value
    48 getValue :: Key -> Conf -> Maybe Value
    49 getValue = M.lookup
    49 getValue = M.lookup
    50 
    50 
    51 -- |Utility function. Replaces the value
    51 -- |Utility function. Replaces the value
    52 -- associated with a key in a configuration.
    52 -- associated with a key in a configuration.