Plugins are written in OCaml. The compiled OCaml code is then
loaded in Stog with the
A plugin can register new base rules and new modules.
A plugin can add rewrite rules to the rules of function
Here is an example:
Have a look at the
A plugin can also register a complete module, with named functions
associated to levels. These levels can also be specified in
the .stog/config
file as explained
An example of such a plugin is
The plugin is simply compiled with
for native code or
for bytecode.
The plugin is used by specifying it on the
or, if the plugin is installed with ocamlfind:
With our plugin example registering just a base rule, we can use the new "list":
This will be evaluated (reduced) to