- All Known Subinterfaces:
TeleTycker,TeleTycker.Impl
- All Known Implementing Classes:
AbstractTycker,DoubleChecker,ExprTycker,Synthesizer,TeleTycker.Con,TeleTycker.Default,TermComparator,Unifier
public interface Contextful
Indicating something is
Whenever you want to introduce some bind, make sure you are modifying the
LocalCtxful.Whenever you want to introduce some bind, make sure you are modifying the
LocalCtx that you own it, i.e. obtained from subscoped(java.util.function.Supplier<R>).
In fact, this is the rule of ownership 🦀🦀🦀.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull org.aya.syntax.core.term.call.MetaCallfreshMeta(String name, @NotNull org.aya.util.error.SourcePos pos, org.aya.syntax.ref.MetaVar.Requirement req) Construct a freshMetaCalldefault @NotNull org.aya.syntax.core.term.TermgeneratePi(@NotNull org.aya.syntax.concrete.Expr.Lambda expr, org.aya.util.error.SourcePos sourcePos) @NotNull org.aya.syntax.ref.LocalCtxlocalCtx()default @NotNull org.aya.syntax.core.term.TermmockTerm(@NotNull org.aya.syntax.core.term.Param param, @NotNull org.aya.util.error.SourcePos pos) Generate a freshMetaCallwith typeParam.type()@NotNull org.aya.syntax.ref.LocalCtxsetLocalCtx(@NotNull org.aya.syntax.ref.LocalCtx ctx) UpdatelocalCtxwith the given onedefault <R> Rdefault <R> Rwith(@NotNull org.aya.syntax.ref.LocalVar var, @NotNull org.aya.syntax.core.term.Term type, @NotNull Supplier<R> action)
-
Method Details
-
localCtx
@NotNull @NotNull org.aya.syntax.ref.LocalCtx localCtx() -
setLocalCtx
@Internal @Contract(mutates="this") @NotNull @NotNull org.aya.syntax.ref.LocalCtx setLocalCtx(@NotNull @NotNull org.aya.syntax.ref.LocalCtx ctx) UpdatelocalCtxwith the given one- Parameters:
ctx- newLocalCtx- Returns:
- old context
-
subscoped
-
with
@Contract(mutates="this") default <R> R with(@NotNull @NotNull org.aya.syntax.ref.LocalVar var, @NotNull @NotNull org.aya.syntax.core.term.Term type, @NotNull @NotNull Supplier<R> action) -
mockTerm
@NotNull default @NotNull org.aya.syntax.core.term.Term mockTerm(@NotNull @NotNull org.aya.syntax.core.term.Param param, @NotNull @NotNull org.aya.util.error.SourcePos pos) Generate a freshMetaCallwith typeParam.type() -
freshMeta
@NotNull default @NotNull org.aya.syntax.core.term.call.MetaCall freshMeta(String name, @NotNull @NotNull org.aya.util.error.SourcePos pos, org.aya.syntax.ref.MetaVar.Requirement req) Construct a freshMetaCall- See Also:
-
generatePi
@NotNull default @NotNull org.aya.syntax.core.term.Term generatePi(@NotNull org.aya.syntax.concrete.Expr.Lambda expr, org.aya.util.error.SourcePos sourcePos)
-