involutive-semigroups-0.1.0.0: Semigroups with involution.

Safe HaskellNone
LanguageHaskell2010

Data.Semigroup.Involutive

Description

Semigroups with involution.

Synopsis

Documentation

class Semigroup a => Involutive a where Source #

Involutive lies between Semigroup and Group, orthogonally to Monoid. Instances should satisfy the following:

Involution
rev (rev x) = x
Reversal
rev (x <> y) = rev y <> rev x

An Involutive Monoid should additionally satisfy:

Identity
rev mempty = mempty

Note that, in a commutative Semigroup, we could lawfully take rev = id if all else failed. This would be bad, so we have not done so here.

Methods

rev :: a -> a Source #

An "inverse-like" unary operation. Suggestively named rev because the best example (that isn't just a group inverse) is the reverse operation on a sequence type.

Instances
Involutive () Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: () -> () Source #

Involutive Void Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Void -> Void Source #

Involutive ByteString Source # 
Instance details

Defined in Data.Semigroup.Involutive

Involutive ByteString Source # 
Instance details

Defined in Data.Semigroup.Involutive

Involutive Text Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Text -> Text Source #

Involutive Text Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Text -> Text Source #

Involutive [a] Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: [a] -> [a] Source #

Involutive a => Involutive (Maybe a) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Maybe a -> Maybe a Source #

Involutive p => Involutive (Par1 p) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Par1 p -> Par1 p Source #

Involutive a => Involutive (Identity a) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Identity a -> Identity a Source #

Involutive a => Involutive (Dual a) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Dual a -> Dual a Source #

Num a => Involutive (Sum a) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Sum a -> Sum a Source #

Involutive a => Involutive (Down a) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Down a -> Down a Source #

Involutive (NonEmpty a) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: NonEmpty a -> NonEmpty a Source #

Involutive (Seq a) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Seq a -> Seq a Source #

Unbox a => Involutive (Vector a) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Vector a -> Vector a Source #

Storable a => Involutive (Vector a) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Vector a -> Vector a Source #

Prim a => Involutive (Vector a) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Vector a -> Vector a Source #

Involutive (Vector a) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Vector a -> Vector a Source #

Involutive b => Involutive (a -> b) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: (a -> b) -> a -> b Source #

Involutive (V1 p) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: V1 p -> V1 p Source #

Involutive (U1 p) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: U1 p -> U1 p Source #

(Involutive a, Involutive b) => Involutive (a, b) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: (a, b) -> (a, b) Source #

Involutive a => Involutive (Op a b) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Op a b -> Op a b Source #

Involutive (Proxy s) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Proxy s -> Proxy s Source #

Involutive (f p) => Involutive (Rec1 f p) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Rec1 f p -> Rec1 f p Source #

(Involutive a, Involutive b, Involutive c) => Involutive (a, b, c) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: (a, b, c) -> (a, b, c) Source #

Involutive a => Involutive (Const a b) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: Const a b -> Const a b Source #

Involutive c => Involutive (K1 i c p) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: K1 i c p -> K1 i c p Source #

(Involutive (f p), Involutive (g p)) => Involutive ((f :*: g) p) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: (f :*: g) p -> (f :*: g) p Source #

(Involutive a, Involutive b, Involutive c, Involutive d) => Involutive (a, b, c, d) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: (a, b, c, d) -> (a, b, c, d) Source #

Involutive (f p) => Involutive (M1 i c f p) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: M1 i c f p -> M1 i c f p Source #

Involutive (f (g p)) => Involutive ((f :.: g) p) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: (f :.: g) p -> (f :.: g) p Source #

(Involutive a, Involutive b, Involutive c, Involutive d, Involutive e) => Involutive (a, b, c, d, e) Source # 
Instance details

Defined in Data.Semigroup.Involutive

Methods

rev :: (a, b, c, d, e) -> (a, b, c, d, e) Source #