semirings-0.7: two monoids as one, in holy haskimony

Safe Haskell | Trustworthy
Language | Haskell98

Data.Semiring.Directed

Contents

- Directed semirings

Description

A "directed semiring" refers to the semiring composed of the union of upwards directed sets as multiplication, and intersection of downwards directed sets as addition.

Synopsis

- newtype Directed = Directed {
  - getDirected :: Ordering
  }

# Directed semirings

newtype Directed #

Wrapper for the semiring of upwards and downwards directed sets.

For the individual join/meet monoids associated with either algebra, see ``Max` `Ordering`, and` `Min` `Ordering`@.

Constructors

Directed |

Fields

- getDirected :: Ordering

  Since: 0.7

#### Instances

Instances details

Data Directed # | Since: 0.7

Instance details

Defined in Data.Semiring.Directed

Methods

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

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

toConstr :: Directed -> Constr #

dataTypeOf :: Directed -> DataType #

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

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

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

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

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

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

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

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

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

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

Bounded Directed # | Since: 0.7
Instance details Defined in Data.Semiring.Directed Methods minBound :: Directed # maxBound :: Directed #
Enum Directed # | Since: 0.7
Instance details Defined in Data.Semiring.Directed Methods succ :: Directed -> Directed # pred :: Directed -> Directed # toEnum :: Int -> Directed # fromEnum :: Directed -> Int # enumFrom :: Directed -> [Directed] # enumFromThen :: Directed -> Directed -> [Directed] # enumFromTo :: Directed -> Directed -> [Directed] # enumFromThenTo :: Directed -> Directed -> Directed -> [Directed] #
Generic Directed # |

Instance details

Defined in Data.Semiring.Directed

Associated Types

type Rep Directed | Since: semirings-0.7
Instance details Defined in Data.Semiring.Directed type Rep Directed = D1 ('MetaData "Directed" "Data.Semiring.Directed" "semirings-0.7-IhyDtHS7M7uHyZ7s7mY4S7" 'True) (C1 ('MetaCons "Directed" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDirected") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ordering)))

Methods

from :: Directed -> Rep Directed x #

to :: Rep Directed x -> Directed #

Read Directed # | Since: 0.7
Instance details Defined in Data.Semiring.Directed Methods readsPrec :: Int -> ReadS Directed # readList :: ReadS [Directed] # readPrec :: ReadPrec Directed # readListPrec :: ReadPrec [Directed] #
Show Directed # | Since: 0.7
Instance details Defined in Data.Semiring.Directed Methods showsPrec :: Int -> Directed -> ShowS # show :: Directed -> String # showList :: [Directed] -> ShowS #
Eq Directed # | Since: 0.7
Instance details Defined in Data.Semiring.Directed Methods (==) :: Directed -> Directed -> Bool # (/=) :: Directed -> Directed -> Bool #
Semiring Directed # | Since: 0.7
Instance details Defined in Data.Semiring.Directed Methods plus :: Directed -> Directed -> Directed # zero :: Directed # times :: Directed -> Directed -> Directed # one :: Directed # fromNatural :: Natural -> Directed #
type Rep Directed # | Since: 0.7
Instance details Defined in Data.Semiring.Directed type Rep Directed = D1 ('MetaData "Directed" "Data.Semiring.Directed" "semirings-0.7-IhyDtHS7M7uHyZ7s7mY4S7" 'True) (C1 ('MetaCons "Directed" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDirected") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ordering)))