circuitflow-0.3.0.1
Safe HaskellSafe-Inferred
LanguageHaskell2010

Pipeline.Internal.Common.TypeList

Documentation

type family Length (l :: [k]) :: Nat where ... #

Equations

Length '[] = 'Zero 
Length (e ': l) = 'Succ (Length l) 

type family Take (x :: Nat) (l :: [k]) :: [k] where ... #

Equations

Take 'Zero l = '[] 
Take ('Succ n) '[] = '[] 
Take ('Succ n) (e ': l) = e ': Take n l 

type family Drop (x :: Nat) (l :: [k]) :: [k] where ... #

Equations

Drop 'Zero l = l 
Drop ('Succ _) '[] = '[] 
Drop ('Succ n) (e ': l) = Drop n l 

type family (l1 :: [k]) :++ (l2 :: [k]) :: [k] where ... infixr 5 #

Equations

'[] :++ l = l 
(e ': l) :++ l' = e ': (l :++ l') 

type family Apply (fs :: [Type -> Type]) (as :: [Type]) where ... #

Equations

Apply '[] '[] = '[] 
Apply (f ': fs) (a ': as) = f a ': Apply fs as 

type family Replicate (n :: Nat) (a :: k) :: [k] where ... #

Equations

Replicate 'Zero _ = '[] 
Replicate ('Succ n) x = x ': Replicate n x