hydra.templates module
A utility which instantiates a nonrecursive type with default values.
- hydra.templates.graph_to_schema(cx: T0, graph: Graph, els: Sequence[Binding]) object
Decode a list of type-encoding bindings into a map of named types.
- hydra.templates.instantiate_template(cx: T0, minimal: bool, schema: Mapping[Name, Type], tname: Name, t: Type) object
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.