module Data.Unital ( module Data.Magma , Unital (..) ) where import Control.Applicative import Data.Magma -- | A 'Unital' is a 'Magma' with an identity. @x+zero = x = zero+x@. class Magma m => Unital m where unit :: m instance Unital b => Unital (a -> b) where unit = point unit