on master help sign in
Change default associativity to left
24642c8Evan Czaplicki
compiler/Parse/Binop.hs+1−1
@@ -33,7 +33,7 @@ opLevel table op = Map.findWithDefault 9 op dict
33 where dict = Map.fromList (map (\(lvl,_,op) -> (op,lvl)) table)
33 where dict = Map.fromList (map (\(lvl,_,op) -> (op,lvl)) table)
34
34
35opAssoc :: OpTable -> String -> Assoc
35opAssoc :: OpTable -> String -> Assoc
36−opAssoc table op = Map.findWithDefault R op dict
36+opAssoc table op = Map.findWithDefault L op dict
37 where dict = Map.fromList (map (\(_,assoc,op) -> (op,assoc)) table)
37 where dict = Map.fromList (map (\(_,assoc,op) -> (op,assoc)) table)
38
38
39hasLevel :: OpTable -> Int -> (String, LExpr t v) -> Bool
39hasLevel :: OpTable -> Int -> (String, LExpr t v) -> Bool