typelevel-1.2.2: Useful type level operations (type families and related operators).

Safe HaskellNone
LanguageHaskell2010

Type.Sequence

Documentation

type family Succ (a :: k) :: k Source #

Instances

type Succ Nat a Source # 
type Succ Nat a = (+) a 1

type family Empty :: k Source #

Instances

type Empty [k] Source # 
type Empty [k] = [] k

type family Zero :: k Source #

Instances

type Zero Nat Source # 
type Zero Nat = 0

type family Range (begin :: k) (end :: k) :: [k] where ... Source #

Equations

Range b b = Empty 
Range b e = b ': Range (Succ b) e 

type family Enumerate end where ... Source #

Equations

Enumerate end = Range Zero end