diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-09-26 14:02:28 +0300 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-05 14:21:53 +0200 |
| commit | 2ea2c405746bfa79d3be478f4c8763dd7dd6ac5f (patch) | |
| tree | 39be22d6a3b768e42813e2e5dde4a37a301aafb3 /src/Utils.hs | |
| parent | 3f5b15b15fbca3dac18f3f5cb39b7826924ff175 (diff) | |
Add some concept docs
Diffstat (limited to 'src/Utils.hs')
| -rw-r--r-- | src/Utils.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Utils.hs b/src/Utils.hs index 76f1524..e0695c3 100644 --- a/src/Utils.hs +++ b/src/Utils.hs @@ -13,7 +13,8 @@ newtype LException = LException String data Config = Config { configScriptFileName :: Maybe String, configVerboseMode :: Bool, - configShowHelp :: Bool + configShowHelp :: Bool, + configPrintEvaled :: Bool } type LContext a = ReaderT Config (ExceptT LException IO) a @@ -95,6 +96,11 @@ assertIsASTVector ast = case ast of (ASTVector _) -> return ast _ -> throwL $ show ast ++ " is not a vector" +assertIsASTString :: AST -> LContext AST +assertIsASTString ast = case ast of + (ASTString _) -> return ast + _ -> throwL $ show ast ++ " is not a string" + assertIsASTFunctionCall :: AST -> LContext AST assertIsASTFunctionCall ast = case ast of (ASTFunctionCall _) -> return ast |
