doc-src/Tutorial/CodeGen/comp
author berghofe
Mon, 10 Dec 2001 15:26:42 +0100
changeset 12443 e56ab6134b41
parent 5377 efb799c5ed3c
permissions -rw-r--r--
Turned subcls1 into an inductive relation to make it executable.

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]"