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.

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

Since: base-4.16.0.0

Operations

data ((a :: Nat) + (b :: Nat)) (c :: 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 ((a :: Nat) - (b :: Nat)) (c :: 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 ((a :: Nat) * (b :: Nat)) (c :: 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 ((a :: Nat) ^ (b :: Nat)) (c :: 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 ((a :: Nat) <= (b :: Nat)) (c :: 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 ((a :: Nat) >= (b :: Nat)) (c :: 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 ((a :: Nat) < (b :: Nat)) (c :: 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 ((a :: Nat) > (b :: Nat)) (c :: 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))