Definition protocol
Factor handbook » The implementation » Definitions

Next:Definition sanity checking


A common protocol is used to build generic tools for working with all definitions.

Definitions must know what source file they were loaded from, and provide a way to set this:
where ( defspec -- loc )

set-where ( loc defspec -- )


Definitions can be removed:
forget ( defspec -- )


Definitions must implement a few operations used for printing them in source form:
definer ( defspec -- start end )

definition ( defspec -- seq )


See also
Printing definitions