| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Web.Hyperbole.View.Types
Synopsis
- newtype View c a = View {}
- execView :: forall c a. c -> ViewState c -> View c a -> Html a
- newtype ChildView a = ChildView a
- context :: forall c. View c (c, ViewState c)
- viewState :: View c (ViewState c)
- runViewContext :: ctx -> ViewState ctx -> View ctx () -> View c ()
- runChildView :: ViewState ctx ~ ViewState c => (c -> ctx) -> View ctx () -> View c ()
- class HasViewId m view where
- viewId :: m view
- encodeViewId :: ViewId id => id -> Text
- decodeViewId :: ViewId id => Text -> Maybe id
Documentation
Instances
| HasViewId (View ctx :: Type -> Type) (ctx :: Type) Source # | |
Defined in Web.Hyperbole.View.Types | |
| Applicative (View ctx) Source # | |
| Functor (View c) Source # | |
| Monad (View ctx) Source # | |
| IsString (View c ()) Source # | |
Defined in Web.Hyperbole.View.Types Methods fromString :: String -> View c () # | |
| Attributable (View c a) Source # | |
Defined in Web.Hyperbole.View.Types | |
| Styleable (View c a) Source # | |
| Styleable (TableColumns c dt () -> View c ()) Source # | |
Defined in Web.Hyperbole.View.Tag Methods (~) :: (TableColumns c dt () -> View c ()) -> (CSS (TableColumns c dt () -> View c ()) -> CSS (TableColumns c dt () -> View c ())) -> TableColumns c dt () -> View c () # modCSS :: ([Rule] -> [Rule]) -> (TableColumns c dt () -> View c ()) -> TableColumns c dt () -> View c () # | |
Constructors
| ChildView a |
class HasViewId m view where Source #
Access the viewId in a View or update
data LazyData = LazyData TaskId deriving (Generic,ViewId) instance (Debug :> es, GenRandom :> es) =>HyperViewLazyData es where dataActionLazyData = Details deriving (Generic,ViewAction)updateDetails = do LazyData taskId <-viewIdtask <- pretendLoadTask taskId pure $ viewTaskDetails task
encodeViewId :: ViewId id => id -> Text Source #