doc-src/Tutorial/CodeGen/comp
author nipkow
Wed, 15 May 2002 13:50:16 +0200
changeset 13153 4b052946b41c
parent 5377 efb799c5ed3c
permissions -rw-r--r--
arith can now deal with div 2 and mod 2.

consts comp :: ('a,'v) expr => (('a,'v) instr) list
primrec
"comp (Cex v)       = [Const v]"
"comp (Vex a)       = [Load a]"
"comp (Bex f e1 e2) = (comp e2) @ (comp e1) @ [Apply f]"