diff options
| author | Jan Tuomi <jan.tuomi@valuemotive.com> | 2022-09-23 10:38:03 +0300 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-05 14:21:52 +0200 |
| commit | fd39958d20554fdc19611c5f23d32c8493ad655e (patch) | |
| tree | 4ce19fa2e89e106e58f207029942cb427ba7e779 /src/Types.hs | |
| parent | 12ac2354ffca7a221cb4535354eb86907bfceea7 (diff) | |
Add exceptions, global config
Diffstat (limited to 'src/Types.hs')
| -rw-r--r-- | src/Types.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Types.hs b/src/Types.hs new file mode 100644 index 0000000..94428b6 --- /dev/null +++ b/src/Types.hs @@ -0,0 +1,13 @@ +module Types where + +import Control.Monad.Except +import Control.Monad.Reader + +newtype LException = LException String +data Config = Config { + configScriptFileName :: Maybe String, + configVerboseMode :: Bool, + configShowHelp :: Bool +} + +type LContext a = ReaderT Config (ExceptT LException IO) a |
