Module CPM.Query.RCFile

Some operations to handle the cpm-query resource configuration file that is stored in $HOME/.cpmqueryrc

Author: Michael Hanus

Version: January 2025

Summary of exported operations:

readRC :: IO [(String,String)]  Deterministic 
Reads the rc file.
rcValue :: [(String,String)] -> String -> String  Deterministic 
Look up a configuration variable in the list of variables from the rc file.

Exported operations:

readRC :: IO [(String,String)]  Deterministic 

Reads the rc file. If it is not present, a new file will be created with the contents of defaultRC.

rcValue :: [(String,String)] -> String -> String  Deterministic 

Look up a configuration variable in the list of variables from the rc file. Uppercase/lowercase is ignored for the variable names and the empty string is returned for an undefined variable.