tfp-1.0: Type-level integers, booleans, lists using type families

Safe HaskellSafe-Inferred
LanguageHaskell2010

Type.Data.List

Documentation

data Cons car cdr Source

Instances

(Show car, Show cdr) => Show (Cons car cdr) 
Typeable (* -> * -> *) Cons 
type Tail (Cons car cdr) = cdr 
type Head (Cons car cdr) = car 
type IsNull (Cons car cdr) = False 
type Append (Cons car1 cdr2) l2 = Cons car1 (Append cdr2 l2) 

data Null Source

Instances

Show Null 
Typeable * Null 
type IsNull Null = True 
type Append Null l2 = l2 

type family IsNull l Source

Instances

type IsNull Null = True 
type IsNull (Cons car cdr) = False 

type family Head l Source

Instances

type Head (Cons car cdr) = car 

type family Tail l Source

Instances

type Tail (Cons car cdr) = cdr 

type family Reverse l Source

Instances

type Reverse l 

type family Append l1 l2 Source

Instances

type Append Null l2 = l2 
type Append (Cons car1 cdr2) l2 = Cons car1 (Append cdr2 l2)