Skip to content

Explicit type parameters for wrapper types #6

@kris-brown

Description

@kris-brown

Currently we support declaring a wrapper type to be a subtype of some abstract type, e.g.

ThMonoid.Meta.@wrapper Monoid <: AbsAlgType

This creates smart constructor struct Monoid <: AbsAlgType which wraps implementations of ThMonoid.

We can also use a variant which produces a type Monoid{T} where T is the julia type of the underlying set

ThMonoid.Meta.@typed_wrapper Monoid <: AbsAlgType

The problem is that, if the abstract type itself has parameters, such as AbstractAlgType{T}, we cannot do:

ThMonoid.Meta.@typed_wrapper Monoid{T} <: AbsAlgType{T}

So the @typed_wrapper macro should be extended to allow this.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions