assoc

swap and assoc: Symmetric and Semigroupy Bifunctors

LTS Haskell 24.27:1.1.1@rev:2
Stackage Nightly 2026-01-06:1.1.1@rev:2
Latest on Hackage:1.1.1@rev:2

See all snapshots assoc appears in

BSD-3-Clause licensed and maintained by Oleg Grenrus
This version can be pinned in stack with:assoc-1.1.1@sha256:766b1040eda5255bfcf10e1a9859c06d0ed6ad0e2ac87ed915bb035574d10ae4,1437

Module documentation for 1.1.1

Provides generalisations of swap :: (a,b) -> (b,a) and assoc :: ((a,b),c) -> (a,(b,c)) to Bifunctors supporting similar operations (e.g. Either, These).

Changes

1.1.1

  • Drop support for GHC prior GHC-8.6.5

1.1

  • Depend on bifunctor-classes-compat only. Instances for types defined in bifunctors package are moved there. With this change assoc only depends on base and tagged.
  • Mark modules as explicitly Safe

1.0.2

  • Add ‘Swap’ instances for more n-tuples

1.0.1

  • Add Assoc Const and Tagged instances