@@ -38,7 +38,7 @@ rebracket :: [Declaration] -> Either String [Declaration]
3838rebracket ds = do
3939 m <- collectFixities ds
4040 let opTable = customOperatorTable m
41− ds' <- G.everywhereM (G.mkM (matchOperators opTable)) ds
41+ ds' <- G.everywhereM' (G.mkM (matchOperators opTable)) ds
4242 return $ G.everywhere (G.mkT removeParens) ds'
4343
4444removeParens :: Value -> Value
@@ -104,25 +104,26 @@ globalOp :: String -> Qualified Ident
104104globalOp = Qualified global . Op
105105
106106builtIns :: [(Qualified Ident, Value -> Value -> Value, Precedence, Associativity)]
107−builtIns = [ (globalOp "!!", flip Indexer, 3, Infixl)
108− , (globalOp "&&", Binary And, 3, Infixr)
109− , (globalOp "||", Binary Or, 3, Infixr)
110− , (globalOp "<=", Binary LessThanOrEqualTo, 4, Infixl)
111− , (globalOp ">=", Binary GreaterThanOrEqualTo, 4, Infixl)
112− , (globalOp "<", Binary LessThan, 4, Infixl)
113− , (globalOp ">", Binary GreaterThan, 4, Infixl)
114− , (globalOp "==", Binary EqualTo, 4, Infixl)
115− , (globalOp "!=", Binary NotEqualTo, 4, Infixl)
116− , (globalOp "*", Binary Multiply, 7, Infixl)
117− , (globalOp "/", Binary Divide, 7, Infixl)
118− , (globalOp "%", Binary Modulus, 7, Infixl)
119− , (globalOp "++", Binary Concat, 5, Infixr)
120− , (globalOp "+", Binary Add, 6, Infixl)
121− , (globalOp "-", Binary Subtract, 6, Infixl)
122− , (globalOp "<<", Binary ShiftLeft, 7, Infixl)
123− , (globalOp ">>>", Binary ZeroFillShiftRight, 7, Infixl)
124− , (globalOp ">>", Binary ShiftRight, 7, Infixl)
125− , (globalOp "&", Binary BitwiseAnd, 7, Infixl)
126− , (globalOp "^", Binary BitwiseXor, 7, Infixl)
127− , (globalOp "|", Binary BitwiseOr, 7, Infixl)
107+builtIns = [ (globalOp "<", Binary LessThan, 3, Infixl)
108+ , (globalOp "<=", Binary LessThanOrEqualTo, 3, Infixl)
109+ , (globalOp ">", Binary GreaterThan, 3, Infixl)
110+ , (globalOp ">=", Binary GreaterThanOrEqualTo, 3, Infixl)
111+ , (globalOp "!!", flip Indexer, 4, Infixl)
112+ , (globalOp "*", Binary Multiply, 5, Infixl)
113+ , (globalOp "/", Binary Divide, 5, Infixl)
114+ , (globalOp "%", Binary Modulus, 5, Infixl)
115+ , (globalOp "++", Binary Concat, 6, Infixr)
116+ , (globalOp "+", Binary Add, 7, Infixl)
117+ , (globalOp "-", Binary Subtract, 7, Infixl)
118+ , (globalOp "<<", Binary ShiftLeft, 8, Infixl)
119+ , (globalOp ">>", Binary ShiftRight, 8, Infixl)
120+ , (globalOp ">>>", Binary ZeroFillShiftRight, 8, Infixl)
121+ , (globalOp "==", Binary EqualTo, 9, Infixl)
122+ , (globalOp "!=", Binary NotEqualTo, 9, Infixl)
123+ , (globalOp "&", Binary BitwiseAnd, 10, Infixl)
124+ , (globalOp "^", Binary BitwiseXor, 10, Infixl)
125+ , (globalOp "|", Binary BitwiseOr, 10, Infixl)
126+ , (globalOp "&&", Binary And, 11, Infixr)
127+ , (globalOp "||", Binary Or, 11, Infixr)
128128 ]
129+