typelevel-1.2.3: 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 (a :: Nat) Source # 
Instance details

Defined in Type.Sequence

type Succ (a :: Nat) = a + 1

type family Empty :: k Source #

Instances
type Empty Source # 
Instance details

Defined in Type.Sequence

type Empty = ([] :: [k])

type family Zero :: k Source #

Instances
type Zero Source # 
Instance details

Defined in Type.Sequence

type Zero = 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