------------------------------------------------------------------------------- |-- Module : Data.Semigroupoid.Dual-- Copyright : (C) 2007-2011 Edward Kmett-- License : BSD-style (see the file LICENSE)---- Maintainer : Edward Kmett <ekmett@gmail.com>-- Stability : provisional-- Portability : portable---- A semigroupoid satisfies all of the requirements to be a Category except-- for the existence of identity arrows.----------------------------------------------------------------------------
module Data.Semigroupoid.Dual (Dual(..)) where
import Data.Semigroupoid
import Control.Category
import Prelude ()
newtype Dualkab = Dual { getDual :: kba }
instance Semigroupoid k =>Semigroupoid (Dualk) where
Dualf`o`Dualg = Dual (g`o`f)
instance Category k =>Category (Dualk) where
id = DualidDualf.Dualg = Dual (g.f)