Find our JIT'ed function and run it
[kaleidoscope-hs.git] / AST.hs
diff --git a/AST.hs b/AST.hs
index b57d7cb8cede024a9c2bb0e366d8d066474d331d..9ff555a74d10c6d970fc8b7df0a37c1d98fdbffc 100644 (file)
--- a/AST.hs
+++ b/AST.hs
@@ -4,7 +4,7 @@ import Data.Char
 import Text.Read 
 import Text.ParserCombinators.ReadP hiding ((+++), choice)
 
-data Expr = Num Float
+data Expr = Num Double
           | Var String
           | BinOp BinOp Expr Expr
           | Call String [Expr]
@@ -18,6 +18,8 @@ instance Read Expr where
                              , parseVar
                              , parseCall
                              , parseBinOp "<" 10 (Cmp LT)
+                             , parseBinOp ">" 10 (Cmp GT)
+                             , parseBinOp "==" 10 (Cmp EQ)
                              , parseBinOp "+" 20 Add
                              , parseBinOp "-" 20 Sub
                              , parseBinOp "*" 40 Mul