apiary-0.17.2: Simple and type safe web framework that can be automatically generate API documentation.

Safe HaskellNone
LanguageHaskell2010

Data.Apiary.SList

Documentation

data SList as where Source

Constructors

SNil :: SList [] 
(:::) :: a -> SList xs -> SList (a : xs) infixr 9 

Instances

All Show as => Show (SList as) 

type family All c as :: Constraint Source

Instances

type All c ([] *) = () 
type All c ((:) * a as) = (c a, All c as) 

type family Apply as r Source

Instances

type Apply ([] *) r = r 
type Apply ((:) * x xs) r = x -> Apply xs r 

type Fn c a = Apply (Reverse c) a Source

apply :: Fn c r -> SList c -> r Source

apply' :: Apply xs r -> SList xs -> r Source

type family Rev l a :: [*] Source

Instances

type Rev ([] *) a = a 
type Rev ((:) * x xs) a = Rev xs ((:) * x a) 

type Reverse a = Rev a [] Source