either-n: Data types like Either but with more constructors

Data types like Either but with more constructors, and optics for the
constructors of any sum type.
Either3
Either3 a b c is a value of one of three types, with the constructors
First3, Second3 and Third3. The Functor, Applicative and Monad
instances act on the third type parameter, so First3 and Second3
short-circuit, in the same way Left does for Either.
Either3T
Either3T f a b c is an Either3 inside a type constructor f, in the
same way that ExceptT e m a is m (Either e a). Use _Wrapped to convert
between Either3T f a b c and f (Either3 a b c). The mtl classes are
lifted from f.
Injections
Data.Lens.Injection provides the classes Injection1 to Injection19,
the sum-type duals of Field1 to Field19 from lens. Where _1 is a lens
to the first field of a product, _I1 is a prism to the first constructor
of a sum. Each class has a default implementation for any type with a
Generic instance.
[Skip to Readme]
Modules
[Index] [Quick Jump]
- Data
- Data.Either3
- Lens
- Data.Lens.Injection
- Data.Lens.Injection.Generic
- Data.Lens.Injection.Injection1
- Data.Lens.Injection.Injection10
- Data.Lens.Injection.Injection11
- Data.Lens.Injection.Injection12
- Data.Lens.Injection.Injection13
- Data.Lens.Injection.Injection14
- Data.Lens.Injection.Injection15
- Data.Lens.Injection.Injection16
- Data.Lens.Injection.Injection17
- Data.Lens.Injection.Injection18
- Data.Lens.Injection.Injection19
- Data.Lens.Injection.Injection2
- Data.Lens.Injection.Injection3
- Data.Lens.Injection.Injection4
- Data.Lens.Injection.Injection5
- Data.Lens.Injection.Injection6
- Data.Lens.Injection.Injection7
- Data.Lens.Injection.Injection8
- Data.Lens.Injection.Injection9
- Data.Lens.Injection
Flags
Manual Flags
| Name | Description | Default |
|---|---|---|
| doctest | Build the doctest test suite, which runs doctest through cabal. It is enabled in cabal.project, and disabled by default so that builds from the source distribution do not need cabal or doctest at test time. | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- either-n-0.1.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0 |
|---|---|
| Change log | changelog.md |
| Dependencies | assoc (>=1.1 && <2), base (>=4.18 && <5), deepseq (>=1.4.8.1 && <2), lens (>=5.2.1 && <6), mtl (>=2.3.1 && <2.4), selective (>=0.7 && <1), semigroupoids (>=6.0.0.1 && <7) [details] |
| Tested with | ghc ==9.14.1, ghc ==9.12.4, ghc ==9.10.3, ghc ==9.8.4, ghc ==9.6.7 |
| License | BSD-3-Clause |
| Copyright | Copyright (c) 2026 Tony Morris |
| Author | Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> <dibblego> |
| Maintainer | Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ> <dibblego> |
| Uploaded | by TonyMorris at 2026-10-02T03:59:49Z |
| Category | Data |
| Home page | https://gitlab.com/tonymorris/either-n |
| Bug tracker | https://gitlab.com/tonymorris/either-n/issues |
| Source repo | head: git clone https://gitlab.com/tonymorris/either-n.git |
| Distributions | |
| Reverse Dependencies | 1 direct, 52 indirect [details] |
| Downloads | 2 total (2 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs uploaded by user Build status unknown [no reports yet] |