import Data ConfigFile as ConfigFile import Data Either Utils val Conf

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import Data.ConfigFile as ConfigFile
import Data.Either.Utils
....
val <- ConfigFile.readfile ConfigFile.emptyCP "params.conf"
let cp = forceEither val
let outdir = forceEither $ ConfigFile.get cp "DEFAULT" "outdir"
let duration = forceEither $ ConfigFile.get cp "DEFAULT" "duration"