equal
deleted
inserted
replaced
703 t <- gets lastType |
703 t <- gets lastType |
704 case t of |
704 case t of |
705 (BTArray i _ _) -> initExpr2C' $ BuiltInFunction "pred" [InitRange i] |
705 (BTArray i _ _) -> initExpr2C' $ BuiltInFunction "pred" [InitRange i] |
706 BTInt _ -> case e' of |
706 BTInt _ -> case e' of |
707 (Identifier "LongInt" _) -> return $ int (2147483647) |
707 (Identifier "LongInt" _) -> return $ int (2147483647) |
708 _ -> error $ "BuiltInFunction 'high' in initExpr: " ++ show e' |
708 (Identifier "LongWord" _) -> return $ text "4294967295" |
|
709 _ -> error $ "BuiltInFunction 'high' in initExpr: " ++ show e' |
709 a -> error $ "BuiltInFunction 'high' in initExpr: " ++ show a ++ ": " ++ show hi |
710 a -> error $ "BuiltInFunction 'high' in initExpr: " ++ show a ++ ": " ++ show hi |
710 initExpr2C' (BuiltInFunction "succ" [BuiltInFunction "pred" [e]]) = initExpr2C' e |
711 initExpr2C' (BuiltInFunction "succ" [BuiltInFunction "pred" [e]]) = initExpr2C' e |
711 initExpr2C' (BuiltInFunction "pred" [BuiltInFunction "succ" [e]]) = initExpr2C' e |
712 initExpr2C' (BuiltInFunction "pred" [BuiltInFunction "succ" [e]]) = initExpr2C' e |
712 initExpr2C' (BuiltInFunction "succ" [e]) = liftM (<> text " + 1") $ initExpr2C' e |
713 initExpr2C' (BuiltInFunction "succ" [e]) = liftM (<> text " + 1") $ initExpr2C' e |
713 initExpr2C' (BuiltInFunction "pred" [e]) = liftM (<> text " - 1") $ initExpr2C' e |
714 initExpr2C' (BuiltInFunction "pred" [e]) = liftM (<> text " - 1") $ initExpr2C' e |