monus-weighted-search-0.2.0.0: Efficient search weighted by an ordered monoid with monus.
Copyright(c) Donnacha Oisín Kidney 2021
Maintainermail@doisinkidney.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Monus.Max

Description

A Monus for for maximums.

Synopsis

Documentation

data Max a Source #

A type which adds a lower bound to some ordered type.

Constructors

Bot 
In a 

Instances

Instances details
Monad Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

(>>=) :: Max a -> (a -> Max b) -> Max b #

(>>) :: Max a -> Max b -> Max b #

return :: a -> Max a #

Functor Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

fmap :: (a -> b) -> Max a -> Max b #

(<$) :: a -> Max b -> Max a #

MonadFix Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

mfix :: (a -> Max a) -> Max a #

Applicative Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

pure :: a -> Max a #

(<*>) :: Max (a -> b) -> Max a -> Max b #

liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c #

(*>) :: Max a -> Max b -> Max b #

(<*) :: Max a -> Max b -> Max a #

Foldable Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

fold :: Monoid m => Max m -> m #

foldMap :: Monoid m => (a -> m) -> Max a -> m #

foldMap' :: Monoid m => (a -> m) -> Max a -> m #

foldr :: (a -> b -> b) -> b -> Max a -> b #

foldr' :: (a -> b -> b) -> b -> Max a -> b #

foldl :: (b -> a -> b) -> b -> Max a -> b #

foldl' :: (b -> a -> b) -> b -> Max a -> b #

foldr1 :: (a -> a -> a) -> Max a -> a #

foldl1 :: (a -> a -> a) -> Max a -> a #

toList :: Max a -> [a] #

null :: Max a -> Bool #

length :: Max a -> Int #

elem :: Eq a => a -> Max a -> Bool #

maximum :: Ord a => Max a -> a #

minimum :: Ord a => Max a -> a #

sum :: Num a => Max a -> a #

product :: Num a => Max a -> a #

Traversable Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

traverse :: Applicative f => (a -> f b) -> Max a -> f (Max b) #

sequenceA :: Applicative f => Max (f a) -> f (Max a) #

mapM :: Monad m => (a -> m b) -> Max a -> m (Max b) #

sequence :: Monad m => Max (m a) -> m (Max a) #

Arbitrary1 Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

liftArbitrary :: Gen a -> Gen (Max a) #

liftShrink :: (a -> [a]) -> Max a -> [Max a] #

Eq1 Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

liftEq :: (a -> b -> Bool) -> Max a -> Max b -> Bool #

Ord1 Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

liftCompare :: (a -> b -> Ordering) -> Max a -> Max b -> Ordering #

Read1 Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Max a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Max a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Max a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Max a] #

Show1 Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Max a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Max a] -> ShowS #

Alternative Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

empty :: Max a #

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

some :: Max a -> Max [a] #

many :: Max a -> Max [a] #

MonadPlus Max Source # 
Instance details

Defined in Data.Monus.Max

Methods

mzero :: Max a #

mplus :: Max a -> Max a -> Max a #

Eq a => Eq (Max a) Source # 
Instance details

Defined in Data.Monus.Max

Methods

(==) :: Max a -> Max a -> Bool #

(/=) :: Max a -> Max a -> Bool #

Data a => Data (Max a) Source # 
Instance details

Defined in Data.Monus.Max

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Max a -> c (Max a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Max a) #

toConstr :: Max a -> Constr #

dataTypeOf :: Max a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Max a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Max a)) #

gmapT :: (forall b. Data b => b -> b) -> Max a -> Max a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Max a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Max a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Max a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Max a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Max a -> m (Max a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Max a -> m (Max a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Max a -> m (Max a) #

Ord a => Ord (Max a) Source # 
Instance details

Defined in Data.Monus.Max

Methods

compare :: Max a -> Max a -> Ordering #

(<) :: Max a -> Max a -> Bool #

(<=) :: Max a -> Max a -> Bool #

(>) :: Max a -> Max a -> Bool #

(>=) :: Max a -> Max a -> Bool #

max :: Max a -> Max a -> Max a #

min :: Max a -> Max a -> Max a #

Read a => Read (Max a) Source # 
Instance details

Defined in Data.Monus.Max

Show a => Show (Max a) Source # 
Instance details

Defined in Data.Monus.Max

Methods

showsPrec :: Int -> Max a -> ShowS #

show :: Max a -> String #

showList :: [Max a] -> ShowS #

Generic (Max a) Source # 
Instance details

Defined in Data.Monus.Max

Associated Types

type Rep (Max a) :: Type -> Type #

Methods

from :: Max a -> Rep (Max a) x #

to :: Rep (Max a) x -> Max a #

Ord a => Semigroup (Max a) Source # 
Instance details

Defined in Data.Monus.Max

Methods

(<>) :: Max a -> Max a -> Max a #

sconcat :: NonEmpty (Max a) -> Max a #

stimes :: Integral b => b -> Max a -> Max a #

Ord a => Monoid (Max a) Source # 
Instance details

Defined in Data.Monus.Max

Methods

mempty :: Max a #

mappend :: Max a -> Max a -> Max a #

mconcat :: [Max a] -> Max a #

Arbitrary a => Arbitrary (Max a) Source # 
Instance details

Defined in Data.Monus.Max

Methods

arbitrary :: Gen (Max a) #

shrink :: Max a -> [Max a] #

NFData a => NFData (Max a) Source # 
Instance details

Defined in Data.Monus.Max

Methods

rnf :: Max a -> () #

Ord a => Monus (Max a) Source # 
Instance details

Defined in Data.Monus.Max

Methods

(|-|) :: Max a -> Max a -> Max a Source #

type Rep (Max a) Source # 
Instance details

Defined in Data.Monus.Max

type Rep (Max a) = D1 ('MetaData "Max" "Data.Monus.Max" "monus-weighted-search-0.2.0.0-inplace" 'False) (C1 ('MetaCons "Bot" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "In" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))