reflex-dom-core-0.5.2.0: Functional Reactive Web Apps with Reflex

Safe HaskellNone
LanguageHaskell98

Reflex.Dom.Builder.Static

Synopsis

Documentation

data StaticDomBuilderEnv t Source #

Constructors

StaticDomBuilderEnv 

Fields

  • _staticDomBuilderEnv_shouldEscape :: Bool
     
  • _staticDomBuilderEnv_selectValue :: Maybe (Behavior t Text)

    When the parent element is a "select" whose value has been set, this value tells us the current value. We use this to add a "selected" attribute to the appropriate "option" child element. This is not yet a perfect simulation of what the browser does, but it is much closer than doing nothing. TODO: Handle edge cases, e.g. setting to a value for which there is no option, then adding that option dynamically afterwards.

newtype StaticDomBuilderT t m a Source #

Instances
MonadSample t m => MonadSample (t :: k) (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

sample :: Behavior t a -> StaticDomBuilderT t m a #

MonadHold t m => MonadHold (t :: k) (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

hold :: a -> Event t a -> StaticDomBuilderT t m (Behavior t a) #

holdDyn :: a -> Event t a -> StaticDomBuilderT t m (Dynamic t a) #

holdIncremental :: Patch p => PatchTarget p -> Event t p -> StaticDomBuilderT t m (Incremental t p) #

buildDynamic :: PushM t a -> Event t a -> StaticDomBuilderT t m (Dynamic t a) #

headE :: Event t a -> StaticDomBuilderT t m (Event t a) #

SupportsStaticDomBuilder t m => Prerender JS' t (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Prerender

Associated Types

type Client (StaticDomBuilderT t m) :: Type -> Type Source #

SupportsStaticDomBuilder t m => NotReady t (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

PerformEvent t m => PerformEvent t (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Associated Types

type Performable (StaticDomBuilderT t m) :: Type -> Type #

(Monad m, Ref m ~ Ref IO, Reflex t) => TriggerEvent t (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

newTriggerEvent :: StaticDomBuilderT t m (Event t a, a -> IO ()) #

newTriggerEventWithOnComplete :: StaticDomBuilderT t m (Event t a, a -> IO () -> IO ()) #

newEventWithLazyTriggerWithOnComplete :: ((a -> IO () -> IO ()) -> IO (IO ())) -> StaticDomBuilderT t m (Event t a) #

PostBuild t m => PostBuild t (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

getPostBuild :: StaticDomBuilderT t m (Event t ()) #

(Reflex t, Adjustable t m, MonadHold t m, SupportsStaticDomBuilder t m) => Adjustable t (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

runWithReplace :: StaticDomBuilderT t m a -> Event t (StaticDomBuilderT t m b) -> StaticDomBuilderT t m (a, Event t b) #

traverseIntMapWithKeyWithAdjust :: (Key -> v -> StaticDomBuilderT t m v') -> IntMap v -> Event t (PatchIntMap v) -> StaticDomBuilderT t m (IntMap v', Event t (PatchIntMap v')) #

traverseDMapWithKeyWithAdjust :: GCompare k => (forall a. k a -> v a -> StaticDomBuilderT t m (v' a)) -> DMap k v -> Event t (PatchDMap k v) -> StaticDomBuilderT t m (DMap k v', Event t (PatchDMap k v')) #

traverseDMapWithKeyWithAdjustWithMove :: GCompare k => (forall a. k a -> v a -> StaticDomBuilderT t m (v' a)) -> DMap k v -> Event t (PatchDMapWithMove k v) -> StaticDomBuilderT t m (DMap k v', Event t (PatchDMapWithMove k v')) #

MonadReflexCreateTrigger t m => MonadReflexCreateTrigger t (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

newEventWithTrigger :: (EventTrigger t a -> IO (IO ())) -> StaticDomBuilderT t m (Event t a) #

newFanEventWithTrigger :: GCompare k => (forall a. k a -> EventTrigger t a -> IO (IO ())) -> StaticDomBuilderT t m (EventSelector t k) #

SupportsStaticDomBuilder t m => DomBuilder t (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Associated Types

type DomBuilderSpace (StaticDomBuilderT t m) :: Type Source #

MonadTrans (StaticDomBuilderT t) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

lift :: Monad m => m a -> StaticDomBuilderT t m a #

Monad m => Monad (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Functor m => Functor (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

fmap :: (a -> b) -> StaticDomBuilderT t m a -> StaticDomBuilderT t m b #

(<$) :: a -> StaticDomBuilderT t m b -> StaticDomBuilderT t m a #

MonadFix m => MonadFix (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

mfix :: (a -> StaticDomBuilderT t m a) -> StaticDomBuilderT t m a #

Monad m => Applicative (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

pure :: a -> StaticDomBuilderT t m a #

(<*>) :: StaticDomBuilderT t m (a -> b) -> StaticDomBuilderT t m a -> StaticDomBuilderT t m b #

liftA2 :: (a -> b -> c) -> StaticDomBuilderT t m a -> StaticDomBuilderT t m b -> StaticDomBuilderT t m c #

(*>) :: StaticDomBuilderT t m a -> StaticDomBuilderT t m b -> StaticDomBuilderT t m b #

(<*) :: StaticDomBuilderT t m a -> StaticDomBuilderT t m b -> StaticDomBuilderT t m a #

MonadIO m => MonadIO (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

liftIO :: IO a -> StaticDomBuilderT t m a #

MonadException m => MonadException (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

MonadAsyncException m => MonadAsyncException (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

mask :: ((forall a. StaticDomBuilderT t m a -> StaticDomBuilderT t m a) -> StaticDomBuilderT t m b) -> StaticDomBuilderT t m b #

PrimMonad m => PrimMonad (StaticDomBuilderT x m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Associated Types

type PrimState (StaticDomBuilderT x m) :: Type #

MonadRef m => MonadRef (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Associated Types

type Ref (StaticDomBuilderT t m) :: Type -> Type #

Methods

newRef :: a -> StaticDomBuilderT t m (Ref (StaticDomBuilderT t m) a) #

readRef :: Ref (StaticDomBuilderT t m) a -> StaticDomBuilderT t m a #

writeRef :: Ref (StaticDomBuilderT t m) a -> a -> StaticDomBuilderT t m () #

modifyRef :: Ref (StaticDomBuilderT t m) a -> (a -> a) -> StaticDomBuilderT t m () #

modifyRef' :: Ref (StaticDomBuilderT t m) a -> (a -> a) -> StaticDomBuilderT t m () #

MonadAtomicRef m => MonadAtomicRef (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

atomicModifyRef :: Ref (StaticDomBuilderT t m) a -> (a -> (a, b)) -> StaticDomBuilderT t m b #

atomicModifyRef' :: Ref (StaticDomBuilderT t m) a -> (a -> (a, b)) -> StaticDomBuilderT t m b #

(SupportsStaticDomBuilder t m, Monad m) => HasDocument (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type PrimState (StaticDomBuilderT x m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type Ref (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type Ref (StaticDomBuilderT t m) = Ref m
type Performable (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type DomBuilderSpace (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type Client (StaticDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Prerender

data StaticDomSpace Source #

Instances
DomSpace StaticDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type EventSpec StaticDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type RawDocument StaticDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type RawTextNode StaticDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type RawCommentNode StaticDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type RawElement StaticDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type RawInputElement StaticDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type RawTextAreaElement StaticDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type RawSelectElement StaticDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

data StaticDomEvent (a :: k) Source #

Static documents never produce any events, so this type has no inhabitants

data StaticDomHandler (a :: k) (b :: k) Source #

Static documents don't process events, so all handlers are equivalent

Constructors

StaticDomHandler 

data StaticEventSpec (er :: EventTag -> *) Source #

Constructors

StaticEventSpec 
Instances
Generic (StaticEventSpec er) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Associated Types

type Rep (StaticEventSpec er) :: Type -> Type #

Default (StaticEventSpec er) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

Methods

def :: StaticEventSpec er #

type Rep (StaticEventSpec er) Source # 
Instance details

Defined in Reflex.Dom.Builder.Static

type Rep (StaticEventSpec er) = D1 (MetaData "StaticEventSpec" "Reflex.Dom.Builder.Static" "reflex-dom-core-0.5.2.0-4AbGeEzkU0RG1bTQkIbORQ" False) (C1 (MetaCons "StaticEventSpec" PrefixI False) (U1 :: Type -> Type))

replaceEnd :: DomBuilder t m => Text -> m () Source #

hoistIntMapWithKeyWithAdjust Source #

Arguments

:: (Adjustable t m, MonadHold t m, Patch (p a), Functor p, Patch (p (Behavior t Builder)), PatchTarget (p (Behavior t Builder)) ~ IntMap (Behavior t Builder), Ref m ~ IORef, MonadIO m, MonadFix m, PerformEvent t m, MonadReflexCreateTrigger t m, MonadRef m) 
=> (forall x. (Key -> a -> m x) -> IntMap a -> Event t (p a) -> m (IntMap x, Event t (p x)))

The base monad's traversal

-> (Key -> a -> StaticDomBuilderT t m b) 
-> IntMap a 
-> Event t (p a) 
-> StaticDomBuilderT t m (IntMap b, Event t (p b)) 

hoistDMapWithKeyWithAdjust Source #

Arguments

:: forall (k :: * -> *). (Adjustable t m, MonadHold t m, PatchTarget (p k (Constant (Behavior t Builder))) ~ DMap k (Constant (Behavior t Builder)), Patch (p k (Constant (Behavior t Builder))), Ref m ~ IORef, MonadIO m, MonadFix m, PerformEvent t m, MonadReflexCreateTrigger t m, MonadRef m) 
=> (forall vv vv'. (forall a. k a -> vv a -> m (vv' a)) -> DMap k vv -> Event t (p k vv) -> m (DMap k vv', Event t (p k vv')))

The base monad's traversal

-> (forall vv vv'. (forall a. vv a -> vv' a) -> p k vv -> p k vv')

A way of mapping over the patch type

-> (forall a. k a -> v a -> StaticDomBuilderT t m (v' a)) 
-> DMap k v 
-> Event t (p k v) 
-> StaticDomBuilderT t m (DMap k v', Event t (p k v'))