Shpadoinkle-backend-snabbdom-0.3.0.2: Use the high-performance Snabbdom virtual dom library written in JavaScript.

Safe HaskellNone
LanguageHaskell2010

Shpadoinkle.Backend.Snabbdom

Description

This module provides the Backend binding for the JavaScript virtual DOM implementation Snabbdom.

Synopsis

Documentation

newtype SnabbdomT model m a Source #

Constructors

Snabbdom 

Fields

Instances
MonadReader r m => MonadReader r (SnabbdomT a m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

ask :: SnabbdomT a m r Source #

local :: (r -> r) -> SnabbdomT a m a0 -> SnabbdomT a m a0 Source #

reader :: (r -> a0) -> SnabbdomT a m a0 Source #

MonadState s m => MonadState s (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

get :: SnabbdomT model m s Source #

put :: s -> SnabbdomT model m () Source #

state :: (s -> (a, s)) -> SnabbdomT model m a Source #

MonadError e m => MonadError e (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

throwError :: e -> SnabbdomT model m a Source #

catchError :: SnabbdomT model m a -> (e -> SnabbdomT model m a) -> SnabbdomT model m a Source #

MonadWriter w m => MonadWriter w (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

writer :: (a, w) -> SnabbdomT model m a Source #

tell :: w -> SnabbdomT model m () Source #

listen :: SnabbdomT model m a -> SnabbdomT model m (a, w) Source #

pass :: SnabbdomT model m (a, w -> w) -> SnabbdomT model m a Source #

MonadBase n m => MonadBase n (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

liftBase :: n α -> SnabbdomT model m α Source #

MonadBaseControl n m => MonadBaseControl n (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Associated Types

type StM (SnabbdomT model m) a :: Type Source #

Methods

liftBaseWith :: (RunInBase (SnabbdomT model m) n -> n a) -> SnabbdomT model m a Source #

restoreM :: StM (SnabbdomT model m) a -> SnabbdomT model m a Source #

MonadTrans (SnabbdomT model) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

lift :: Monad m => m a -> SnabbdomT model m a Source #

MonadTransControl (SnabbdomT model) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Associated Types

type StT (SnabbdomT model) a :: Type Source #

Methods

liftWith :: Monad m => (Run (SnabbdomT model) -> m a) -> SnabbdomT model m a Source #

restoreT :: Monad m => m (StT (SnabbdomT model) a) -> SnabbdomT model m a Source #

(MonadJSM m, NFData a) => Backend (SnabbdomT a) m a Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Associated Types

type VNode (SnabbdomT a) m :: Type Source #

Methods

interpret :: (m ~> JSM) -> Html (SnabbdomT a m) a -> SnabbdomT a m (VNode (SnabbdomT a) m) Source #

patch :: RawNode -> Maybe (VNode (SnabbdomT a) m) -> VNode (SnabbdomT a) m -> SnabbdomT a m (VNode (SnabbdomT a) m) Source #

setup :: JSM () -> JSM () Source #

Monad m => Monad (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

(>>=) :: SnabbdomT model m a -> (a -> SnabbdomT model m b) -> SnabbdomT model m b Source #

(>>) :: SnabbdomT model m a -> SnabbdomT model m b -> SnabbdomT model m b Source #

return :: a -> SnabbdomT model m a Source #

fail :: String -> SnabbdomT model m a Source #

Functor m => Functor (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

fmap :: (a -> b) -> SnabbdomT model m a -> SnabbdomT model m b Source #

(<$) :: a -> SnabbdomT model m b -> SnabbdomT model m a Source #

Applicative m => Applicative (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

pure :: a -> SnabbdomT model m a Source #

(<*>) :: SnabbdomT model m (a -> b) -> SnabbdomT model m a -> SnabbdomT model m b Source #

liftA2 :: (a -> b -> c) -> SnabbdomT model m a -> SnabbdomT model m b -> SnabbdomT model m c Source #

(*>) :: SnabbdomT model m a -> SnabbdomT model m b -> SnabbdomT model m b Source #

(<*) :: SnabbdomT model m a -> SnabbdomT model m b -> SnabbdomT model m a Source #

MonadUnliftIO m => MonadUnliftIO (SnabbdomT r m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

askUnliftIO :: SnabbdomT r m (UnliftIO (SnabbdomT r m)) Source #

withRunInIO :: ((forall a. SnabbdomT r m a -> IO a) -> IO b) -> SnabbdomT r m b Source #

MonadJSM m => MonadJSM (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

liftJSM' :: JSM a -> SnabbdomT model m a Source #

MonadIO m => MonadIO (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

liftIO :: IO a -> SnabbdomT model m a Source #

MonadThrow m => MonadThrow (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

throwM :: Exception e => e -> SnabbdomT model m a Source #

MonadCatch m => MonadCatch (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

catch :: Exception e => SnabbdomT model m a -> (e -> SnabbdomT model m a) -> SnabbdomT model m a Source #

MonadMask m => MonadMask (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

mask :: ((forall a. SnabbdomT model m a -> SnabbdomT model m a) -> SnabbdomT model m b) -> SnabbdomT model m b Source #

uninterruptibleMask :: ((forall a. SnabbdomT model m a -> SnabbdomT model m a) -> SnabbdomT model m b) -> SnabbdomT model m b Source #

generalBracket :: SnabbdomT model m a -> (a -> ExitCase b -> SnabbdomT model m c) -> (a -> SnabbdomT model m b) -> SnabbdomT model m (b, c) Source #

MonadCont m => MonadCont (SnabbdomT model m) Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

Methods

callCC :: ((a -> SnabbdomT model m b) -> SnabbdomT model m a) -> SnabbdomT model m a Source #

type VNode (SnabbdomT a) m Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

type VNode (SnabbdomT a) m
type StT (SnabbdomT model) a Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

type StT (SnabbdomT model) a = StT (ReaderT (TVar model)) a
type StM (SnabbdomT model m) a Source # 
Instance details

Defined in Shpadoinkle.Backend.Snabbdom

type StM (SnabbdomT model m) a = ComposeSt (SnabbdomT model) m a

runSnabbdom :: TVar model -> SnabbdomT model m ~> m Source #

SnabbdomT is a newtype of ReaderT, this is the runReaderT equivalent.

stage :: MonadJSM m => SnabbdomT a m RawNode Source #

Get the body DOM node after emptying it.