+ lit x = BC [BCPush $ toCode x]
+ (+.) x y = x <++> y <+-> [BCAdd]
+ (-.) x y = x <++> y <+-> [BCSub]
+ (*.) x y = x <++> y <+-> [BCMul]
+ (/.) x y = x <++> y <+-> [BCDiv]
+
+instance boolExpr ByteCode where
+ (&.) x y = x <++> y <+-> [BCAnd]
+ (|.) x y = x <++> y <+-> [BCOr]
+ Not x = x <+-> [BCNot]
+ (==.) x y = x <++> y <+-> [BCEq]
+ (!=.) x y = x <++> y <+-> [BCNeq]
+ (<.) x y = x <++> y <+-> [ BCLes]
+ (>.) x y = x <++> y <+-> [BCGre]
+ (<=.) x y = x <++> y <+-> [BCLeq]
+ (>=.) x y = x <++> y <+-> [BCGeq]
+
+instance If ByteCode Stmt Stmt Stmt where If b t e = BCIfStmt b t e
+instance If ByteCode Stmt e Stmt where If b t e = BCIfStmt b t e
+//instance If ByteCode Stmt Stmt e where If b t e = BCIfStmt b t e
+//instance If ByteCode Stmt x y where If b t e = BCIfStmt b t e
+instance IF ByteCode where
+ IF b t e = BCIfStmt b t e
+ (?) b t = BCIfStmt b t $ BC []
+BCIfStmt b t e = b <+-> [BCJmpF $ length <$> t + 1] <++> t <+-> [BCJmp $ length <$> e] <++> e
+
+instance noOp ByteCode where noOp = BC []
+
+
+(<++>) infixl 7
+(<++>) (BC x) (BC y) = BC $ x ++ y
+(<+->) infixl 7
+(<+->) (BC x) y = BC $ x ++ y
+(<-+>) infixl 7
+(<-+>) x (BC y) = BC $ x ++ y
+
+(<$>) infixl 9
+(<$>) f (BC x) = f x