generic-labels-0.1.0.1: src/Data/Type/Maybe.hs
{-# LANGUAGE StandaloneKindSignatures #-}
module Data.Type.Maybe
( CatMaybes )
where
--------------------------------------------------------------------------------
type CatMaybes :: [ Maybe a ] -> [ a ]
type family CatMaybes mbs where
CatMaybes '[] = '[]
CatMaybes ( Nothing ': mbs ) = CatMaybes mbs
CatMaybes ( Just a ': mbs ) = a ': CatMaybes mbs