hydra.typed module

Typed (phantom) wrappers for use with Hydra DSLs.

class hydra.typed.TypedBinding(name: Annotated[Name, 'The name of the term'], term: Annotated[TypedTerm[A], 'The term with its phantom type'])

Bases: Generic[A]

An association of a named term (element) with a phantom type.

class Builder(_name: 'hydra.core.Name' = None, _term: 'TypedTerm[A]' = None)

Bases: Generic[A]

build()
name(name)
term(term)
NAME = Name(value='name')
TERM = Name(value='term')
TYPE_ = Name(value='hydra.typed.TypedBinding')
static builder()
name: Annotated[Name, 'The name of the term']
term: Annotated[TypedTerm[A], 'The term with its phantom type']
with_name(name)
with_term(term)
class hydra.typed.TypedName(value: T)

Bases: Node[hydra.core.Name], Generic[A]

An association of a name with a phantom type.

TYPE_ = Name(value='hydra.typed.TypedName')
class hydra.typed.TypedTerm(value: T)

Bases: Node[hydra.core.Term], Generic[A]

An association of a term with a phantom type.

TYPE_ = Name(value='hydra.typed.TypedTerm')
class hydra.typed.TypedTermDefinition(name: Annotated[Name, 'The name of the term'], term: Annotated[TypedTerm[A], 'The term with its phantom type'])

Bases: Generic[A]

An association of a term definition with a phantom type.

class Builder(_name: 'hydra.core.Name' = None, _term: 'TypedTerm[A]' = None)

Bases: Generic[A]

build()
name(name)
term(term)
NAME = Name(value='name')
TERM = Name(value='term')
TYPE_ = Name(value='hydra.typed.TypedTermDefinition')
static builder()
name: Annotated[Name, 'The name of the term']
term: Annotated[TypedTerm[A], 'The term with its phantom type']
with_name(name)
with_term(term)