@hackage attenuation0.2.0
Subtyping relations and variance roles
Categories
License
Apache-2.0
Maintainer
Andrew Pritchard <awpritchard@gmail.com>
Links
Versions
Installation
Dependencies (2)
- base >=4.12 && <4.19
- constraints >=0.10 && <0.14 Show all…
Dependents (2)
@hackage/fin-int, @hackage/attenuation-profunctors
This lets you coerce containers (among other things) from stronger types to
weaker types with zero runtime cost when it's safe to do so, e.g.
[Fin n] -> [Int]. This primarily comes into play when using newtypes to
impose additional invariants on existing types.