Heterogeneous containers in Haskell
HList
Extensions:
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators #-}
Definition:
data HList :: [*] -> * where
HNil :: HList '[]
HCons :: a -> HList as -> HList (a ': as)
Usage:
xs :: HList [Int, Bool]
xs = HCons 3 . HCons True $ HNil