peano-0.1.0.3: Peano numbers

Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.Peano

Description

See `Peano`.

Synopsis

- data Peano
  - = Zero
  - | Succ Peano
- infinity :: Peano

# Documentation

data Peano Source #

The natural numbers in (lazy) unary notation.

Constructors

Zero |
Succ Peano |

#### Instances

Instances details

Data Peano Source # |

Instance details

Defined in Data.Peano

Methods

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

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

toConstr :: Peano -> Constr Source #

dataTypeOf :: Peano -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Bounded Peano Source # |
Instance details Defined in Data.Peano Methods minBound :: Peano Source # maxBound :: Peano Source #
Enum Peano Source # |
Instance details Defined in Data.Peano Methods succ :: Peano -> Peano Source # pred :: Peano -> Peano Source # toEnum :: Int -> Peano Source # fromEnum :: Peano -> Int Source # enumFrom :: Peano -> [Peano] Source # enumFromThen :: Peano -> Peano -> [Peano] Source # enumFromTo :: Peano -> Peano -> [Peano] Source # enumFromThenTo :: Peano -> Peano -> Peano -> [Peano] Source #
Ix Peano Source # |
Instance details Defined in Data.Peano Methods range :: (Peano, Peano) -> [Peano] Source # index :: (Peano, Peano) -> Peano -> Int Source # unsafeIndex :: (Peano, Peano) -> Peano -> Int Source # inRange :: (Peano, Peano) -> Peano -> Bool Source # rangeSize :: (Peano, Peano) -> Int Source # unsafeRangeSize :: (Peano, Peano) -> Int Source #
Num Peano Source # |
Instance details Defined in Data.Peano Methods (+) :: Peano -> Peano -> Peano Source # (-) :: Peano -> Peano -> Peano Source # (*) :: Peano -> Peano -> Peano Source # negate :: Peano -> Peano Source # abs :: Peano -> Peano Source # signum :: Peano -> Peano Source # fromInteger :: Integer -> Peano Source #
Read Peano Source # |
Instance details Defined in Data.Peano Methods readsPrec :: Int -> ReadS Peano Source # readList :: ReadS [Peano] Source # readPrec :: ReadPrec Peano Source # readListPrec :: ReadPrec [Peano] Source #
Integral Peano Source # |
Instance details Defined in Data.Peano Methods quot :: Peano -> Peano -> Peano Source # rem :: Peano -> Peano -> Peano Source # div :: Peano -> Peano -> Peano Source # mod :: Peano -> Peano -> Peano Source # quotRem :: Peano -> Peano -> (Peano, Peano) Source # divMod :: Peano -> Peano -> (Peano, Peano) Source # toInteger :: Peano -> Integer Source #
Real Peano Source # |
Instance details Defined in Data.Peano Methods toRational :: Peano -> Rational Source #
Show Peano Source # |
Instance details Defined in Data.Peano Methods showsPrec :: Int -> Peano -> ShowS Source # show :: Peano -> String Source # showList :: [Peano] -> ShowS Source #
Eq Peano Source # |
Instance details Defined in Data.Peano Methods (==) :: Peano -> Peano -> Bool Source # (/=) :: Peano -> Peano -> Bool Source #
Ord Peano Source # |
Instance details Defined in Data.Peano Methods compare :: Peano -> Peano -> Ordering Source # (<) :: Peano -> Peano -> Bool Source # (<=) :: Peano -> Peano -> Bool Source # (>) :: Peano -> Peano -> Bool Source # (>=) :: Peano -> Peano -> Bool Source # max :: Peano -> Peano -> Peano Source # min :: Peano -> Peano -> Peano Source #

infinity :: Peano Source #

The infinite number (ω).