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

Safe HaskellNone
LanguageHaskell98

Reflex.Dom.Builder.Immediate

Contents

Synopsis

Documentation

newtype EventTriggerRef t a #

A reference to an EventTrigger suitable for firing with TriggerEventT.

Constructors

EventTriggerRef 

newtype ImmediateDomBuilderT t m a Source #

Instances
SupportsImmediateDomBuilder t m => NotReady t (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

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

Defined in Reflex.Dom.Builder.Immediate

Associated Types

type Performable (ImmediateDomBuilderT t m) :: * -> * #

(Monad m, MonadRef m, Ref m ~ Ref IO, MonadReflexCreateTrigger t m) => TriggerEvent t (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

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

Defined in Reflex.Dom.Builder.Immediate

(Reflex t, Adjustable t m, MonadJSM m, MonadHold t m, MonadFix m, PrimMonad m) => Adjustable t (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

Methods

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

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

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

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

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

Defined in Reflex.Dom.Builder.Immediate

Methods

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

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

(HasJS x m, ReflexHost t) => HasJS x (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

Associated Types

type JSX (ImmediateDomBuilderT t m) :: * -> * Source #

SupportsImmediateDomBuilder t m => MountableDomBuilder t (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

Associated Types

type DomFragment (ImmediateDomBuilderT t m) :: * Source #

SupportsImmediateDomBuilder t m => DomBuilder t (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

Associated Types

type DomBuilderSpace (ImmediateDomBuilderT t m) :: * Source #

(HasJS js m, HasJS js (Performable m), HasJSContext m, HasJSContext (Performable m), MonadJSM m, MonadJSM (Performable m), MonadFix m, MonadFix (Performable m), ReflexHost t) => Prerender js (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Prerender

MonadTrans (ImmediateDomBuilderT t) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

Methods

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

MonadSample t m => MonadSample (t :: *) (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

Methods

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

MonadHold t m => MonadHold (t :: *) (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

Methods

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

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

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

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

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

(Reflex t, MonadFix m) => DomRenderHook (t :: *) (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

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

Defined in Reflex.Dom.Builder.Immediate

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

Defined in Reflex.Dom.Builder.Immediate

Methods

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

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

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

Defined in Reflex.Dom.Builder.Immediate

Methods

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

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

Defined in Reflex.Dom.Builder.Immediate

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

Defined in Reflex.Dom.Builder.Immediate

Methods

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

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

Defined in Reflex.Dom.Builder.Immediate

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

Defined in Reflex.Dom.Builder.Immediate

Methods

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

MonadJSM m => MonadJSM (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

Methods

liftJSM' :: JSM a -> ImmediateDomBuilderT t m a #

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

Defined in Reflex.Dom.Builder.Immediate

Associated Types

type PrimState (ImmediateDomBuilderT x m) :: * #

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

Defined in Reflex.Dom.Builder.Immediate

Associated Types

type Ref (ImmediateDomBuilderT t m) :: * -> * #

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

Defined in Reflex.Dom.Builder.Immediate

Methods

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

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

HasJSContext m => HasJSContext (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

Associated Types

type JSContextPhantom (ImmediateDomBuilderT t m) :: * Source #

Monad m => HasDocument (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type PrimState (ImmediateDomBuilderT x m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type Ref (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type Performable (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type JSX (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type JSContextPhantom (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type DomFragment (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type DomBuilderSpace (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

deleteBetweenExclusive :: (MonadJSM m, IsNode start, IsNode end) => start -> end -> m () Source #

s and e must both be children of the same node and s must precede e; all nodes between s and e will be removed, but s and e will not be removed

extractBetweenExclusive :: (MonadJSM m, IsNode start, IsNode end) => DocumentFragment -> start -> end -> m () Source #

s and e must both be children of the same node and s must precede e; all nodes between s and e will be moved into the given DocumentFragment, but s and e will not be moved

deleteUpTo :: (MonadJSM m, IsNode start, IsNode end) => start -> end -> m () Source #

s and e must both be children of the same node and s must precede e; s and all nodes between s and e will be removed, but e will not be removed

extractUpTo :: (MonadJSM m, IsNode start, IsNode end) => DocumentFragment -> start -> end -> m () Source #

collectUpTo :: (MonadJSM m, IsNode start, IsNode end) => start -> end -> m DocumentFragment Source #

collectUpToGivenParent :: (MonadJSM m, IsNode parent, IsNode start, IsNode end) => parent -> start -> end -> m DocumentFragment Source #

newtype EventFilterTriggerRef t er (en :: EventTag) Source #

Constructors

EventFilterTriggerRef (IORef (Maybe (EventTrigger t (er en)))) 

newtype GhcjsDomHandler a b Source #

Constructors

GhcjsDomHandler 

Fields

newtype GhcjsDomHandler1 a b Source #

Constructors

GhcjsDomHandler1 

Fields

newtype GhcjsDomEvent en Source #

Constructors

GhcjsDomEvent 

data GhcjsDomSpace Source #

Instances
DomSpace GhcjsDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type EventSpec GhcjsDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type RawDocument GhcjsDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type RawTextNode GhcjsDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type RawElement GhcjsDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type RawFile GhcjsDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type RawInputElement GhcjsDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type RawTextAreaElement GhcjsDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

type RawSelectElement GhcjsDomSpace Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

newtype GhcjsEventFilter er en Source #

Constructors

GhcjsEventFilter (GhcjsDomEvent en -> JSM (EventFlags, JSM (Maybe (er en)))) 

data Pair1 (f :: k -> *) (g :: k -> *) (a :: k) Source #

Constructors

Pair1 (f a) (g a) 

data Maybe1 f a Source #

Constructors

Nothing1 
Just1 (f a) 

class Monad m => HasDocument m where Source #

Instances
HasDocument m => HasDocument (InputDisabledT m) Source # 
Instance details

Defined in Reflex.Dom.Builder.InputDisabled

HasDocument m => HasDocument (PostBuildT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Class

Monad m => HasDocument (ImmediateDomBuilderT t m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

HasDocument m => HasDocument (ReaderT r m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Class

HasDocument m => HasDocument (DynamicWriterT t w m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Class

HasDocument m => HasDocument (QueryT t q m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Class

HasDocument m => HasDocument (EventWriterT t w m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Class

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

Defined in Reflex.Dom.Builder.Static

HasDocument m => HasDocument (RequesterT t request response m) Source # 
Instance details

Defined in Reflex.Dom.Builder.Class

Methods

askDocument :: RequesterT t request response m (RawDocument (DomBuilderSpace (RequesterT t request response m))) Source #

newtype GhcjsEventHandler er Source #

Constructors

GhcjsEventHandler 

Fields

mkHasFocus :: (MonadHold t m, Reflex t) => Element er d t -> m (Dynamic t Bool) Source #

insertBefore :: (MonadJSM m, IsNode new, IsNode existing) => new -> existing -> m () Source #

type family EventType en where ... Source #

Equations

EventType AbortTag = UIEvent 
EventType BlurTag = FocusEvent 
EventType ChangeTag = Event 
EventType ClickTag = MouseEvent 
EventType ContextmenuTag = MouseEvent 
EventType DblclickTag = MouseEvent 
EventType DragTag = MouseEvent 
EventType DragendTag = MouseEvent 
EventType DragenterTag = MouseEvent 
EventType DragleaveTag = MouseEvent 
EventType DragoverTag = MouseEvent 
EventType DragstartTag = MouseEvent 
EventType DropTag = MouseEvent 
EventType ErrorTag = UIEvent 
EventType FocusTag = FocusEvent 
EventType InputTag = Event 
EventType InvalidTag = Event 
EventType KeydownTag = KeyboardEvent 
EventType KeypressTag = KeyboardEvent 
EventType KeyupTag = KeyboardEvent 
EventType LoadTag = UIEvent 
EventType MousedownTag = MouseEvent 
EventType MouseenterTag = MouseEvent 
EventType MouseleaveTag = MouseEvent 
EventType MousemoveTag = MouseEvent 
EventType MouseoutTag = MouseEvent 
EventType MouseoverTag = MouseEvent 
EventType MouseupTag = MouseEvent 
EventType MousewheelTag = MouseEvent 
EventType ScrollTag = UIEvent 
EventType SelectTag = UIEvent 
EventType SubmitTag = Event 
EventType WheelTag = WheelEvent 
EventType BeforecutTag = ClipboardEvent 
EventType CutTag = ClipboardEvent 
EventType BeforecopyTag = ClipboardEvent 
EventType CopyTag = ClipboardEvent 
EventType BeforepasteTag = ClipboardEvent 
EventType PasteTag = ClipboardEvent 
EventType ResetTag = Event 
EventType SearchTag = Event 
EventType SelectstartTag = Event 
EventType TouchstartTag = TouchEvent 
EventType TouchmoveTag = TouchEvent 
EventType TouchendTag = TouchEvent 
EventType TouchcancelTag = TouchEvent 

withIsEvent :: EventName en -> (IsEvent (EventType en) => r) -> r Source #

elementOnEventName :: IsElement e => EventName en -> e -> EventM e (EventType en) () -> JSM (JSM ()) Source #

wrapDomEvent :: (TriggerEvent t m, MonadJSM m) => e -> (e -> EventM e event () -> JSM (JSM ())) -> EventM e event a -> m (Event t a) Source #

subscribeDomEvent :: (EventM e event () -> JSM (JSM ())) -> EventM e event (Maybe a) -> Chan [DSum (EventTriggerRef t) TriggerInvocation] -> EventTrigger t a -> JSM (JSM ()) Source #

wrapDomEventMaybe :: (TriggerEvent t m, MonadJSM m) => e -> (e -> EventM e event () -> JSM (JSM ())) -> EventM e event (Maybe a) -> m (Event t a) Source #

wrapDomEventsMaybe :: (MonadJSM m, MonadReflexCreateTrigger t m) => e -> (forall en. IsEvent (EventType en) => EventName en -> EventM e (EventType en) (Maybe (f en))) -> (forall en. EventName en -> e -> EventM e (EventType en) () -> JSM (JSM ())) -> ImmediateDomBuilderT t m (EventSelector t (WrapArg f EventName)) Source #

data WindowConfig t Source #

Constructors

WindowConfig 
Instances
Default (WindowConfig t) Source # 
Instance details

Defined in Reflex.Dom.Builder.Immediate

Methods

def :: WindowConfig t #

Internal

traverseDMapWithKeyWithAdjust' :: forall t m (k :: * -> *) v v'. (Adjustable t m, MonadHold t m, MonadFix m, MonadIO m, MonadJSM m, PrimMonad m, GCompare k) => (forall a. k a -> v a -> ImmediateDomBuilderT t m (v' a)) -> DMap k v -> Event t (PatchDMap k v) -> ImmediateDomBuilderT t m (DMap k v', Event t (PatchDMap k v')) Source #

hoistTraverseWithKeyWithAdjust Source #

Arguments

:: forall (k :: * -> *). (Adjustable t m, MonadHold t m, GCompare k, MonadIO m, MonadJSM m, PrimMonad m, MonadFix m, Patch (p k v), PatchTarget (p k (Constant Int)) ~ DMap k (Constant Int), Monoid (p k (Compose ((,,,) DocumentFragment Text (IORef (ChildReadyState k))) v')), Patch (p k (Constant Int))) 
=> (forall vv vv'. (forall a. k a -> vv a -> RequesterT t JSM Identity (TriggerEventT t m) (vv' a)) -> DMap k vv -> Event t (p k vv) -> RequesterT t JSM Identity (TriggerEventT t 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

-> (p k (Compose ((,,,) DocumentFragment Text (IORef (ChildReadyState k))) v') -> DMap k (Constant (IORef (ChildReadyState k))) -> IO (DMap k (Constant (IORef (ChildReadyState k)))))

Given a patch for the children DOM elements, produce a patch for the childrens' unreadiness state

-> (IORef (Map (Some k) Text) -> IORef Text -> p k (Compose ((,,,) DocumentFragment Text (IORef (ChildReadyState k))) v') -> JSM ())

Apply a patch to the DOM

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

hoistTraverseIntMapWithKeyWithAdjust Source #

Arguments

:: (Adjustable t m, MonadIO m, MonadJSM m, MonadFix m, PrimMonad m, Monoid (p (DocumentFragment, Text, IORef ChildReadyStateInt, v')), Functor p) 
=> ((Key -> v -> RequesterT t JSM Identity (TriggerEventT t m) (DocumentFragment, Text, IORef ChildReadyStateInt, v')) -> IntMap v -> Event t (p v) -> RequesterT t JSM Identity (TriggerEventT t m) (IntMap (DocumentFragment, Text, IORef ChildReadyStateInt, v'), Event t (p (DocumentFragment, Text, IORef ChildReadyStateInt, v'))))

The base monad's traversal

-> (p (DocumentFragment, Text, IORef ChildReadyStateInt, v') -> IntMap (IORef ChildReadyStateInt) -> IO (IntMap (IORef ChildReadyStateInt)))

Given a patch for the children DOM elements, produce a patch for the childrens' unreadiness state

-> (IORef (IntMap Text) -> IORef Text -> p (DocumentFragment, Text, IORef ChildReadyStateInt, v') -> JSM ())

Apply a patch to the DOM

-> (Key -> v -> ImmediateDomBuilderT t m v') 
-> IntMap v 
-> Event t (p v) 
-> ImmediateDomBuilderT t m (IntMap v', Event t (p v'))