Event-driven class instantiation

Hi, I am working on a little domain specific language and had written a parser with Menhir that delivers an AST. The language has the concept “predicate” that is very similar to a ocaml class so I would like to use ocaml class to represent it. Predicates must be instantiate by events, in fact the type of event will define the type of class. Event types are defined inside of predicates, is this possible? I mean, the type of class that will be instantiated can be defined by some ocaml code?