Stack effect tools - Factor Documentation (original) (raw)

Stack effect checking can be used interactively to print stack effects of quotations without running them. It can also be used from Smart combinators.
infer ( quot -- effect )
infer. ( quot -- )

There are also some words for working with effect instances. Getting a word's declared stack effect:

stack-effect ( word -- effect/f )

Converting a stack effect to a string form:

effect>string ( obj -- str )

Comparing effects:

effect-height ( effect -- n )

effect<= ( effect1 effect2 -- ? )
effect= ( effect1 effect2 -- ? )

The class of stack effects:

effect

effect? ( object -- ? )