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 Source #

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 Source # | 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 Source #

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

toConstr :: Directed -> Constr Source #

dataTypeOf :: Directed -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Bounded Directed Source # | Since: 0.7
Instance details Defined in Data.Semiring.Directed Methods minBound :: Directed Source # maxBound :: Directed Source #
Enum Directed Source # | Since: 0.7

Instance details

Defined in Data.Semiring.Directed

Methods

succ :: Directed -> Directed Source #

pred :: Directed -> Directed Source #

toEnum :: Int -> Directed Source #

fromEnum :: Directed -> Int Source #

enumFrom :: Directed -> [Directed] Source #

enumFromThen :: Directed -> Directed -> [Directed] Source #

enumFromTo :: Directed -> Directed -> [Directed] Source #

enumFromThenTo :: Directed -> Directed -> Directed -> [Directed] Source #

Generic Directed Source # |

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-GfH8CFjnoFgLT6ACdLwAYA" 'True) (C1 ('MetaCons "Directed" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDirected") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ordering)))

Methods

from :: Directed -> Rep Directed x Source #

to :: Rep Directed x -> Directed Source #

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