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

Safe HaskellNone
LanguageHaskell98

Foreign.JavaScript.TH

Synopsis

Documentation

newtype JSUint8Array x Source #

Constructors

JSUint8Array 

Fields

Instances
ToJS x (JSUint8Array x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => JSUint8Array x -> (JSRef x -> m r) -> m r Source #

FromJS x (JSUint8Array x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fromJS :: MonadJS x m => JSRef x -> m (JSUint8Array x) Source #

newtype JSArray a Source #

Constructors

JSArray 

Fields

Instances
ToJS x a => ToJS x (JSArray a) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => JSArray a -> (JSRef x -> m r) -> m r Source #

FromJS x a => FromJS x (JSArray a) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fromJS :: MonadJS x m => JSRef x -> m (JSArray a) Source #

class ToJS x a where Source #

Minimal complete definition

withJS

Methods

withJS :: MonadJS x m => a -> (JSRef x -> m r) -> m r Source #

Instances
ToJS x Node Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => Node -> (JSRef x -> m r) -> m r Source #

ToJS x Double Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => Double -> (JSRef x -> m r) -> m r Source #

ToJS x Int Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => Int -> (JSRef x -> m r) -> m r Source #

ToJS x Word8 Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => Word8 -> (JSRef x -> m r) -> m r Source #

ToJS x Text Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => Text -> (JSRef x -> m r) -> m r Source #

ToJS x String Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => String -> (JSRef x -> m r) -> m r Source #

ToJS x Bool Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => Bool -> (JSRef x -> m r) -> m r Source #

ToJS x (JSUint8Array x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => JSUint8Array x -> (JSRef x -> m r) -> m r Source #

ToJS x a => ToJS x (JSArray a) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => JSArray a -> (JSRef x -> m r) -> m r Source #

ToJS x (JSRef x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => JSRef x -> (JSRef x -> m r) -> m r Source #

ToJS x (JSFun x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => JSFun x -> (JSRef x -> m r) -> m r Source #

class FromJS x a where Source #

Minimal complete definition

fromJS

Methods

fromJS :: MonadJS x m => JSRef x -> m a Source #

Instances
FromJS x Double Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fromJS :: MonadJS x m => JSRef x -> m Double Source #

FromJS x Int Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fromJS :: MonadJS x m => JSRef x -> m Int Source #

FromJS x Text Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fromJS :: MonadJS x m => JSRef x -> m Text Source #

FromJS x String Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fromJS :: MonadJS x m => JSRef x -> m String Source #

FromJS x Bool Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fromJS :: MonadJS x m => JSRef x -> m Bool Source #

FromJS x () Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fromJS :: MonadJS x m => JSRef x -> m () Source #

FromJS x (JSUint8Array x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fromJS :: MonadJS x m => JSRef x -> m (JSUint8Array x) Source #

FromJS x a => FromJS x (JSArray a) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fromJS :: MonadJS x m => JSRef x -> m (JSArray a) Source #

FromJS x (JSRef x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fromJS :: MonadJS x m => JSRef x -> m (JSRef x) Source #

FromJS x a => FromJS x (Maybe a) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fromJS :: MonadJS x m => JSRef x -> m (Maybe a) Source #

newtype WithJSContext x m a Source #

Instances
MonadTrans (WithJSContext x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

lift :: Monad m => m a -> WithJSContext x m a #

MonadJS (JSCtx_JavaScriptCore x) (WithJSContext x IO) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

runJS :: JSFFI -> [JSRef (JSCtx_JavaScriptCore x)] -> WithJSContext x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

forkJS :: WithJSContext x IO () -> WithJSContext x IO ThreadId Source #

mkJSUndefined :: WithJSContext x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

isJSNull :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO Bool Source #

isJSUndefined :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO Bool Source #

fromJSBool :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO Bool Source #

fromJSString :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO String Source #

fromJSArray :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO [JSRef (JSCtx_JavaScriptCore x)] Source #

fromJSUint8Array :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO ByteString Source #

fromJSNumber :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO Double Source #

withJSBool :: Bool -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

withJSString :: String -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

withJSNumber :: Double -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

withJSArray :: [JSRef (JSCtx_JavaScriptCore x)] -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

withJSUint8Array :: ByteString -> (JSUint8Array (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

mkJSFun :: ([JSRef (JSCtx_JavaScriptCore x)] -> WithJSContext x IO (JSRef (JSCtx_JavaScriptCore x))) -> WithJSContext x IO (JSFun (JSCtx_JavaScriptCore x)) Source #

freeJSFun :: JSFun (JSCtx_JavaScriptCore x) -> WithJSContext x IO () Source #

setJSProp :: String -> JSRef (JSCtx_JavaScriptCore x) -> JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO () Source #

getJSProp :: String -> JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

withJSNode :: Node -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

Monad m => Monad (WithJSContext x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

(>>=) :: WithJSContext x m a -> (a -> WithJSContext x m b) -> WithJSContext x m b #

(>>) :: WithJSContext x m a -> WithJSContext x m b -> WithJSContext x m b #

return :: a -> WithJSContext x m a #

fail :: String -> WithJSContext x m a #

Functor m => Functor (WithJSContext x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fmap :: (a -> b) -> WithJSContext x m a -> WithJSContext x m b #

(<$) :: a -> WithJSContext x m b -> WithJSContext x m a #

MonadFix m => MonadFix (WithJSContext x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

mfix :: (a -> WithJSContext x m a) -> WithJSContext x m a #

Applicative m => Applicative (WithJSContext x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

pure :: a -> WithJSContext x m a #

(<*>) :: WithJSContext x m (a -> b) -> WithJSContext x m a -> WithJSContext x m b #

liftA2 :: (a -> b -> c) -> WithJSContext x m a -> WithJSContext x m b -> WithJSContext x m c #

(*>) :: WithJSContext x m a -> WithJSContext x m b -> WithJSContext x m b #

(<*) :: WithJSContext x m a -> WithJSContext x m b -> WithJSContext x m a #

MonadIO m => MonadIO (WithJSContext x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

liftIO :: IO a -> WithJSContext x m a #

MonadException m => MonadException (WithJSContext x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

throw :: Exception e => e -> WithJSContext x m a #

catch :: Exception e => WithJSContext x m a -> (e -> WithJSContext x m a) -> WithJSContext x m a #

finally :: WithJSContext x m a -> WithJSContext x m b -> WithJSContext x m a #

MonadAsyncException m => MonadAsyncException (WithJSContext x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

mask :: ((forall a. WithJSContext x m a -> WithJSContext x m a) -> WithJSContext x m b) -> WithJSContext x m b #

MonadIO m => MonadJSM (WithJSContext x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

liftJSM' :: JSM a -> WithJSContext x m a #

data JSCtx_JavaScriptCore x Source #

Instances
IsJSContext (JSCtx_JavaScriptCore x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

data JSRef (JSCtx_JavaScriptCore x) :: * Source #

MonadJS (JSCtx_JavaScriptCore x) (WithJSContext x IO) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

runJS :: JSFFI -> [JSRef (JSCtx_JavaScriptCore x)] -> WithJSContext x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

forkJS :: WithJSContext x IO () -> WithJSContext x IO ThreadId Source #

mkJSUndefined :: WithJSContext x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

isJSNull :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO Bool Source #

isJSUndefined :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO Bool Source #

fromJSBool :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO Bool Source #

fromJSString :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO String Source #

fromJSArray :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO [JSRef (JSCtx_JavaScriptCore x)] Source #

fromJSUint8Array :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO ByteString Source #

fromJSNumber :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO Double Source #

withJSBool :: Bool -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

withJSString :: String -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

withJSNumber :: Double -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

withJSArray :: [JSRef (JSCtx_JavaScriptCore x)] -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

withJSUint8Array :: ByteString -> (JSUint8Array (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

mkJSFun :: ([JSRef (JSCtx_JavaScriptCore x)] -> WithJSContext x IO (JSRef (JSCtx_JavaScriptCore x))) -> WithJSContext x IO (JSFun (JSCtx_JavaScriptCore x)) Source #

freeJSFun :: JSFun (JSCtx_JavaScriptCore x) -> WithJSContext x IO () Source #

setJSProp :: String -> JSRef (JSCtx_JavaScriptCore x) -> JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO () Source #

getJSProp :: String -> JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

withJSNode :: Node -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

MonadJS (JSCtx_JavaScriptCore x) (WithJSContextSingleton x IO) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

runJS :: JSFFI -> [JSRef (JSCtx_JavaScriptCore x)] -> WithJSContextSingleton x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

forkJS :: WithJSContextSingleton x IO () -> WithJSContextSingleton x IO ThreadId Source #

mkJSUndefined :: WithJSContextSingleton x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

isJSNull :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO Bool Source #

isJSUndefined :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO Bool Source #

fromJSBool :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO Bool Source #

fromJSString :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO String Source #

fromJSArray :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO [JSRef (JSCtx_JavaScriptCore x)] Source #

fromJSUint8Array :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO ByteString Source #

fromJSNumber :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO Double Source #

withJSBool :: Bool -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

withJSString :: String -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

withJSNumber :: Double -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

withJSArray :: [JSRef (JSCtx_JavaScriptCore x)] -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

withJSUint8Array :: ByteString -> (JSUint8Array (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

mkJSFun :: ([JSRef (JSCtx_JavaScriptCore x)] -> WithJSContextSingleton x IO (JSRef (JSCtx_JavaScriptCore x))) -> WithJSContextSingleton x IO (JSFun (JSCtx_JavaScriptCore x)) Source #

freeJSFun :: JSFun (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO () Source #

setJSProp :: String -> JSRef (JSCtx_JavaScriptCore x) -> JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO () Source #

getJSProp :: String -> JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

withJSNode :: Node -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

MonadIO m => HasJS (JSCtx_JavaScriptCore x) (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

type JSX (WithJSContextSingleton x m) :: * -> * Source #

data JSRef (JSCtx_JavaScriptCore x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

class Monad m => MonadJS x m | m -> x where Source #

A Monad that is capable of executing JavaScript

Methods

runJS :: JSFFI -> [JSRef x] -> m (JSRef x) Source #

forkJS :: m () -> m ThreadId Source #

mkJSUndefined :: m (JSRef x) Source #

isJSNull :: JSRef x -> m Bool Source #

isJSUndefined :: JSRef x -> m Bool Source #

fromJSBool :: JSRef x -> m Bool Source #

fromJSString :: JSRef x -> m String Source #

fromJSArray :: JSRef x -> m [JSRef x] Source #

fromJSUint8Array :: JSRef x -> m ByteString Source #

fromJSNumber :: JSRef x -> m Double Source #

withJSBool :: Bool -> (JSRef x -> m r) -> m r Source #

withJSString :: String -> (JSRef x -> m r) -> m r Source #

withJSNumber :: Double -> (JSRef x -> m r) -> m r Source #

withJSArray :: [JSRef x] -> (JSRef x -> m r) -> m r Source #

withJSUint8Array :: ByteString -> (JSUint8Array x -> m r) -> m r Source #

mkJSFun :: ([JSRef x] -> m (JSRef x)) -> m (JSFun x) Source #

Create a JSFun with zero arguments; should be equilvant to `syncCallback AlwaysRetain True` in GHCJS

freeJSFun :: JSFun x -> m () Source #

setJSProp :: String -> JSRef x -> JSRef x -> m () Source #

getJSProp :: String -> JSRef x -> m (JSRef x) Source #

withJSNode :: Node -> (JSRef x -> m r) -> m r Source #

Instances
MonadJS (JSCtx_JavaScriptCore x) (WithJSContext x IO) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

runJS :: JSFFI -> [JSRef (JSCtx_JavaScriptCore x)] -> WithJSContext x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

forkJS :: WithJSContext x IO () -> WithJSContext x IO ThreadId Source #

mkJSUndefined :: WithJSContext x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

isJSNull :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO Bool Source #

isJSUndefined :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO Bool Source #

fromJSBool :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO Bool Source #

fromJSString :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO String Source #

fromJSArray :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO [JSRef (JSCtx_JavaScriptCore x)] Source #

fromJSUint8Array :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO ByteString Source #

fromJSNumber :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO Double Source #

withJSBool :: Bool -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

withJSString :: String -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

withJSNumber :: Double -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

withJSArray :: [JSRef (JSCtx_JavaScriptCore x)] -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

withJSUint8Array :: ByteString -> (JSUint8Array (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

mkJSFun :: ([JSRef (JSCtx_JavaScriptCore x)] -> WithJSContext x IO (JSRef (JSCtx_JavaScriptCore x))) -> WithJSContext x IO (JSFun (JSCtx_JavaScriptCore x)) Source #

freeJSFun :: JSFun (JSCtx_JavaScriptCore x) -> WithJSContext x IO () Source #

setJSProp :: String -> JSRef (JSCtx_JavaScriptCore x) -> JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO () Source #

getJSProp :: String -> JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

withJSNode :: Node -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContext x IO r) -> WithJSContext x IO r Source #

MonadJS (JSCtx_JavaScriptCore x) (WithJSContextSingleton x IO) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

runJS :: JSFFI -> [JSRef (JSCtx_JavaScriptCore x)] -> WithJSContextSingleton x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

forkJS :: WithJSContextSingleton x IO () -> WithJSContextSingleton x IO ThreadId Source #

mkJSUndefined :: WithJSContextSingleton x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

isJSNull :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO Bool Source #

isJSUndefined :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO Bool Source #

fromJSBool :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO Bool Source #

fromJSString :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO String Source #

fromJSArray :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO [JSRef (JSCtx_JavaScriptCore x)] Source #

fromJSUint8Array :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO ByteString Source #

fromJSNumber :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO Double Source #

withJSBool :: Bool -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

withJSString :: String -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

withJSNumber :: Double -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

withJSArray :: [JSRef (JSCtx_JavaScriptCore x)] -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

withJSUint8Array :: ByteString -> (JSUint8Array (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

mkJSFun :: ([JSRef (JSCtx_JavaScriptCore x)] -> WithJSContextSingleton x IO (JSRef (JSCtx_JavaScriptCore x))) -> WithJSContextSingleton x IO (JSFun (JSCtx_JavaScriptCore x)) Source #

freeJSFun :: JSFun (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO () Source #

setJSProp :: String -> JSRef (JSCtx_JavaScriptCore x) -> JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO () Source #

getJSProp :: String -> JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

withJSNode :: Node -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

class (Monad m, MonadJSM (JSX m), MonadFix (JSX m), MonadJS x (JSX m)) => HasJS x m | m -> x where Source #

Minimal complete definition

liftJS

Associated Types

type JSX m :: * -> * Source #

Methods

liftJS :: JSX m a -> m a Source #

Instances
HasJS js m => HasJS js (InputDisabledT m) Source # 
Instance details

Defined in Reflex.Dom.Builder.InputDisabled

Associated Types

type JSX (InputDisabledT m) :: * -> * Source #

HasJS x m => HasJS x (PostBuildT t m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

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

Methods

liftJS :: JSX (PostBuildT t m) a -> PostBuildT t m a Source #

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

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

Defined in Foreign.JavaScript.TH

Associated Types

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

Methods

liftJS :: JSX (QueryT t q m) a -> QueryT t q m a Source #

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

Defined in Foreign.JavaScript.TH

Associated Types

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

Methods

liftJS :: JSX (EventWriterT t w m) a -> EventWriterT t w m a Source #

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

Defined in Foreign.JavaScript.TH

Associated Types

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

Methods

liftJS :: JSX (DynamicWriterT t w m) a -> DynamicWriterT t w m a Source #

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

Defined in Foreign.JavaScript.TH

Associated Types

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

Methods

liftJS :: JSX (PerformEventT t m) a -> PerformEventT t m a Source #

HasJS x m => HasJS x (ReaderT r m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

type JSX (ReaderT r m) :: * -> * Source #

Methods

liftJS :: JSX (ReaderT r m) a -> ReaderT r m a Source #

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

Defined in Foreign.JavaScript.TH

Associated Types

type JSX (RequesterT t request response m) :: * -> * Source #

Methods

liftJS :: JSX (RequesterT t request response m) a -> RequesterT t request response m a Source #

MonadIO m => HasJS (JSCtx_JavaScriptCore x) (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

type JSX (WithJSContextSingleton x m) :: * -> * Source #

class IsJSContext x Source #

Associated Types

data JSRef x Source #

Instances
IsJSContext (JSCtx_JavaScriptCore x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

data JSRef (JSCtx_JavaScriptCore x) :: * Source #

data JSFun x Source #

Constructors

JSFun 
Instances
ToJS x (JSFun x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

withJS :: MonadJS x m => JSFun x -> (JSRef x -> m r) -> m r Source #

newtype JSFFI Source #

Constructors

JSFFI String 

newtype JSContextSingleton x Source #

A singleton type for a given JSContext; we use this to statically guarantee that different JSContexts don't get mixed up

newtype WithJSContextSingleton x m a Source #

Instances
PerformEvent t m => PerformEvent t (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

type Performable (WithJSContextSingleton x m) :: * -> * #

Adjustable t m => Adjustable t (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

MonadSubscribeEvent t m => MonadSubscribeEvent t (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

MonadReflexCreateTrigger t m => MonadReflexCreateTrigger t (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

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

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

MonadReflexHost t m => MonadReflexHost t (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

type ReadPhase (WithJSContextSingleton x m) :: * -> * #

MonadTrans (WithJSContextSingleton x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

lift :: Monad m => m a -> WithJSContextSingleton x m a #

MonadTransControl (WithJSContextSingleton x) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

type StT (WithJSContextSingleton x) a :: * #

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

Defined in Foreign.JavaScript.TH

Methods

sample :: Behavior t a -> WithJSContextSingleton x m a #

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

Defined in Foreign.JavaScript.TH

MonadJS (JSCtx_JavaScriptCore x) (WithJSContextSingleton x IO) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

runJS :: JSFFI -> [JSRef (JSCtx_JavaScriptCore x)] -> WithJSContextSingleton x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

forkJS :: WithJSContextSingleton x IO () -> WithJSContextSingleton x IO ThreadId Source #

mkJSUndefined :: WithJSContextSingleton x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

isJSNull :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO Bool Source #

isJSUndefined :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO Bool Source #

fromJSBool :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO Bool Source #

fromJSString :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO String Source #

fromJSArray :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO [JSRef (JSCtx_JavaScriptCore x)] Source #

fromJSUint8Array :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO ByteString Source #

fromJSNumber :: JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO Double Source #

withJSBool :: Bool -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

withJSString :: String -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

withJSNumber :: Double -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

withJSArray :: [JSRef (JSCtx_JavaScriptCore x)] -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

withJSUint8Array :: ByteString -> (JSUint8Array (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

mkJSFun :: ([JSRef (JSCtx_JavaScriptCore x)] -> WithJSContextSingleton x IO (JSRef (JSCtx_JavaScriptCore x))) -> WithJSContextSingleton x IO (JSFun (JSCtx_JavaScriptCore x)) Source #

freeJSFun :: JSFun (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO () Source #

setJSProp :: String -> JSRef (JSCtx_JavaScriptCore x) -> JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO () Source #

getJSProp :: String -> JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO (JSRef (JSCtx_JavaScriptCore x)) Source #

withJSNode :: Node -> (JSRef (JSCtx_JavaScriptCore x) -> WithJSContextSingleton x IO r) -> WithJSContextSingleton x IO r Source #

MonadIO m => HasJS (JSCtx_JavaScriptCore x) (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

type JSX (WithJSContextSingleton x m) :: * -> * Source #

Monad m => Monad (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Functor m => Functor (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

fmap :: (a -> b) -> WithJSContextSingleton x m a -> WithJSContextSingleton x m b #

(<$) :: a -> WithJSContextSingleton x m b -> WithJSContextSingleton x m a #

MonadFix m => MonadFix (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

mfix :: (a -> WithJSContextSingleton x m a) -> WithJSContextSingleton x m a #

Applicative m => Applicative (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

MonadIO m => MonadIO (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

liftIO :: IO a -> WithJSContextSingleton x m a #

MonadException m => MonadException (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

MonadAsyncException m => MonadAsyncException (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

mask :: ((forall a. WithJSContextSingleton x m a -> WithJSContextSingleton x m a) -> WithJSContextSingleton x m b) -> WithJSContextSingleton x m b #

MonadIO m => MonadJSM (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

liftJSM' :: JSM a -> WithJSContextSingleton x m a #

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

Defined in Foreign.JavaScript.TH

Associated Types

type PrimState (WithJSContextSingleton x m) :: * #

MonadRef m => MonadRef (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

type Ref (WithJSContextSingleton x m) :: * -> * #

MonadAtomicRef m => MonadAtomicRef (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Methods

atomicModifyRef :: Ref (WithJSContextSingleton x m) a -> (a -> (a, b)) -> WithJSContextSingleton x m b #

atomicModifyRef' :: Ref (WithJSContextSingleton x m) a -> (a -> (a, b)) -> WithJSContextSingleton x m b #

Monad m => HasJSContext (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

type JSContextPhantom (WithJSContextSingleton x m) :: * Source #

type StT (WithJSContextSingleton x) a Source # 
Instance details

Defined in Foreign.JavaScript.TH

type StT (WithJSContextSingleton x) a = StT (ReaderT (JSContextSingleton x) :: (* -> *) -> * -> *) a
type PrimState (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

type Ref (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

type Performable (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

type ReadPhase (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

type JSX (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

type JSContextPhantom (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

class Monad m => HasJSContext m where Source #

Minimal complete definition

askJSContext

Associated Types

type JSContextPhantom m :: * Source #

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

Defined in Reflex.Dom.Builder.InputDisabled

Associated Types

type JSContextPhantom (InputDisabledT m) :: * Source #

HasJSContext m => HasJSContext (StateT r m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

type JSContextPhantom (StateT r m) :: * Source #

HasJSContext m => HasJSContext (StateT r m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

type JSContextPhantom (StateT r m) :: * Source #

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

Defined in Foreign.JavaScript.TH

Associated Types

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

Monad m => HasJSContext (WithJSContextSingleton x m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

type JSContextPhantom (WithJSContextSingleton x m) :: * Source #

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

Defined in Reflex.Dom.Builder.Immediate

Associated Types

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

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

Defined in Foreign.JavaScript.TH

Associated Types

type JSContextPhantom (ReaderT r m) :: * Source #

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

Defined in Foreign.JavaScript.TH

Associated Types

type JSContextPhantom (DynamicWriterT t w m) :: * Source #

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

Defined in Foreign.JavaScript.TH

Associated Types

type JSContextPhantom (QueryT t q m) :: * Source #

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

Defined in Foreign.JavaScript.TH

Associated Types

type JSContextPhantom (EventWriterT t w m) :: * Source #

(ReflexHost t, HasJSContext (HostFrame t)) => HasJSContext (PerformEventT t m) Source # 
Instance details

Defined in Foreign.JavaScript.TH

Associated Types

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

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

Defined in Foreign.JavaScript.TH

Associated Types

type JSContextPhantom (RequesterT t request response m) :: * Source #

Methods

askJSContext :: RequesterT t request response m (JSContextSingleton (JSContextPhantom (RequesterT t request response m))) Source #

withJSContextSingleton :: MonadJSM m => (forall x. JSContextSingleton x -> m r) -> m r Source #

withJSContextSingletonMono :: MonadJSM m => (JSContextSingleton () -> m r) -> m r Source #

Warning: withJSContextSingletonMono does not provide the same guarantees that withJSContextSingleton does.

withJSArrayFromList :: (ToJS x a, MonadJS x m) => [a] -> (JSRef x -> m r) -> m r Source #

data Safety #

Constructors

Unsafe 
Safe 
Interruptible 
Instances
Eq Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

(==) :: Safety -> Safety -> Bool #

(/=) :: Safety -> Safety -> Bool #

Data Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Safety -> c Safety #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Safety #

toConstr :: Safety -> Constr #

dataTypeOf :: Safety -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Safety) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Safety) #

gmapT :: (forall b. Data b => b -> b) -> Safety -> Safety #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Safety -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Safety -> r #

gmapQ :: (forall d. Data d => d -> u) -> Safety -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Safety -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Safety -> m Safety #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Safety -> m Safety #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Safety -> m Safety #

Ord Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Safety :: * -> * #

Methods

from :: Safety -> Rep Safety x #

to :: Rep Safety x -> Safety #

type Rep Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Safety = D1 (MetaData "Safety" "Language.Haskell.TH.Syntax" "template-haskell" False) (C1 (MetaCons "Unsafe" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "Safe" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "Interruptible" PrefixI False) (U1 :: * -> *)))