blob: bcb147c8aaac08aabedb12b65f315bcc15eedf81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{-# OPTIONS_GHC -Wno-missing-export-lists #-}
module TestUtils where
import Control.Monad.Except
import Control.Monad.Reader
import Utils
initialConfig :: Config
initialConfig = Config {
configScriptFileName = Nothing,
configVerboseMode = False,
configShowHelp = False
}
runL :: LContext a -> IO a
runL lc = do res <- runExceptT $ runReaderT lc initialConfig
case res of
Left (LException err) -> error err
Right val -> return val
|