doc-src/Tutorial/CodeGen/comp
author paulson
Sun, 15 Feb 2004 10:46:37 +0100
changeset 14387 e96d5c42c4b0
parent 5377 efb799c5ed3c
permissions -rw-r--r--
Polymorphic treatment of binary arithmetic using axclasses

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