discrete-0.1.0.0: replacement for enum

Safe HaskellNone
LanguageHaskell2010

Data.Modular

Synopsis

Documentation

class Modular a where Source #

Similar to Discrete but msucc and mpred experience 'wrap-around' for Bounded types.

msucc . mpred = id mpred . msucc = id msucc maxBound = minBound mpred minBound = maxBound

Minimal complete definition

mpred, msucc

Methods

msucc :: a -> a Source #

mpred :: a -> a Source #

Instances
Modular Bool Source # 
Instance details

Defined in Data.Modular

Methods

msucc :: Bool -> Bool Source #

mpred :: Bool -> Bool Source #

Modular Int Source # 
Instance details

Defined in Data.Modular

Methods

msucc :: Int -> Int Source #

mpred :: Int -> Int Source #

Modular Int8 Source # 
Instance details

Defined in Data.Modular

Methods

msucc :: Int8 -> Int8 Source #

mpred :: Int8 -> Int8 Source #

Modular Int16 Source # 
Instance details

Defined in Data.Modular

Modular Int32 Source # 
Instance details

Defined in Data.Modular

Modular Int64 Source # 
Instance details

Defined in Data.Modular

Modular Integer Source # 
Instance details

Defined in Data.Modular

Modular Ordering Source # 
Instance details

Defined in Data.Modular

Modular Word Source # 
Instance details

Defined in Data.Modular

Methods

msucc :: Word -> Word Source #

mpred :: Word -> Word Source #

Modular Word8 Source # 
Instance details

Defined in Data.Modular

Modular Word16 Source # 
Instance details

Defined in Data.Modular

Modular Word32 Source # 
Instance details

Defined in Data.Modular

Modular Word64 Source # 
Instance details

Defined in Data.Modular

Modular () Source # 
Instance details

Defined in Data.Modular

Methods

msucc :: () -> () Source #

mpred :: () -> () Source #

Modular a => Modular (Maybe a) Source # 
Instance details

Defined in Data.Modular

Methods

msucc :: Maybe a -> Maybe a Source #

mpred :: Maybe a -> Maybe a Source #

Integral a => Modular (Ratio a) Source # 
Instance details

Defined in Data.Modular

Methods

msucc :: Ratio a -> Ratio a Source #

mpred :: Ratio a -> Ratio a Source #

(Modular a, Modular b) => Modular (Either a b) Source # 
Instance details

Defined in Data.Modular

Methods

msucc :: Either a b -> Either a b Source #

mpred :: Either a b -> Either a b Source #

(Modular a, Modular b) => Modular (a, b) Source # 
Instance details

Defined in Data.Modular

Methods

msucc :: (a, b) -> (a, b) Source #

mpred :: (a, b) -> (a, b) Source #

a ~ b => Modular (a :~: b) Source # 
Instance details

Defined in Data.Modular

Methods

msucc :: (a :~: b) -> a :~: b Source #

mpred :: (a :~: b) -> a :~: b Source #

a ~~ b => Modular (a :~~: b) Source # 
Instance details

Defined in Data.Modular

Methods

msucc :: (a :~~: b) -> a :~~: b Source #

mpred :: (a :~~: b) -> a :~~: b Source #