X-Git-Url: http://git.lukelau.me/?a=blobdiff_plain;f=AST.hs;fp=AST.hs;h=e491b648a7d45f7bd3b419b0e3ff6a8c215cbd83;hb=99457827942e4d9ee32ed5b0ea4abed54df5b449;hp=7dad3a19e91eab9f12657101bd224b5c81742d07;hpb=310a2212dfb2014e8ac7efd1a5d7599a7f9d4057;p=kaleidoscope-hs.git diff --git a/AST.hs b/AST.hs index 7dad3a1..e491b64 100644 --- a/AST.hs +++ b/AST.hs @@ -13,7 +13,7 @@ data BinOp = Add | Sub | Mul | Cmp Ordering deriving Show instance Read Expr where - readPrec = choice [ parseNum + readPrec = parens $ choice [ parseNum , parseVar , parseBinOp "<" 10 (Cmp LT) , parseBinOp "+" 20 Add