swap and assoc: Symmetric and Semigroupy Bifunctors

Version on this page:1.0.2@rev:3
LTS Haskell 20.15:1.0.2@rev:4
Stackage Nightly 2023-03-20:1.0.2@rev:4
Latest on Hackage:1.1

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.0.2@sha256:93b8d43aa081e4205116a139f7cf690f608968161d19ebfb23d884d19b082b57,1253

Module documentation for 1.0.2

Used by 4 packages in nightly-2023-02-09(full list with versions):

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



  • Add ‘Swap’ instances for more n-tuples


  • Add Assoc Const and Tagged instances