advent-0.1.0.0: Advent of Code common library
Copyright(c) Eric Mertens 2021
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

Advent.Group

Description

 
Synopsis

Documentation

class Monoid a => Group a where Source #

Methods

inverse :: a -> a Source #

Instances

Instances details
KnownNat n => Group (Permutation n) Source # 
Instance details

Defined in Advent.Permutation

Fractional a => Group (Product a) Source # 
Instance details

Defined in Advent.Group

Methods

inverse :: Product a -> Product a Source #

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

Defined in Advent.Group

Methods

inverse :: Sum a -> Sum a Source #

class Semigroup b => RightAction a b where Source #

Methods

rightAction :: a -> b -> a Source #

data a ><| b Source #

Outer semi-direct product

Constructors

a :><| b 

Instances

Instances details
(Semigroup a, Monoid a, Group b, RightAction a b) => Monoid (a ><| b) Source # 
Instance details

Defined in Advent.Group

Methods

mempty :: a ><| b #

mappend :: (a ><| b) -> (a ><| b) -> a ><| b #

mconcat :: [a ><| b] -> a ><| b #

(Semigroup a, Semigroup b, Group b, RightAction a b) => Semigroup (a ><| b) Source # 
Instance details

Defined in Advent.Group

Methods

(<>) :: (a ><| b) -> (a ><| b) -> a ><| b #

sconcat :: NonEmpty (a ><| b) -> a ><| b #

stimes :: Integral b0 => b0 -> (a ><| b) -> a ><| b #

(Show a, Show b) => Show (a ><| b) Source # 
Instance details

Defined in Advent.Group

Methods

showsPrec :: Int -> (a ><| b) -> ShowS #

show :: (a ><| b) -> String #

showList :: [a ><| b] -> ShowS #