Module aya.base

Record Class RuleReducer.Fn

java.lang.Object
java.lang.Record
org.aya.core.term.RuleReducer.Fn
Record Components:
ulift -
args -
All Implemented Interfaces:
Callable, Callable.Common, Callable.Tele, FnCallLike, RuleReducer, Term, AyaDocile, org.aya.guest0x0.cubical.Restr.TermLike<Term>
Enclosing interface:
RuleReducer

public static record RuleReducer.Fn(Shaped.Applicable<Term,FnDef,TeleDecl.FnDecl> rule, int ulift, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> args) extends Record implements RuleReducer, FnCallLike
  • Constructor Details

    • Fn

      public Fn(@NotNull Shaped.Applicable<Term,FnDef,TeleDecl.FnDecl> rule, int ulift, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> args)
      Creates an instance of a Fn record class.
      Parameters:
      rule - the value for the rule record component
      ulift - the value for the ulift record component
      args - the value for the args record component
  • Method Details

    • ref

      @NotNull public @NotNull DefVar<? extends Def,? extends TeleDecl<?>> ref()
      Specified by:
      ref in interface Callable
      Specified by:
      ref in interface Callable.Common
      Specified by:
      ref in interface Callable.Tele
    • descent

      @NotNull public @NotNull Term descent(@NotNull @NotNull UnaryOperator<Term> f, @NotNull @NotNull UnaryOperator<Pat> g)
      Description copied from interface: Term
      Descending an operation to the term AST. NOTE: Currently we require the operation `f` to preserve:
      invalid @link
      StructCall
      , DataCall, SortTerm, Shaped.Applicable.
      Specified by:
      descent in interface Term
    • toFnCall

      @NotNull public @NotNull FnCall toFnCall()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • rule

      @NotNull public Shaped.Applicable<Term,FnDef,TeleDecl.FnDecl> rule()
      Returns the value of the rule record component.
      Specified by:
      rule in interface RuleReducer
      Returns:
      the value of the rule record component
    • ulift

      public int ulift()
      Returns the value of the ulift record component.
      Specified by:
      ulift in interface Callable.Common
      Specified by:
      ulift in interface Callable.Tele
      Returns:
      the value of the ulift record component
    • args

      @NotNull public @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> args()
      Returns the value of the args record component.
      Specified by:
      args in interface Callable
      Returns:
      the value of the args record component