attenuation: Subtyping relations and variance roles

[ apache, constraints, library ] [ Propose Tags ]

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.


Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS], 0.2.0
Change log
Dependencies base (>=4.12 && <4.19), constraints (>=0.10 && <0.14) [details]
License Apache-2.0
Copyright 2020-2021 Google LLC
Author Andrew Pritchard <>
Maintainer Andrew Pritchard <>
Revised Revision 5 made by AndrewPritchard at 2023-03-12T18:35:52Z
Category Constraints
Home page
Bug tracker
Source repo head: git clone
Uploaded by AndrewPritchard at 2021-10-11T01:43:34Z
Reverse Dependencies 2 direct, 5 indirect [details]
Downloads 415 total (11 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-10-11 [all 1 reports]