| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Web.Hyperbole.HyperView.Handled
Synopsis
- hyper :: (HyperViewHandled id ctx, ViewId id) => id -> View id () -> View ctx ()
- hyperUnsafe :: ViewId id => id -> View id () -> View ctx ()
- type family ValidDescendents x :: [Type] where ...
- type family NextDescendents (ex :: [Type]) (xs :: [Type]) :: [Type] where ...
- type NotHandled id (ctx :: t) (views :: [Type]) = TypeError ((((((((('Text "HyperView " ':<>: 'ShowType id) ':<>: 'Text " not found in (Require ") ':<>: 'ShowType ctx) ':<>: 'Text ")") ':$$: ('Text " " ':<>: 'ShowType views)) ':$$: 'Text "Try adding it to the HyperView instance:") ':$$: (('Text " instance HyperView " ':<>: 'ShowType ctx) ':<>: 'Text " where")) ':$$: (((('Text " type Action " ':<>: 'ShowType ctx) ':<>: 'Text " = ") ':<>: 'ShowType (Action id)) ':<>: 'Text "")) ':$$: (((('Text " type Require " ':<>: 'ShowType ctx) ':<>: 'Text " = [") ':<>: 'ShowType id) ':<>: 'Text ", ...]")) :: k
- type NotDesc (id :: t) (ctx :: t1) (x :: t2) (cs :: t3) = TypeError (((((('Text "" ':<>: 'ShowType x) ':<>: 'Text ", a child of HyperView ") ':<>: 'ShowType id) ':<>: 'Text ", not handled by context ") ':<>: 'ShowType ctx) ':$$: ('Text " Require = " ':<>: 'ShowType cs)) :: k
- type NotInPage (x :: a) (total :: [a]) = TypeError ((((('Text "" ':<>: 'ShowType x) ':<>: 'Text " not included in: ") ':$$: ('Text " Page es " ':<>: 'ShowType total)) ':$$: 'Text "try expanding the page views to:") ':$$: ('Text " Page es " ':<>: 'ShowType (x ': total))) :: k
- type HyperViewHandled id ctx = (ElemOr id (ctx ': Require ctx) (NotHandled id ctx (Require ctx) :: Constraint), CheckDescendents id ctx)
- type family CheckDescendents id ctx where ...
- type family AllInPage (ids :: [a]) (total :: [a]) where ...
Documentation
type family ValidDescendents x :: [Type] where ... Source #
Equations
| ValidDescendents x = x ': NextDescendents ('[] :: [Type]) '[x] |
type family NextDescendents (ex :: [Type]) (xs :: [Type]) :: [Type] where ... Source #
Equations
| NextDescendents _1 ('[] :: [Type]) = '[] :: [Type] | |
| NextDescendents ex (x ': xs) = (RemoveAll (x ': ex) (Require x) <++> NextDescendents ((x ': ex) <++> Require x) (RemoveAll (x ': ex) (Require x))) <++> NextDescendents (x ': ex) (RemoveAll (x ': ex) xs) |
type NotHandled id (ctx :: t) (views :: [Type]) = TypeError ((((((((('Text "HyperView " ':<>: 'ShowType id) ':<>: 'Text " not found in (Require ") ':<>: 'ShowType ctx) ':<>: 'Text ")") ':$$: ('Text " " ':<>: 'ShowType views)) ':$$: 'Text "Try adding it to the HyperView instance:") ':$$: (('Text " instance HyperView " ':<>: 'ShowType ctx) ':<>: 'Text " where")) ':$$: (((('Text " type Action " ':<>: 'ShowType ctx) ':<>: 'Text " = ") ':<>: 'ShowType (Action id)) ':<>: 'Text "")) ':$$: (((('Text " type Require " ':<>: 'ShowType ctx) ':<>: 'Text " = [") ':<>: 'ShowType id) ':<>: 'Text ", ...]")) :: k Source #
type NotDesc (id :: t) (ctx :: t1) (x :: t2) (cs :: t3) = TypeError (((((('Text "" ':<>: 'ShowType x) ':<>: 'Text ", a child of HyperView ") ':<>: 'ShowType id) ':<>: 'Text ", not handled by context ") ':<>: 'ShowType ctx) ':$$: ('Text " Require = " ':<>: 'ShowType cs)) :: k Source #
type NotInPage (x :: a) (total :: [a]) = TypeError ((((('Text "" ':<>: 'ShowType x) ':<>: 'Text " not included in: ") ':$$: ('Text " Page es " ':<>: 'ShowType total)) ':$$: 'Text "try expanding the page views to:") ':$$: ('Text " Page es " ':<>: 'ShowType (x ': total))) :: k Source #
type HyperViewHandled id ctx = (ElemOr id (ctx ': Require ctx) (NotHandled id ctx (Require ctx) :: Constraint), CheckDescendents id ctx) Source #
type family CheckDescendents id ctx where ... Source #
Equations
| CheckDescendents id (Root total) = AllInPage (ValidDescendents id) total | |
| CheckDescendents id ctx = () |