diff options
author | Akshay <[email protected]> | 2020-10-09 07:58:15 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-10-09 07:58:15 +0100 |
commit | 3ef6ec4bd3314efcac2504bd3a25e380d5e9514f (patch) | |
tree | e3c7a0f50eb7c5997d60abb923b813c1d1ebe3fa /src/Evaluator.hs | |
parent | c785a95f14f8bb3887cdc411ef3329533a2c819a (diff) |
add experimental floating point handling
Diffstat (limited to 'src/Evaluator.hs')
-rw-r--r-- | src/Evaluator.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Evaluator.hs b/src/Evaluator.hs index 28ee79b..c8d8d34 100644 --- a/src/Evaluator.hs +++ b/src/Evaluator.hs | |||
@@ -19,6 +19,7 @@ eval :: Expr -> LispResult Expr | |||
19 | eval v@(StringLiteral s) = return v | 19 | eval v@(StringLiteral s) = return v |
20 | eval v@(IntLiteral i) = return v | 20 | eval v@(IntLiteral i) = return v |
21 | eval v@(BoolLiteral b) = return v | 21 | eval v@(BoolLiteral b) = return v |
22 | eval v@(FloatLiteral f) = return v | ||
22 | -- handle quotes as literals | 23 | -- handle quotes as literals |
23 | eval (List[Id "quote", val]) = return val | 24 | eval (List[Id "quote", val]) = return val |
24 | eval (List (Id fn : args)) = mapM eval args >>= apply fn | 25 | eval (List (Id fn : args)) = mapM eval args >>= apply fn |