Allow to differentiate between newtypes and datatypes when using Generics
|Reported by:||Feuerbach||Owned by:||dreixel|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
When writing a generic instance, I would like to be able to tell whether the type under consideration has been declared using newtype or data.
For example, in SmallCheck we generate values of certain "depth". It is natural to treat datatype constructors as increasing the depth of the constructed value, and newtype constructors as preserving the depth.
Change History (4)
comment:1 Changed 4 years ago by Feuerbach
- Summary changed from Allow to differentiate between newtypes and datatypes to Allow to differentiate between newtypes and datatypes when using Generics