@hackage attenuation0.1.0.0
Representational subtyping relations and variance roles.
Categories
License
Apache-2.0
Maintainer
Andrew Pritchard <awpr@google.com>
Links
Versions
Installation
Dependencies (2)
- base >=4.12 && <4.17
- profunctors >=0.1 && <5.7 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.