hset-1.0.0: Primitive heterogenous read-only set

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.HSet.TypeLevel

Synopsis

Documentation

data Nat Source

Constructors

Z 
S Nat 

type family Elem typ typs :: Bool Source

Calculates to 'True if first type argument contained in second list element

Equations

Elem typ [] = False 
Elem typ (typ : typs) = True 
Elem typ1 (typ2 : typs) = Elem typ1 typs 

type family Index typ typs :: Nat Source

Calculates to Nat kinded type describing the index of first argument in second argument

Equations

Index t (t : ts) = Z 
Index t (tt : ts) = S (Index t ts)