invariant
Haskell98 invariant functors
https://github.com/nfrisby/invariant-functors
| LTS Haskell 24.27: | 0.6.4@rev:1 |
| Stackage Nightly 2026-01-12: | 0.6.5 |
| Latest on Hackage: | 0.6.5 |
BSD-2-Clause licensed by Nicolas Frisby
Maintained by Nicolas Frisby, Ryan Scott
This version can be pinned in stack with:
invariant-0.6.5@sha256:96f6eec31b5ebd04d09dcc12e7a4f869bc920da72347b9578b0ecbe126125833,3319Module documentation for 0.6.5
- Data
- Data.Functor
Depends on 14 packages(full list with versions):
Used by 8 packages in nightly-2026-01-12(full list with versions):
Changes
0.6.5 [2026.01.10]
- Remove unused
ghc-primandtransformers-compatdependencies. - Allow building with
template-haskell-2.24.*(GHC 9.14).
0.6.4 [2024.12.05]
- Drop support for pre-8.0 versions of GHC.
0.6.3 [2024.03.19]
- Support building with
template-haskell-2.22.*(GHC 9.10).
0.6.2 [2023.08.06]
- The Template Haskell machinery now uses
TemplateHaskellQuoteswhen building with GHC 8.0+ instead of manually constructing each Template HaskellName. A consequence of this is thatinvariantwill now build with GHC 9.8, asTemplateHaskellQuotesabstracts over some internal Template Haskell changes introduced in 9.8.
0.6.1 [2023.02.27]
- Support
th-abstraction-0.5.*.
0.6 [2022.07.03]
- Loosen the
Monadconstraint in theInvariant(2)instances forKleislito anInvariantconstraint. - Loosen the
Comonadconstraint in theInvariant2instance forCokleislito anInvariantconstraint. - Add
Invariantinstances forPastroSum,CopastroSum,Environment,FreeMapping,Pastro, andFreeTraversingfrom theprofunctorslibrary. - Add
Invariant(2)instances forCopastroandCoyonedafrom theprofunctorslibrary.
0.5.6 [2022.05.07]
- Add
InvariantProfunctorandInvariantArrownewtypes that admit implementations ofinvmapthat only requireProfunctororArrowconstraints, respectively. Also add top-levelinvmapProfunctorandinvmapArrowfunctions.
0.5.5 [2021.11.01]
- Allow building with GHC 9.2.
- Allow building with
transformers-0.6.*.
0.5.4 [2020.10.01]
- Fix a bug in which
deriveInvariant2would fail on certain data types with three or parameters if the first two parameters had phantom roles. - Fix a bug in which
deriveInvariant(2)would fail on sufficiently complex uses of rank-n types in constructor fields. - Fix a bug in which
deriveInvariant(2)would needlessly reject data types whose two last type parameters appear as oversaturated arguments to a type family.
0.5.3 [2019.05.02]
- Implement
foldMap'in theFoldableinstance forWrappedFunctorwhen building withbase-4.13or later.
0.5.2 [2019.04.26]
- Support
th-abstraction-0.3.0.0or later. - Only incur a
semigroupsdependency on old GHCs.
0.5.1 [2018.07.15]
- Depend on
QuickCheck-2.11or later in the test suite. - Some Haddock fixes in
Data.Functor.Invariant.TH.
0.5 [2017.12.07]
Data.Functor.Invariant.THnow derivesinvmap(2)implementations for empty data types that are strict in the argument.- When using
Data.Functor.Invariant.THto deriveInvariant(2)instances for data types where the last type variables are at phantom roles, generatedinvmap(2)implementations now usecoercefor efficiency. - Add
OptionstoData.Functor.Invariant.TH, along with variants of existing functions that takeOptionsas an argument. For now, the only configurable option is whether derived instances for empty data types should use theEmptyCaseextension (this is disabled by default).
0.4.3 [2017.07.31]
- Add
Invariant(2)instances forData.Profunctor.Yoneda.Yoneda.
0.4.2 [2017.04.24]
invariant.cabalused to incorrectly state the license was BSD3 when it was in fact BSD2. This is now fixed.
0.4.1
- Fix the
Invariant V1instance so as toseqits argument - Allow building with
template-haskell-2.12
0.4
- Allow TH derivation of
Invariant(2)instances for datatypes containing unboxed tuple types - Ensure
Invariant(2)instances are in-scope when importingData.Functor.Invariant - Add
InvariantandInvariant2instances forKleisliandCokleisli - Add
CategoryandArrow-like instances forWrappedProfunctor
0.3.1
- Rewrote
Data.Functor.Invariant.TH’s type inferencer. This avoids a nasty GHC 7.8-specific bug involving derivedInvariant(2)instances for data families. - Add
Invariantinstances forData.Complex.Complex,Data.Monoid.Product, andData.Monoid.Sum
0.3
- Require
bifunctors-5.2andprofunctors-5.2. AddInvariant(2)instances for newly introduced datatypes from those packages. - Add
ProfunctorFunctor,ProfunctorMonad,ProfunctorComonad,Mapping, andTraversinginstances forWrappedProfunctor - Add
StateVaras a dependency. AddInvariantinstances forStateVarandSettableStateVar. - Add
Invariantinstances forURec(added toGHC.Genericsinbase-4.9.0.0)
0.2.2
- Add
genericInvmapfunction (and make it the default implementation ofinvmapforInvariantinstances) on GHC 7.2 or later - Make
Taggedinstance poly-kinded
0.2.1
- Add
FoldableandTraversableinstances forWrappedFunctor - Fixed build on GHC HEAD
0.2
- Support deriving
InvariantandInvariant2instances with Template Haskell - Added
invmapFunctor,invmapContravariant,invmap2Bifunctor, andinvmap2Profunctorto make definingInvmapandInvmap2instances somewhat easier - Added
WrappedFunctor,WrappedContravariant,WrappedBifunctor, andWrappedProfunctordata types to allow use ofinvmapandinvmap2for data types that aren’tInvariantorInvariant2instances. - Added
Invariantinstances for lazyST,ArrowMonad,Handler,Identity,First,Last,Alt,Proxy,ArgDescr,ArgOrder, andOptDescr - Added
InvariantandInvariant2instances for data types in thearray,bifunctors,containers,profunctors,semigroups,stm,tagged,transformers, andunordered-containerslibraries
0.1.2
- Add
Invariantinstances forDualandEndo
0.1.1
- Bump
contravariantupper version bounds
0.1.0
- Initial commit