java.lang.Object
java.lang.Record
org.aya.core.pat.Pat.Preclause<T>
- All Implemented Interfaces:
AyaDocile
- Enclosing interface:
Pat
public static record Pat.Preclause<T extends AyaDocile>(@NotNull org.aya.util.error.SourcePos sourcePos, @NotNull kala.collection.immutable.ImmutableSeq<Pat> patterns, @NotNull kala.control.Option<T extends AyaDocile> expr)
extends Record
implements AyaDocile
It's 'pre' because there are also impossible clauses, which are removed after tycking.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull kala.control.Option<T>expr()Returns the value of theexprrecord component.final inthashCode()Returns a hash code value for this object.static @NotNull kala.control.Option<@NotNull Term.Matching>lift(@NotNull Pat.Preclause<Term> clause) @NotNull kala.collection.immutable.ImmutableSeq<Pat>patterns()Returns the value of thepatternsrecord component.@NotNull org.aya.util.error.SourcePosReturns the value of thesourcePosrecord component.@NotNull org.aya.pretty.doc.DoctoDoc(@NotNull org.aya.util.distill.DistillerOptions options) final StringtoString()Returns a string representation of this record class.static @NotNull Pat.Preclause<Term>weaken(Term.Matching clause) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.aya.generic.AyaDocile
debuggerOnlyToDoc
-
Constructor Details
-
Preclause
public Preclause(@NotNull @NotNull org.aya.util.error.SourcePos sourcePos, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Pat> patterns, @NotNull @NotNull kala.control.Option<T> expr) Creates an instance of aPreclauserecord class.- Parameters:
sourcePos- the value for thesourcePosrecord componentpatterns- the value for thepatternsrecord componentexpr- the value for theexprrecord component
-
-
Method Details
-
toDoc
@NotNull public @NotNull org.aya.pretty.doc.Doc toDoc(@NotNull @NotNull org.aya.util.distill.DistillerOptions options) -
weaken
-
lift
@NotNull public static @NotNull kala.control.Option<@NotNull Term.Matching> lift(@NotNull @NotNull Pat.Preclause<Term> clause) -
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. -
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. -
equals
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. All components in this record class are compared withObjects::equals(Object,Object). -
sourcePos
@NotNull public @NotNull org.aya.util.error.SourcePos sourcePos()Returns the value of thesourcePosrecord component.- Returns:
- the value of the
sourcePosrecord component
-
patterns
Returns the value of thepatternsrecord component.- Returns:
- the value of the
patternsrecord component
-
expr
Returns the value of theexprrecord component.- Returns:
- the value of the
exprrecord component
-