equal
deleted
inserted
replaced
697 initExpr2C' (BuiltInFunction "succ" [BuiltInFunction "pred" [e]]) = initExpr2C' e |
697 initExpr2C' (BuiltInFunction "succ" [BuiltInFunction "pred" [e]]) = initExpr2C' e |
698 initExpr2C' (BuiltInFunction "pred" [BuiltInFunction "succ" [e]]) = initExpr2C' e |
698 initExpr2C' (BuiltInFunction "pred" [BuiltInFunction "succ" [e]]) = initExpr2C' e |
699 initExpr2C' (BuiltInFunction "succ" [e]) = liftM (<> text " + 1") $ initExpr2C' e |
699 initExpr2C' (BuiltInFunction "succ" [e]) = liftM (<> text " + 1") $ initExpr2C' e |
700 initExpr2C' (BuiltInFunction "pred" [e]) = liftM (<> text " - 1") $ initExpr2C' e |
700 initExpr2C' (BuiltInFunction "pred" [e]) = liftM (<> text " - 1") $ initExpr2C' e |
701 initExpr2C' b@(BuiltInFunction _ _) = error $ show b |
701 initExpr2C' b@(BuiltInFunction _ _) = error $ show b |
|
702 initExpr2C' (InitTypeCast t' i) = do |
|
703 e <- initExpr2C i |
|
704 t <- id2C IOLookup t' |
|
705 return . parens $ parens t <> e |
702 initExpr2C' a = error $ "initExpr2C: don't know how to render " ++ show a |
706 initExpr2C' a = error $ "initExpr2C: don't know how to render " ++ show a |
703 |
707 |
704 |
708 |
705 range2C :: InitExpression -> State RenderState [Doc] |
709 range2C :: InitExpression -> State RenderState [Doc] |
706 range2C (InitString [a]) = return [quotes $ text [a]] |
710 range2C (InitString [a]) = return [quotes $ text [a]] |