I am working with some Dhall types like
let SimpleCollector : Type
= < Regex : RegexCollector
| Method : MethodCollector
| Implements : ImplementsCollector
| Extends : ExtendsCollector
| Uses : UsesCollector
| Inherits : InheritsCollector
>
let BoolCollector : Type
= { type: Text
, must : List SimpleCollector
, must_not : List SimpleCollector
}
let Collector : Type
= < Regex : RegexCollector
| Method : MethodCollector
| Implements : ImplementsCollector
| Extends : ExtendsCollector
| Uses : UsesCollector
| Inherits : InheritsCollector
| Bool : BoolCollector
>
This creates a duplication between SimpleCollector
and Collector
constructors, which causes a bit of confusion.
Is it possible to avoid such duplication, maybe saying that Collector
extends SimpleCollector
with the BoolCollector
case?