Safe Haskell | None |
---|---|
Language | Haskell98 |
Foreign.JavaScript.TH
Synopsis
- runWithJSContextSingleton :: WithJSContextSingleton x m a -> JSContextSingleton x -> m a
- withJSContextSingleton :: MonadJSM m => (forall x. JSContextSingleton x -> m r) -> m r
- withJSContextSingletonMono :: MonadJSM m => (JSContextSingleton () -> m r) -> m r
- newtype JSContextSingleton x = JSContextSingleton {}
- newtype WithJSContextSingleton x (m :: Type -> Type) a = WithJSContextSingleton {
- unWithJSContextSingleton :: ReaderT (JSContextSingleton x) m a
- data Safety
- = Unsafe
- | Safe
- | Interruptible
Documentation
runWithJSContextSingleton :: WithJSContextSingleton x m a -> JSContextSingleton x -> m a 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.
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
Constructors
JSContextSingleton | |
Fields |
newtype WithJSContextSingleton x (m :: Type -> Type) a Source #
Constructors
WithJSContextSingleton | |
Fields
|
Instances
A safety level, as in a Foreign
declaration.
Constructors
Unsafe | |
Safe | |
Interruptible |
Instances
Data Safety # | |||||
Defined in GHC.Internal.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 :: forall r r'. (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 # | |||||
Generic Safety # | |||||
Defined in GHC.Internal.TH.Syntax Associated Types
| |||||
Show Safety # | |||||
Eq Safety # | |||||
Ord Safety # | |||||
type Rep Safety # | |||||
Defined in GHC.Internal.TH.Syntax |