hyperbole-0.4.2: Interactive HTML apps using type-safe serverside Haskell
Safe HaskellNone
LanguageGHC2021

Web.Hyperbole.TypeList

Documentation

type family (xs :: [a]) <++> (ys :: [a]) :: [a] where ... Source #

Equations

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

type family Remove (x :: a) (ys :: [a]) :: [a] where ... Source #

Equations

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

type family RemoveAll (xs :: [a]) (ys :: [a]) :: [a] where ... Source #

Equations

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

type Elem e (es :: [Type]) = ElemOr e es (NotElem e es :: Constraint) Source #

type family ElemOr (e :: a) (es :: [a]) err where ... Source #

Equations

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

type family AllElemOr (xs :: [a]) (ys :: [a]) err where ... Source #

Equations

AllElemOr ('[] :: [a]) (_1 :: [a]) _2 = () 
AllElemOr (x ': xs :: [a]) (ys :: [a]) err = (ElemOr x ys err, AllElemOr xs ys err) 

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

type family TupleList a :: [Type] where ... Source #

Equations

TupleList () = '[] :: [Type] 
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]