Package hydra

Interface Templates


  • public interface Templates
    A utility which instantiates a nonrecursive type with default values
    • Method Detail

      • graphToSchema

        static <T0> Either<DecodingError,​java.util.Map<Name,​Type>> graphToSchema​(T0 cx,
                                                                                             Graph graph,
                                                                                             java.util.List<Binding> els)
        Decode a list of type-encoding bindings into a map of named types
      • instantiateTemplate

        static <T0> Either<Error_,​Term> instantiateTemplate​(T0 cx,
                                                                  java.lang.Boolean minimal,
                                                                  java.util.Map<Name,​Type> schema,
                                                                  Name tname,
                                                                  Type t)
        Given a graph schema and a nonrecursive type, instantiate it with default values. If the minimal flag is set, the smallest possible term is produced; otherwise, exactly one subterm is produced for constructors which do not otherwise require one, e.g. in lists and optionals. The name parameter provides the element name for nominal type construction.
      • instantiateTemplate_noPoly

        static <T1> Either<Error_,​T1> instantiateTemplate_noPoly()