fcf-containers-0.7.0: Data structures and algorithms for first-class-families
Copyright(c) gspia 2020-
LicenseBSD
Maintainergspia
Safe HaskellSafe-Inferred
LanguageHaskell2010

Fcf.Alg.Nat

Description

Fcf.Data.Nat

Synopsis

Documentation

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

Nat equality.

>>> :kind! Eval (2 == 2)
Eval (2 == 2) :: Bool
= 'True
>>> :kind! Eval (2 == 3)
Eval (2 == 3) :: Bool
= 'False

Instances

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

Defined in Fcf.Alg.Nat

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

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

Nat in-equality.

>>> :kind! Eval (2 /= 2)
Eval (2 /= 2) :: Bool
= 'False
>>> :kind! Eval (2 /= 3)
Eval (2 /= 3) :: Bool
= 'True

Instances

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

Defined in Fcf.Alg.Nat

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