BSD-3-Clause licensed by Edward A. Kmett
Maintained by Edward A. Kmett
This version can be pinned in stack with:contravariant-1.5.5@sha256:470ed0e040e879e2da4af1b2c8f94e199f6135852a8107858d5ae0a95365835f,3041

Module documentation for 1.5.5


Hackage Build Status

Haskell 98 contravariant functors

Contact Information

Contributions and bug reports are welcome!

Please feel free to contact me through github or on the #haskell IRC channel on

-Edward Kmett


1.5.5 [2021.07.27]

  • Fix the build on old GHCs using transformers-0.6.*.

1.5.4 [2021.07.25]

  • Allow building with transformers-0.6.*.

1.5.3 [2020.12.30]

  • Explicitly mark modules as Safe.

1.5.2 [2019.06.03]

  • Mark Data.Functor.Contravariant and Data.Functor.Contravariant.Generic as unconditionally Trustworthy.

1.5.1 [2019.05.02]

  • Remove the use of unsafeCoerce in Data.Functor.Contravariant.Generic. As a result, the safe flag has been removed, as it is no longer used.

1.5 [2018.07.01]

  • Support building with GHC 8.6, where Data.Functor.Contravariant has been moved into base.

1.4.1 [2018.01.18]

  • Add Semigroup and Monoid instances for Predicate.
  • Add lots of documentation explaining Contravariant, Divisible, and Decidable.
  • Fix some dodgy CPP usage that caused the build to fail on Eta.


  • Improved the performance of Deciding at the cost of downgrading it to Trustworthy.
  • Support for GHC 8
  • Support for transformers 0.5


  • Add instance Monoid m => Divisible (Const m)


  • Add ($<) operator

  • Fixed builds on GHC 7.2


  • Added Data.Functor.Contravariant.Generic on GHC 7.4+


  • We’ve merged the foreign-var and StateVar packages. Transferring support to StateVar.

  • Fixed redundant import warnings on GHC 7.10.


  • Added foreign-var support.


  • Added phantom to Data.Functor.Contravariant. This combinator was formerly called coerce in the lens package, but GHC 7.8 added a coerce method to base with a different meaning.
  • Added an unsupported -f-semigroups build flag that disables support for the semigroups package.
  • Minor documentation improvements.

  • Fix build on GHC 7.0.4


  • Renamed Data.Functor.Contravariant.Applicative to Data.Functor.Contravariant.Divisible


  • Added Data.Functor.Contravariant.Applicative


  • Removed Day convolution. The right adjoint of Day convolution is in kan-extensions as the right Kan lift. Moving these there to avoid forcing orphan instances. It also rather dramatically reduces the number of extensions required.
  • This requires a first digit bump as it breaks several of my own packages.

  • Fixed issue with needing KindSignatures on older GHCs


  • Added covariant Day convolution. It isn’t contravariant, but it is inspired by the contravariant construction.


  • transformers 0.4 compatibility


  • Added (>$)
  • Added instances for GHC.Generics


  • Fixed compatibility with GHC 7.7 and tightened Safe Haskell support.


  • Added Day convolution under Data.Functor.Contravariant.Day.


  • Added Backwards and Reverse instances for transformers 0.3
  • Added instance (Functor f, Contravariant g) => Contravariant (Compose f g). (This is non-canonical, but is necessary to support other packages.)
  • Added Functor instances to ComposeFC and ComposeCF for use when modeling phantom type parameters caused mixing Functor + Contravariant.