first-class-families-0.8.1.0: First-class type families
Safe HaskellSafe-Inferred
LanguageHaskell2010

Fcf.Data.Nat

Description

Natural numbers.

Note that the operators from this module conflict with GHC.TypeLits and GHC.TypeNats.

Synopsis

Reexported type

type Nat = Natural #

A type synonym for Natural.

Prevously, this was an opaque data type, but it was changed to a type synonym.

Since: base-4.16.0.0

Operations

data (+) :: Nat -> Nat -> Exp Nat Source #

Instances

Instances details
type Eval (a + b :: Nat -> Type) Source # 
Instance details

Defined in Fcf.Data.Nat

type Eval (a + b :: Nat -> Type) = a + b

data (-) :: Nat -> Nat -> Exp Nat Source #

Instances

Instances details
type Eval (a - b :: Nat -> Type) Source # 
Instance details

Defined in Fcf.Data.Nat

type Eval (a - b :: Nat -> Type) = a - b

data * :: Nat -> Nat -> Exp Nat Source #

Instances

Instances details
type Eval (a * b :: Nat -> Type) Source # 
Instance details

Defined in Fcf.Data.Nat

type Eval (a * b :: Nat -> Type) = a * b

data (^) :: Nat -> Nat -> Exp Nat Source #

Instances

Instances details
type Eval (a ^ b :: Nat -> Type) Source # 
Instance details

Defined in Fcf.Data.Nat

type Eval (a ^ b :: Nat -> Type) = a ^ b

Comparisons

Note that these conflict with Fcf.Class.Ord.

data (<=) :: Nat -> Nat -> Exp Bool Source #

Instances

Instances details
type Eval (a <= b :: Bool -> Type) Source # 
Instance details

Defined in Fcf.Data.Nat

type Eval (a <= b :: Bool -> Type) = a <=? b

data (>=) :: Nat -> Nat -> Exp Bool Source #

Instances

Instances details
type Eval (a >= b :: Bool -> Type) Source # 
Instance details

Defined in Fcf.Data.Nat

type Eval (a >= b :: Bool -> Type) = b <=? a

data (<) :: Nat -> Nat -> Exp Bool Source #

Instances

Instances details
type Eval (a < b :: Bool -> Type) Source # 
Instance details

Defined in Fcf.Data.Nat

type Eval (a < b :: Bool -> Type) = Eval (Not =<< (a >= b))

data (>) :: Nat -> Nat -> Exp Bool Source #

Instances

Instances details
type Eval (a > b :: Bool -> Type) Source # 
Instance details

Defined in Fcf.Data.Nat

type Eval (a > b :: Bool -> Type) = Eval (Not =<< (a <= b))