Package hydra
Interface Annotations
-
public interface AnnotationsUtilities for reading and writing type and term annotations
-
-
Method Summary
Static Methods Modifier and Type Method Description static <T0,T1,T2,T3>
PersistentMap<T2,T3>aggregateAnnotations(java.util.function.Function<T0,Maybe<T1>> getValue, java.util.function.Function<T1,T0> getX, java.util.function.Function<T1,PersistentMap<T2,T3>> getAnns, T0 t)static <T0,T1,T2,T3>
ConsList<ConsList<Pair<T2,T3>>>aggregateAnnotations_toPairs(java.util.function.Function<T1,PersistentMap<T2,T3>> getAnns, java.util.function.Function<T0,Maybe<T1>> getValue, java.util.function.Function<T1,T0> getX, ConsList<ConsList<Pair<T2,T3>>> rest, T0 t)static Either<InContext<Error_>,java.lang.Void>debugIf(Context cx, java.lang.String debugId, java.lang.String message)static Either<InContext<Error_>,java.lang.Void>failOnFlag(Context cx, Name flag, java.lang.String msg)static Maybe<Term>getAttr(Name key, Context cx)static TermgetAttrWithDefault(Name key, Term def, Context cx)static java.lang.IntegergetCount(Name key, Context cx)static Either<InContext<Error_>,Maybe<java.lang.String>>getDebugId(Context cx)static Either<InContext<Error_>,Maybe<java.lang.String>>getDescription(Context cx, Graph graph, PersistentMap<Name,Term> anns)static Maybe<Term>getTermAnnotation(Name key, Term term)static Either<InContext<Error_>,Maybe<java.lang.String>>getTermDescription(Context cx, Graph graph, Term term)static Either<DecodingError,Maybe<Type>>getType(Graph graph, PersistentMap<Name,Term> anns)static Maybe<Term>getTypeAnnotation(Name key, Type typ)static Either<InContext<Error_>,PersistentMap<Name,PersistentSet<TypeClass>>>getTypeClasses(Context cx, Graph graph, Term term)static Either<InContext<Error_>,Maybe<java.lang.String>>getTypeDescription(Context cx, Graph graph, Type typ)static <T0> java.lang.BooleanhasDescription(PersistentMap<Name,T0> anns)static Either<InContext<Error_>,java.lang.Boolean>hasFlag(Context cx, Name flag)static java.lang.BooleanhasTypeDescription(Type typ)static java.lang.BooleanisNativeType(Binding el)static Pair<java.lang.Integer,Context>nextCount(Name key, Context cx)static TermnormalizeTermAnnotations(Term term)static TypenormalizeTypeAnnotations(Type typ)static ContextputAttr(Name key, Term val, Context cx)static ContextputCount(Name key, java.lang.Integer count, Context cx)static ContextresetCount(Name key, Context cx)static <T0,T1>
PersistentMap<T0,T1>setAnnotation(T0 key, Maybe<T1> val, PersistentMap<T0,T1> m)static PersistentMap<Name,Term>setDescription(Maybe<java.lang.String> d, PersistentMap<Name,Term> v1)static TermsetTermAnnotation(Name key, Maybe<Term> val, Term term)static TermsetTermDescription(Maybe<java.lang.String> d, Term v1)static PersistentMap<Name,Term>setType(Maybe<Type> mt, PersistentMap<Name,Term> v1)static TypesetTypeAnnotation(Name key, Maybe<Term> val, Type typ)static TermsetTypeClasses(PersistentMap<Name,PersistentSet<TypeClass>> m, Term term)static TypesetTypeDescription(Maybe<java.lang.String> d, Type v1)static PersistentMap<Name,Term>termAnnotationInternal(Term term)static PersistentMap<Name,Term>typeAnnotationInternal(Type typ)static BindingtypeElement(Name name, Type typ)static <T0> Either<InContext<Error_>,T0>whenFlag(Context cx, Name flag, Either<InContext<Error_>,T0> ethen, Either<InContext<Error_>,T0> eelse)
-
-
-
Method Detail
-
aggregateAnnotations
static <T0,T1,T2,T3> PersistentMap<T2,T3> aggregateAnnotations(java.util.function.Function<T0,Maybe<T1>> getValue, java.util.function.Function<T1,T0> getX, java.util.function.Function<T1,PersistentMap<T2,T3>> getAnns, T0 t)
-
aggregateAnnotations_toPairs
static <T0,T1,T2,T3> ConsList<ConsList<Pair<T2,T3>>> aggregateAnnotations_toPairs(java.util.function.Function<T1,PersistentMap<T2,T3>> getAnns, java.util.function.Function<T0,Maybe<T1>> getValue, java.util.function.Function<T1,T0> getX, ConsList<ConsList<Pair<T2,T3>>> rest, T0 t)
-
debugIf
static Either<InContext<Error_>,java.lang.Void> debugIf(Context cx, java.lang.String debugId, java.lang.String message)
-
failOnFlag
static Either<InContext<Error_>,java.lang.Void> failOnFlag(Context cx, Name flag, java.lang.String msg)
-
getDescription
static Either<InContext<Error_>,Maybe<java.lang.String>> getDescription(Context cx, Graph graph, PersistentMap<Name,Term> anns)
-
getTermDescription
static Either<InContext<Error_>,Maybe<java.lang.String>> getTermDescription(Context cx, Graph graph, Term term)
-
getType
static Either<DecodingError,Maybe<Type>> getType(Graph graph, PersistentMap<Name,Term> anns)
-
getTypeClasses
static Either<InContext<Error_>,PersistentMap<Name,PersistentSet<TypeClass>>> getTypeClasses(Context cx, Graph graph, Term term)
-
getTypeDescription
static Either<InContext<Error_>,Maybe<java.lang.String>> getTypeDescription(Context cx, Graph graph, Type typ)
-
hasDescription
static <T0> java.lang.Boolean hasDescription(PersistentMap<Name,T0> anns)
-
hasTypeDescription
static java.lang.Boolean hasTypeDescription(Type typ)
-
isNativeType
static java.lang.Boolean isNativeType(Binding el)
-
setAnnotation
static <T0,T1> PersistentMap<T0,T1> setAnnotation(T0 key, Maybe<T1> val, PersistentMap<T0,T1> m)
-
setDescription
static PersistentMap<Name,Term> setDescription(Maybe<java.lang.String> d, PersistentMap<Name,Term> v1)
-
setType
static PersistentMap<Name,Term> setType(Maybe<Type> mt, PersistentMap<Name,Term> v1)
-
setTypeClasses
static Term setTypeClasses(PersistentMap<Name,PersistentSet<TypeClass>> m, Term term)
-
termAnnotationInternal
static PersistentMap<Name,Term> termAnnotationInternal(Term term)
-
typeAnnotationInternal
static PersistentMap<Name,Term> typeAnnotationInternal(Type typ)
-
-