java.lang.Object
org.aya.distill.BaseDistiller<Term>
- Direct Known Subclasses:
ConcreteDistiller,CoreDistiller
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceBaseDistiller.Fmt<T extends AyaDocile>static enumExpression: where am I? Top-level expression may not need parentheses, stone free! An argument of an application! Stay in parentheses! An operand of a binary application! Applications within are safe, but other binary applications are in danger! Codomain of a telescope -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final @NotNull org.aya.pretty.doc.Stylestatic final @NotNull org.aya.pretty.doc.Stylestatic final @NotNull org.aya.pretty.doc.Stylestatic final @NotNull org.aya.pretty.doc.Stylestatic final @NotNull org.aya.pretty.doc.Stylestatic final @NotNull org.aya.pretty.doc.Stylefinal @NotNull org.aya.util.distill.DistillerOptionsstatic final @NotNull org.aya.pretty.doc.Stylestatic final @NotNull org.aya.pretty.doc.Style -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseDistiller(@NotNull org.aya.util.distill.DistillerOptions options) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends AyaDocile>
org.aya.pretty.doc.Docarg(@NotNull BaseDistiller.Fmt<T> fmt, org.aya.util.binop.BinOpParser.Elem<T> arg, @NotNull BaseDistiller.Outer outer) static @NotNull org.aya.pretty.doc.DoccheckParen(@NotNull BaseDistiller.Outer outer, @NotNull org.aya.pretty.doc.Doc binApp, @NotNull BaseDistiller.Outer binOp) protected static @Nullable org.aya.pretty.doc.StylechooseStyle(Object concrete) static <T extends org.aya.guest0x0.cubical.Restr.TermLike<T> & AyaDocile>
@NotNull org.aya.pretty.doc.Doccofib(@NotNull org.aya.util.distill.DistillerOptions options, org.aya.guest0x0.cubical.Restr.Conj<T> conj) static @NotNull org.aya.pretty.doc.Doccube(@NotNull org.aya.util.distill.DistillerOptions options, PathTerm.Cube cube) static @NotNull org.aya.pretty.doc.Doc@NotNull org.aya.pretty.doc.Docformula(@NotNull BaseDistiller.Outer outer, @NotNull org.aya.guest0x0.cubical.Formula<Term> formula) static @NotNull org.aya.pretty.doc.Docstatic @NotNull org.aya.pretty.doc.Docstatic @NotNull org.aya.pretty.backend.string.LinkIdstatic @NotNull org.aya.pretty.doc.DoclinkListLit(org.aya.pretty.doc.Doc display, @NotNull AnyVar ref, @NotNull org.aya.pretty.doc.Style color) static @NotNull org.aya.pretty.doc.Docstatic @NotNull org.aya.pretty.doc.Docstatic <T extends org.aya.guest0x0.cubical.Restr.TermLike<T> & AyaDocile>
@NotNull org.aya.pretty.doc.Docpartial(@NotNull org.aya.util.distill.DistillerOptions options, @NotNull org.aya.guest0x0.cubical.Partial<T> partial, boolean showEmpty, String lbr, String rbr) static <T extends org.aya.guest0x0.cubical.Restr.TermLike<T> & AyaDocile>
@NotNull org.aya.pretty.doc.Docrestr(@NotNull org.aya.util.distill.DistillerOptions options, @NotNull org.aya.guest0x0.cubical.Restr<T> restr) static <T extends org.aya.guest0x0.cubical.Restr.TermLike<T> & AyaDocile>
@NotNull org.aya.pretty.doc.Docside(@NotNull org.aya.util.distill.DistillerOptions options, org.aya.guest0x0.cubical.Restr.Side<T> side) protected abstract @NotNull org.aya.pretty.doc.Docterm(@NotNull BaseDistiller.Outer outer, Term term) static <T extends AyaDocile>
@NotNull org.aya.pretty.doc.DoctoDoc(@NotNull org.aya.util.distill.DistillerOptions options, @NotNull org.aya.util.Arg<T> self) @NotNull org.aya.pretty.doc.DocunnamedParam(@NotNull ParamLike<Term> param) static @NotNull org.aya.pretty.doc.Doc@NotNull org.aya.pretty.doc.DocvisitArgsCalls(@NotNull DefVar<?, ?> var, @NotNull org.aya.pretty.doc.Style style, @NotNull kala.collection.SeqLike<@NotNull org.aya.util.Arg<Term>> args, @NotNull BaseDistiller.Outer outer) @NotNull org.aya.pretty.doc.DocvisitCalls(@NotNull DefVar<?, ?> var, @NotNull org.aya.pretty.doc.Style style, @NotNull kala.collection.SeqLike<@NotNull org.aya.util.Arg<Term>> args, @NotNull BaseDistiller.Outer outer, boolean showImplicits) @NotNull org.aya.pretty.doc.DocvisitCalls(@Nullable org.aya.util.binop.Assoc assoc, @NotNull org.aya.pretty.doc.Doc fn, @NotNull kala.collection.SeqView<? extends @NotNull org.aya.util.binop.BinOpParser.Elem<Term>> args, @NotNull BaseDistiller.Outer outer, boolean showImplicits) @NotNull org.aya.pretty.doc.DocPretty-print a telescope in a dumb (but conservative) way.@NotNull org.aya.pretty.doc.DocvisitTele(@NotNull kala.collection.Seq<? extends ParamLike<Term>> telescope, Term body, @NotNull ToIntBiFunction<Term, AnyVar> altF7) Pretty-print a telescope in a smart way.
-
Field Details
-
KEYWORD
@NotNull public static final @NotNull org.aya.pretty.doc.Style KEYWORD -
PRIM_CALL
@NotNull public static final @NotNull org.aya.pretty.doc.Style PRIM_CALL -
FN_CALL
@NotNull public static final @NotNull org.aya.pretty.doc.Style FN_CALL -
DATA_CALL
@NotNull public static final @NotNull org.aya.pretty.doc.Style DATA_CALL -
STRUCT_CALL
@NotNull public static final @NotNull org.aya.pretty.doc.Style STRUCT_CALL -
CON_CALL
@NotNull public static final @NotNull org.aya.pretty.doc.Style CON_CALL -
FIELD_CALL
@NotNull public static final @NotNull org.aya.pretty.doc.Style FIELD_CALL -
GENERALIZED
@NotNull public static final @NotNull org.aya.pretty.doc.Style GENERALIZED -
options
@NotNull public final @NotNull org.aya.util.distill.DistillerOptions options
-
-
Constructor Details
-
BaseDistiller
protected BaseDistiller(@NotNull @NotNull org.aya.util.distill.DistillerOptions options)
-
-
Method Details
-
toDoc
@NotNull public static <T extends AyaDocile> @NotNull org.aya.pretty.doc.Doc toDoc(@NotNull @NotNull org.aya.util.distill.DistillerOptions options, @NotNull @NotNull org.aya.util.Arg<T> self) -
term
@NotNull protected abstract @NotNull org.aya.pretty.doc.Doc term(@NotNull @NotNull BaseDistiller.Outer outer, @NotNull Term term) -
visitCalls
@NotNull public @NotNull org.aya.pretty.doc.Doc visitCalls(@Nullable @Nullable org.aya.util.binop.Assoc assoc, @NotNull @NotNull org.aya.pretty.doc.Doc fn, @NotNull @NotNull kala.collection.SeqView<? extends @NotNull org.aya.util.binop.BinOpParser.Elem<Term>> args, @NotNull @NotNull BaseDistiller.Outer outer, boolean showImplicits) -
visitCalls
@NotNull public @NotNull org.aya.pretty.doc.Doc visitCalls(@NotNull @NotNull DefVar<?, ?> var, @NotNull @NotNull org.aya.pretty.doc.Style style, @NotNull @NotNull kala.collection.SeqLike<@NotNull org.aya.util.Arg<Term>> args, @NotNull @NotNull BaseDistiller.Outer outer, boolean showImplicits) -
visitArgsCalls
@NotNull public @NotNull org.aya.pretty.doc.Doc visitArgsCalls(@NotNull @NotNull DefVar<?, ?> var, @NotNull @NotNull org.aya.pretty.doc.Style style, @NotNull @NotNull kala.collection.SeqLike<@NotNull org.aya.util.Arg<Term>> args, @NotNull @NotNull BaseDistiller.Outer outer) -
arg
public static <T extends AyaDocile> org.aya.pretty.doc.Doc arg(@NotNull @NotNull BaseDistiller.Fmt<T> fmt, @NotNull org.aya.util.binop.BinOpParser.Elem<T> arg, @NotNull @NotNull BaseDistiller.Outer outer) -
checkParen
@NotNull public static @NotNull org.aya.pretty.doc.Doc checkParen(@NotNull @NotNull BaseDistiller.Outer outer, @NotNull @NotNull org.aya.pretty.doc.Doc binApp, @NotNull @NotNull BaseDistiller.Outer binOp) -
visitTele
@NotNull public @NotNull org.aya.pretty.doc.Doc visitTele(@NotNull @NotNull kala.collection.Seq<? extends ParamLike<Term>> telescope) Pretty-print a telescope in a dumb (but conservative) way. -
visitTele
@NotNull public @NotNull org.aya.pretty.doc.Doc visitTele(@NotNull @NotNull kala.collection.Seq<? extends ParamLike<Term>> telescope, @Nullable Term body, @NotNull @NotNull ToIntBiFunction<Term, AnyVar> altF7) Pretty-print a telescope in a smart way. The bindings that are not used in the telescope/body are omitted. Bindings of the same type (by 'same' I meanObjects.equalsreturns true) are merged together.- Parameters:
body- the body of the telescope (like the return type in a pi type), only used for finding usages (of the variables in the telescope).altF7- a function for finding usages.- See Also:
-
varDoc
-
linkDef
@NotNull public static @NotNull org.aya.pretty.doc.Doc linkDef(@NotNull @NotNull AnyVar ref, @NotNull @NotNull org.aya.pretty.doc.Style color) -
linkRef
@NotNull public static @NotNull org.aya.pretty.doc.Doc linkRef(@NotNull @NotNull AnyVar ref, @NotNull @NotNull org.aya.pretty.doc.Style color) -
linkIdOf
@NotNull public static @NotNull org.aya.pretty.backend.string.LinkId linkIdOf(@NotNull @NotNull AnyVar ref) -
linkLit
@NotNull public static @NotNull org.aya.pretty.doc.Doc linkLit(int literal, @NotNull @NotNull AnyVar ref, @NotNull @NotNull org.aya.pretty.doc.Style color) -
linkListLit
@NotNull public static @NotNull org.aya.pretty.doc.Doc linkListLit(org.aya.pretty.doc.Doc display, @NotNull @NotNull AnyVar ref, @NotNull @NotNull org.aya.pretty.doc.Style color) -
linkDef
-
defVar
-
cube
@NotNull public static @NotNull org.aya.pretty.doc.Doc cube(@NotNull @NotNull org.aya.util.distill.DistillerOptions options, @NotNull PathTerm.Cube cube) -
formula
@NotNull public @NotNull org.aya.pretty.doc.Doc formula(@NotNull @NotNull BaseDistiller.Outer outer, @NotNull @NotNull org.aya.guest0x0.cubical.Formula<Term> formula) -
partial
@NotNull public static <T extends org.aya.guest0x0.cubical.Restr.TermLike<T> & AyaDocile> @NotNull org.aya.pretty.doc.Doc partial(@NotNull @NotNull org.aya.util.distill.DistillerOptions options, @NotNull @NotNull org.aya.guest0x0.cubical.Partial<T> partial, boolean showEmpty, String lbr, String rbr) -
restr
@NotNull public static <T extends org.aya.guest0x0.cubical.Restr.TermLike<T> & AyaDocile> @NotNull org.aya.pretty.doc.Doc restr(@NotNull @NotNull org.aya.util.distill.DistillerOptions options, @NotNull @NotNull org.aya.guest0x0.cubical.Restr<T> restr) -
side
@NotNull public static <T extends org.aya.guest0x0.cubical.Restr.TermLike<T> & AyaDocile> @NotNull org.aya.pretty.doc.Doc side(@NotNull @NotNull org.aya.util.distill.DistillerOptions options, @NotNull org.aya.guest0x0.cubical.Restr.Side<T> side) -
cofib
@NotNull public static <T extends org.aya.guest0x0.cubical.Restr.TermLike<T> & AyaDocile> @NotNull org.aya.pretty.doc.Doc cofib(@NotNull @NotNull org.aya.util.distill.DistillerOptions options, @NotNull org.aya.guest0x0.cubical.Restr.Conj<T> conj) -
unnamedParam
-
chooseStyle
-