From 218ad3f54ef0be7e0b2e288e543e6c0959ddd7e3 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sun, 25 Sep 2022 17:39:15 +0300 Subject: Make builtinAdd2 polymorphic in numeric types --- src/Types.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Types.hs') diff --git a/src/Types.hs b/src/Types.hs index 08736cc..21a1ceb 100644 --- a/src/Types.hs +++ b/src/Types.hs @@ -5,6 +5,7 @@ import Control.Monad.Except import Control.Monad.Reader import qualified Data.Map as M import qualified Data.List as L +import qualified Data.Char as C import Utils newtype LException = LException String @@ -36,7 +37,7 @@ instance (Show AST) where show (ASTInteger n) = show n show (ASTDouble n) = show n show (ASTSymbol s) = s - show (ASTBoolean b) = show b + show (ASTBoolean b) = show b $> map C.toLower show (ASTString s) = show s show (ASTVector v) = "[" ++ L.intercalate " " (map show v) ++ "]" show (ASTFunctionCall v) = "(" ++ L.intercalate " " (map show v) ++ ")" -- cgit v1.3