module Web.Hyperbole.Page where
import Data.Kind (Type)
import Effectful
import Web.Hyperbole.Effect.Handler (RunHandlers, runLoad)
import Web.Hyperbole.Effect.Hyperbole
import Web.Hyperbole.Effect.Server (Response)
import Web.Hyperbole.HyperView (Root)
import Web.View (View)
type Page (views :: [Type]) = View (Root views) ()
runPage
:: forall views es
. (Hyperbole :> es, RunHandlers views es)
=> Eff es (Page views)
-> Eff es Response
runPage :: forall (views :: [*]) (es :: [Effect]).
(Hyperbole :> es, RunHandlers views es) =>
Eff es (Page views) -> Eff es Response
runPage = Eff es (View (Root views) ()) -> Eff es Response
forall (views :: [*]) (es :: [Effect]).
(Hyperbole :> es, RunHandlers views es) =>
Eff es (Page views) -> Eff es Response
runLoad