Module aya.base

Interface Pat

All Superinterfaces:
AyaDocile
All Known Implementing Classes:
Pat.Absurd, Pat.Bind, Pat.Ctor, Pat.Meta, Pat.ShapedInt, Pat.Tuple

public sealed interface Pat extends AyaDocile permits Pat.Meta, Pat.Bind, Pat.Absurd, Pat.Tuple, Pat.Ctor, Pat.ShapedInt
Patterns in the core syntax.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
     
    static final record 
     
    static final record 
     
    static final record 
    Meta for Hole
    static final record 
    It's 'pre' because there are also impossible clauses, which are removed after tycking.
    static final record 
     
    static final record 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    static @NotNull kala.collection.immutable.ImmutableSeq<Term.Param>
    extractTele(@NotNull kala.collection.SeqLike<Pat> pats)
     
    @NotNull Pat
    inline(@Nullable LocalCtx ctx)
    Make sure you are inline all patterns in order
    void
    storeBindings(@NotNull LocalCtx ctx)
     
    default @NotNull org.aya.util.Arg<Term>
     
    default @NotNull org.aya.pretty.doc.Doc
    toDoc(@NotNull org.aya.util.distill.DistillerOptions options)
     
    default @NotNull Term
     
    @NotNull Pat
    zonk(@NotNull Tycker tycker)
     

    Methods inherited from interface org.aya.generic.AyaDocile

    debuggerOnlyToDoc
  • Method Details

    • explicit

      boolean explicit()
    • toTerm

      @NotNull default @NotNull Term toTerm()
    • toArg

      @NotNull default @NotNull org.aya.util.Arg<Term> toArg()
    • toDoc

      @NotNull default @NotNull org.aya.pretty.doc.Doc toDoc(@NotNull @NotNull org.aya.util.distill.DistillerOptions options)
      Specified by:
      toDoc in interface AyaDocile
    • zonk

      @NotNull @NotNull Pat zonk(@NotNull @NotNull Tycker tycker)
    • inline

      @NotNull @NotNull Pat inline(@Nullable @Nullable LocalCtx ctx)
      Make sure you are inline all patterns in order
      Parameters:
      ctx - when null, the solutions will not be inlined
      Returns:
      inlined patterns
    • storeBindings

      void storeBindings(@NotNull @NotNull LocalCtx ctx)
    • extractTele

      @NotNull static @NotNull kala.collection.immutable.ImmutableSeq<Term.Param> extractTele(@NotNull @NotNull kala.collection.SeqLike<Pat> pats)