@hackage finitary-optics1.0.0.0
Prisms and Isos between finitary types.
Categories
License
GPL-3.0-or-later
Maintainer
Sam Derbyshire
Links
- Homepage
- Documentation
- No source repository
- Changelog
- Security
Versions
- 1.0.0.0 Tue, 9 Feb 2021
Installation
Tested Compilers
Dependencies (4)
- base >=4.12 && <5
- finitary >=2.0.0.0 && <2.2
- finite-typelits ^>=0.1.4.2
- optics-core ^>=0.3 Show all…
Dependents (0)
finitary-optics
What's this all about, then?
If a type has an instance of Finitary, we know the type's cardinality n, and
can convert any (non-bottom) inhabitant to a value of Finite n. We can use
this to inter-convert between these types. This can sometimes be useful.
This library provides some optics (specifically a Prism and an Iso)
which help us do this kind of conversion more conveniently.
Sounds good! Can I use it?
We've tested this library on GHCs 8.6.5, 8.8.3 and 8.10.1, on GNU/Linux x86_64. If you use this library on any other platforms, let us know how it goes - especially if something breaks!
License
This library is under the GNU General Public License, version 3 or later (SPDX
code GPL-3.0-or-later). For more details, see the LICENSE.md file.