Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data Request = Request {}
- data Response
- newtype Page es a = Page (Eff es a)
- data Event act id = Event {}
- data Hyperbole :: Effect where
- runHyperboleRoute :: Route route => Request -> (route -> Eff (Hyperbole : es) ()) -> Eff es Response
- runHyperbole :: Request -> Eff (Hyperbole : es) a -> Eff es (Either Response a)
- formData :: Hyperbole :> es => Eff es Form
- notFound :: Hyperbole :> es => Eff es a
- parseError :: Hyperbole :> es => Text -> Eff es a
- view :: Hyperbole :> es => View () () -> Eff es ()
- load :: Hyperbole :> es => Eff es (View () ()) -> Page es ()
- hyper :: (Hyperbole :> es, HyperView id) => (id -> Action id -> Eff es (View id ())) -> Page es ()
- page :: Hyperbole :> es => Page es () -> Eff es ()
Documentation
data Hyperbole :: Effect where Source #
GetForm :: Hyperbole m Form | |
GetEvent :: HyperView id => Hyperbole m (Maybe (Event (Action id) id)) | |
Respond :: Response -> Hyperbole m a |
Instances
type DispatchOf Hyperbole Source # | |
Defined in Web.Hyperbole.Effect |
runHyperboleRoute :: Route route => Request -> (route -> Eff (Hyperbole : es) ()) -> Eff es Response Source #
view :: Hyperbole :> es => View () () -> Eff es () Source #
Set the response to the view. Note that page
already expects a view to be returned from the effect
load :: Hyperbole :> es => Eff es (View () ()) -> Page es () Source #
Load the entire page when no HyperViews match