Module aya.base

Class PatternTycker

java.lang.Object
org.aya.tyck.pat.PatternTycker

public final class PatternTycker extends Object
A Pattern Tycker for only one use.
  • Field Details

    • exprTycker

      @NotNull public final @NotNull ExprTycker exprTycker
    • bodySubst

      @NotNull public final @NotNull TypedSubst bodySubst
  • Constructor Details

    • PatternTycker

      public PatternTycker(@NotNull @NotNull ExprTycker exprTycker, @NotNull Def.Signature<?> signature, @NotNull @NotNull kala.collection.SeqView<org.aya.util.Arg<Pattern>> patterns)
  • Method Details

    • tyck

      @NotNull public PatternTycker.TyckResult tyck(@Nullable @Nullable Pattern outerPattern, @Nullable @Nullable Expr body)
      Start to tyck each Pattern with Def.Signature. should be specified if stream is empty.
      Parameters:
      outerPattern - null if visiting the whole pattern (like `A, x, ctor a b`). This is only used for error reporting. For now, is used when signature is not empty but patterns is empty, it is possible when matching parameters of Ctor.
    • hasError

      public boolean hasError()
    • mischa

      public static kala.control.Result<Subst,Boolean> mischa(DataCall dataCall, CtorDef ctor, @NotNull @NotNull TyckState state)