monoidplus-0.1: Extra classes/functions about monoids

Data.Monoid.Plus

Documentation

class Monoid t => MonoidPlus t whereSource

Methods

mpempty :: tSource

mpappend :: t -> t -> tSource

mpconcat :: [t] -> tSource

class Monoid t => Group t whereSource

Methods

minverse :: t -> tSource

Instances

Group () 
Num t => Group (Sum t) 
Eq t => Group (Equivalence t) 
(Group a, Group b) => Group (a, b) 
(Group a, Group b, Group c) => Group (a, b, c) 

class MonoidPlus t => MonoidMinus t whereSource

Methods

mpinverse :: t -> tSource

class Monoid t => MonoidNorm t whereSource

Methods

mnormfunc :: [t] -> t -> tSource

mnormalize :: [t] -> [t]Source

Instances

class MonoidPlus t => MonoidPlusNorm t whereSource

Methods

mpnormfunc :: [t] -> t -> tSource

mpnormalize :: [t] -> [t]Source

class (Semiring t, MonoidMinus t) => Ring t Source

Instances

Ring () 
Num t => Ring (Product t) 
Ring (Predicate t) 

(|*|) :: Monoid t => t -> t -> tSource

(|/|) :: Group t => t -> t -> tSource

(|+|) :: MonoidPlus t => t -> t -> tSource

(|-|) :: MonoidMinus t => t -> t -> tSource

data BoundFrac t Source

Instances

(Enum t, Fractional t, Ord t) => Bounded (BoundFrac t) 
(Enum t, Fractional t, Ord t) => Enum (BoundFrac t) 
Eq t => Eq (BoundFrac t) 
(Fractional t, Ord t) => Fractional (BoundFrac t) 
(Num t, Ord t) => Num (BoundFrac t) 
Ord t => Ord (BoundFrac t) 
Real t => Real (BoundFrac t) 
(Real t, Fractional t) => RealFrac (BoundFrac t) 
Show t => Show (BoundFrac t) 

toBoundFrac :: (Num t, Ord t) => t -> BoundFrac tSource

newtype WrapMonoidPlus t Source

Constructors

WrapMonoidPlus t 

Instances

newtype CatEndo c t Source

Constructors

CatEndo 

Fields

runCatEndo :: c t t
 

Instances

Category c => Monoid (CatEndo c t) 

newtype Possibilistic t Source

Constructors

Possibilistic 

Instances

newtype Lukasiewicz t Source

Constructors

Lukasiewicz 

Instances

Eq t => Eq (Lukasiewicz t) 
Ord t => Ord (Lukasiewicz t) 
Show t => Show (Lukasiewicz t) 
(Num t, Ord t) => Monoid (Lukasiewicz t) 
(Num t, Ord t) => MonoidPlus (Lukasiewicz t) 

monoidicMap :: Functor m => (x -> y) -> WriterT x m a -> WriterT y m aSource

mpure :: Applicative f => w -> t -> WriterT w f tSource

type Prob a b = WriterT a [] bSource

pChoose :: Ring p => p -> t -> t -> Prob p tSource

pChoice :: Ring p => p -> Prob p t -> Prob p t -> Prob p tSource

probNorm :: (Semiring p, MonoidPlusNorm p, Eq p, Ord t) => Prob p t -> Prob p tSource

uniform :: (Semiring p, MonoidPlusNorm p) => [t] -> Prob p tSource

probOf :: (Semiring p, MonoidPlusNorm p, Eq p) => (t -> Bool) -> Prob p t -> pSource