diff options
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 |
