equal
deleted
inserted
replaced
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. |