AlgebraicJulia / AlgebraicJulia/TraitInterfaces.jl
Explicit type parameters for wrapper types
- Lingua principale
- Julia
- Stelle
- 4
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.