Class Plugin.t

A plugin, with virtual methods to overload

method virtual on_event : acts:actions -> Event.t -> unit

Main callback, called on every new event with acts. acts can be used to generate new code, see actions.

method virtual save : snapshot

Called to make a snapshot of the plugin's internal state.

method virtual prelude : Code_fragment.t list

Prelude to load at the beginning, as a kind of small stdlib for this particular plugin. For example it can define a set of utilities and functions for builtin types, in the case of a codegen plugin. See Imandra_codegen.Serde_yojson for an example.

method virtual name : string

Name of the plugin (should be unique)