AlgebraicJulia / AlgebraicJulia/TraitInterfaces.jl
Explicit type parameters for wrapper types
- Langage dominant
- Julia
- Étoiles
- 4
- Forks
- 0
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Currently we support declaring a wrapper type to be a subtype of some abstract type, e.g.
```julia
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
```julia
ThMonoid.Meta.@typed_wrapper Monoid <: AbsAlgType
```
The problem is that, if the abstract type itself has parameters, such as `AbstractAlgType{T}`, we *cannot* do:
```julia
ThMonoid.Meta.@typed_wrapper Monoid{T} <: AbsAlgType{T}
```
So the `@typed_wrapper` macro should be extended to allow this.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.