Module Comp.Pattern

External computation-level patterns.

type t =
  1. | Variable of {
    1. location : Syncom.Location.t;
    2. identifier : Syncom.Identifier.t;
    }
  2. | Constructor of {
    1. location : Syncom.Location.t;
    2. identifier : Syncom.Qualified_identifier.t;
    }
    (*

    Constructor { identifier = "c"; _ } is the computation-level constructor pattern "c".

    *)
  3. | Meta_object of {
    1. location : Syncom.Location.t;
    2. meta_pattern : Synext__.Synext_definition.Meta.Pattern.t;
    }
  4. | Tuple of {
    1. location : Syncom.Location.t;
    2. elements : t Support.List2.t;
    }
  5. | Application of {
    1. location : Syncom.Location.t;
    2. applicand : t;
    3. arguments : t Support.List1.t;
    }
    (*

    Application { applicand; arguments; _ } the application of applicand with arguments.

    If applicand = Term.Constant _ with resolved operator description operator, then List1.length arguments = Operator.arity operator.

    *)
  6. | Type_annotated of {
    1. location : Syncom.Location.t;
    2. pattern : t;
    3. typ : Typ.t;
    }
  7. | Wildcard of {
    1. location : Syncom.Location.t;
    }