Module aya.base

Interface Shaped.List<T extends AyaDocile>

All Superinterfaces:
Shaped<T>, Shaped.Inductive<T>
All Known Implementing Classes:
ListTerm, Pattern.FakeShapedList
Enclosing interface:
Shaped<T>

public static non-sealed interface Shaped.List<T extends AyaDocile> extends Shaped.Inductive<T>
  • Method Details

    • repr

      @NotNull @NotNull kala.collection.immutable.ImmutableSeq<T> repr()
    • makeNil

      @NotNull T makeNil(@NotNull @NotNull CtorDef nil, @NotNull @NotNull org.aya.util.Arg<Term> type)
    • makeCons

      @NotNull T makeCons(@NotNull @NotNull CtorDef cons, @NotNull @NotNull org.aya.util.Arg<Term> type, org.aya.util.Arg<T> x, org.aya.util.Arg<T> xs)
    • destruct

      @NotNull T destruct(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<T> repr)
    • compareUntyped

      default <O extends AyaDocile> boolean compareUntyped(@NotNull Shaped.List<O> other, @NotNull @NotNull BiPredicate<T,O> comparator)
      Comparing two List
      Parameters:
      other - another list
      comparator - a comparator that should compare the subterms between two List.
      Returns:
      true if they match (a term matches a pat or two terms are equivalent, which depends on the type parameters Shaped.List and Shaped.List), false if otherwise.
    • constructorForm

      @NotNull default T constructorForm()
      Specified by:
      constructorForm in interface Shaped.Inductive<T extends AyaDocile>