tuple-morph-0.1.0.0: Morph between tuples with the same "flattened" representation

Copyright(c) Paweł Nowak
LicenseMIT
MaintainerPaweł Nowak <pawel834@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Tuple.Morph.Append

Description

Appending type lists and HLists.

Synopsis

Documentation

type family a ++ b :: [k] infixr 5 Source

Appends two type lists.

Equations

[] ++ b = b 
(a : as) ++ b = a : (as ++ b) 

appendAssoc :: Proxy a -> Proxy b -> Proxy c -> ((a ++ b) ++ c) :~: (a ++ (b ++ c)) Source

Proof (by unsafeCoerce) that appending is associative.

appendRightId :: Proxy a -> (a ++ []) :~: a Source

Proof (by unsafeCoerce) that '[] is a right identity of (++).

(++@) :: HList a -> HList b -> HList (a ++ b) infixr 5 Source

Appends two HLists.