`ConstrainedChunk` vs `ConstrConcept`, and their design
A ConstrainedChunk and ConstrConcept are very similar. Differences:
- The
ConstrConceptextends aDefinedQuantityDict, and inherits two typeclass instances:DefinitionandConceptDomain. - The
ConstrConceptisExpressible (inModelExpr).
Depending on how #4061 is resolved (i.e., if D-Q-D and Q-D- are merged), these two chunks might just be merged as well!
However, regardless of the above, is the "extension" design correct here? Why aren't constraints a part of any variable definition (i.e., a part of [Defined]QuantityDict)?
I'm pretty sure that these exist as separate chunks purely for technical reasons, i.e. because they extend slightly different chunks.
The bigger question is a good one: why not enable constraints for all variable definitions? I guess we wanted some things that assuredly had constraints, I think. But that may not really be needed, especially as it is a list and not a non-empty list. So pushing that list of constraints down one level and getting rid of these 2 chunks is probably fine.