hyperbole-0.5.0: Interactive HTML apps using type-safe serverside Haskell
Safe HaskellSafe-Inferred
LanguageGHC2021

Web.Hyperbole.View.Types

Synopsis

Documentation

newtype View c a Source #

Views are HTML fragments with a context

helloWorld :: View context ()
helloWorld =
  el "Hello World"

Constructors

View 

Fields

Instances

Instances details
HasViewId (View ctx :: Type -> Type) (ctx :: Type) Source # 
Instance details

Defined in Web.Hyperbole.HyperView.ViewId

Methods

viewId :: View ctx ctx Source #

Applicative (View ctx) Source # 
Instance details

Defined in Web.Hyperbole.View.Types

Methods

pure :: a -> View ctx a #

(<*>) :: View ctx (a -> b) -> View ctx a -> View ctx b #

liftA2 :: (a -> b -> c) -> View ctx a -> View ctx b -> View ctx c #

(*>) :: View ctx a -> View ctx b -> View ctx b #

(<*) :: View ctx a -> View ctx b -> View ctx a #

Functor (View c) Source # 
Instance details

Defined in Web.Hyperbole.View.Types

Methods

fmap :: (a -> b) -> View c a -> View c b #

(<$) :: a -> View c b -> View c a #

Monad (View ctx) Source # 
Instance details

Defined in Web.Hyperbole.View.Types

Methods

(>>=) :: View ctx a -> (a -> View ctx b) -> View ctx b #

(>>) :: View ctx a -> View ctx b -> View ctx b #

return :: a -> View ctx a #

IsString (View c ()) Source # 
Instance details

Defined in Web.Hyperbole.View.Types

Methods

fromString :: String -> View c () #

Attributable (View c a) Source # 
Instance details

Defined in Web.Hyperbole.View.Types

Methods

(@) :: View c a -> (Attributes (View c a) -> Attributes (View c a)) -> View c a #

modAttributes :: (Map Name AttValue -> Map Name AttValue) -> View c a -> View c a #

Styleable (View c a) Source # 
Instance details

Defined in Web.Hyperbole.View.Types

Methods

(~) :: View c a -> (CSS (View c a) -> CSS (View c a)) -> View c a #

modCSS :: ([Rule] -> [Rule]) -> View c a -> View c a #

Styleable (TableColumns c dt () -> View c ()) Source # 
Instance details

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 () #

runView :: forall c a. c -> View c a -> Html a Source #

type family ViewContext (v :: Type) where ... Source #

Equations

ViewContext (View c x) = c 
ViewContext (View c x -> View c x) = c 

context :: forall c. View c c Source #

addContext :: ctx -> View ctx () -> View c () Source #

modifyContext :: forall ctx0 ctx1. (ctx0 -> ctx1) -> View ctx1 () -> View ctx0 () Source #

tag :: Text -> View c () -> View c () Source #

tag' :: Bool -> Text -> View c () -> View c () Source #

text :: Text -> View c () Source #

none :: View c () Source #

raw :: Text -> View c () Source #