BSD-3-Clause licensed by Edward A. Kmett
Maintained by Edward A. Kmett

Module documentation for 1.5.2

This version can be pinned in stack with:contravariant-1.5.2@sha256:853259271870000c007a281f0bf0bf6e1aaa97c5fd5cd5734d7b0d79b9de2af5,2761


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.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.