hyperbole-0.5.0: Interactive HTML apps using type-safe serverside Haskell
Safe HaskellSafe-Inferred
LanguageGHC2021

Web.Hyperbole.TypeList

Documentation

type family xs <++> ys where ... Source #

Equations

'[] <++> ys = ys 
xs <++> '[] = xs 
(x ': xs) <++> ys = x : (xs <++> ys) 

type family Remove x ys where ... Source #

Equations

Remove x '[] = '[] 
Remove x (x ': ys) = Remove x ys 
Remove x (y ': ys) = y ': Remove x ys 

type family RemoveAll xs ys where ... Source #

Equations

RemoveAll '[] ys = ys 
RemoveAll xs '[] = '[] 
RemoveAll (x ': xs) ys = RemoveAll xs (Remove x ys) 

type Elem e es = ElemOr e es (NotElem e es) Source #

type family ElemOr e es err :: Constraint where ... Source #

Equations

ElemOr x (x ': xs) err = () 
ElemOr y (x ': xs) err = ElemOr y xs err 
ElemOr x '[] err = err 

type family AllElemOr xs ys err :: Constraint where ... Source #

Equations

AllElemOr '[] _ _ = () 
AllElemOr (x ': xs) ys err = (ElemOr x ys err, AllElemOr xs ys err) 

type NotElem x (orig :: [Type]) = TypeError (('ShowType x ':<>: 'Text " not found in ") ':<>: 'ShowType orig) Source #

type family TupleList a where ... Source #

Equations

TupleList () = '[] 
TupleList (a, b) = [a, b] 
TupleList (a, b, c) = [a, b, c] 
TupleList (a, b, c, d) = [a, b, c, d] 
TupleList (a, b, c, d, e) = [a, b, c, d, e] 
TupleList (a, b, c, d, e, f) = [a, b, c, d, e, f] 
TupleList (a, b, c, d, e, f, g) = [a, b, c, d, e, f, g] 
TupleList (a, b, c, d, e, f, g, h) = [a, b, c, d, e, f, g, h] 
TupleList (a, b, c, d, e, f, g, h, i) = [a, b, c, d, e, f, g, h, i] 
TupleList (a, b, c, d, e, f, g, h, i, j) = [a, b, c, d, e, f, g, h, i, j] 
TupleList a = '[a]