Module Basic.Rule

type t

Encodes a rewrite rule over S-expressions.

val pp : Stdlib.Format.formatter -> t -> unit

pp fmt r pretty prints the rewrite rule r.

val show : t -> string

show r converts the rewrite rule r to a string

val make : from:Query.t -> into:Query.t -> t option

make ~from ~into builds a syntactic rewrite rule from a matching pattern from and a result pattern into.

Iff into contains variables that are not bound in from, then the rule is invalid, and the function will return None.