package comby

  1. Overview
  2. Docs
On This Page
  1. Rule
Legend:
Library
Module
Module type
Parameter
Class
Class type

Rule

Defines types and operations for match rules.

type t
type result
val sat : result -> bool

sat result returns true if a result of a rule is satisfied.

val result_env : result -> Match.environment option

result_env returns a match environment associated with a rule result.

val create : string -> t Core.Or_error.t

create parses and creates a rule.

val apply : ?matcher:(module Matchers.Matcher.S) -> ?substitute_in_place:bool -> t -> Match.environment -> result

apply matcher substitute_in_place rule env applies a rule according to some matcher for existing matches in env. If substitute_in_place is true, rewrite rules substitute their values in place (default true).

OCaml

Innovation. Community. Security.