From fd39958d20554fdc19611c5f23d32c8493ad655e Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 23 Sep 2022 10:38:03 +0300 Subject: Add exceptions, global config --- src/Types.hs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/Types.hs (limited to 'src/Types.hs') 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 -- cgit v1.3