jsaddle-0.9.9.2: Interface for JavaScript that works with GHCJS and GHC
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHCJS.Marshal.Internal

Documentation

class FromJSVal a where Source #

Minimal complete definition

Nothing

Methods

fromJSVal :: JSVal -> JSM (Maybe a) Source #

default fromJSVal :: (Generic a, GFromJSVal (Rep a ())) => JSVal -> JSM (Maybe a) Source #

fromJSValUnchecked :: JSVal -> JSM a Source #

fromJSValListOf :: JSVal -> JSM (Maybe [a]) Source #

fromJSValUncheckedListOf :: JSVal -> JSM [a] Source #

Instances

Instances details
FromJSVal Value Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal Int16 Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal Int32 Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal Int8 Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal Word16 Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal Word32 Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal Word8 Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal JSString Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

FromJSVal JSVal Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal Text Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

FromJSVal () Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal Bool Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal Char Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

FromJSVal Double Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal Float Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal Int Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal Word Source # 
Instance details

Defined in GHCJS.Marshal

FromJSVal a => FromJSVal (Maybe a) Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

FromJSVal a => FromJSVal [a] Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

(FromJSVal a, FromJSVal b) => FromJSVal (a, b) Source # 
Instance details

Defined in GHCJS.Marshal

(FromJSVal a, FromJSVal b, FromJSVal c) => FromJSVal (a, b, c) Source # 
Instance details

Defined in GHCJS.Marshal

Methods

fromJSVal :: JSVal -> JSM (Maybe (a, b, c)) Source #

fromJSValUnchecked :: JSVal -> JSM (a, b, c) Source #

fromJSValListOf :: JSVal -> JSM (Maybe [(a, b, c)]) Source #

fromJSValUncheckedListOf :: JSVal -> JSM [(a, b, c)] Source #

(FromJSVal a, FromJSVal b, FromJSVal c, FromJSVal d) => FromJSVal (a, b, c, d) Source # 
Instance details

Defined in GHCJS.Marshal

Methods

fromJSVal :: JSVal -> JSM (Maybe (a, b, c, d)) Source #

fromJSValUnchecked :: JSVal -> JSM (a, b, c, d) Source #

fromJSValListOf :: JSVal -> JSM (Maybe [(a, b, c, d)]) Source #

fromJSValUncheckedListOf :: JSVal -> JSM [(a, b, c, d)] Source #

(FromJSVal a, FromJSVal b, FromJSVal c, FromJSVal d, FromJSVal e) => FromJSVal (a, b, c, d, e) Source # 
Instance details

Defined in GHCJS.Marshal

Methods

fromJSVal :: JSVal -> JSM (Maybe (a, b, c, d, e)) Source #

fromJSValUnchecked :: JSVal -> JSM (a, b, c, d, e) Source #

fromJSValListOf :: JSVal -> JSM (Maybe [(a, b, c, d, e)]) Source #

fromJSValUncheckedListOf :: JSVal -> JSM [(a, b, c, d, e)] Source #

(FromJSVal a, FromJSVal b, FromJSVal c, FromJSVal d, FromJSVal e, FromJSVal f) => FromJSVal (a, b, c, d, e, f) Source # 
Instance details

Defined in GHCJS.Marshal

Methods

fromJSVal :: JSVal -> JSM (Maybe (a, b, c, d, e, f)) Source #

fromJSValUnchecked :: JSVal -> JSM (a, b, c, d, e, f) Source #

fromJSValListOf :: JSVal -> JSM (Maybe [(a, b, c, d, e, f)]) Source #

fromJSValUncheckedListOf :: JSVal -> JSM [(a, b, c, d, e, f)] Source #

(FromJSVal a, FromJSVal b, FromJSVal c, FromJSVal d, FromJSVal e, FromJSVal f, FromJSVal g) => FromJSVal (a, b, c, d, e, f, g) Source # 
Instance details

Defined in GHCJS.Marshal

Methods

fromJSVal :: JSVal -> JSM (Maybe (a, b, c, d, e, f, g)) Source #

fromJSValUnchecked :: JSVal -> JSM (a, b, c, d, e, f, g) Source #

fromJSValListOf :: JSVal -> JSM (Maybe [(a, b, c, d, e, f, g)]) Source #

fromJSValUncheckedListOf :: JSVal -> JSM [(a, b, c, d, e, f, g)] Source #

(FromJSVal a, FromJSVal b, FromJSVal c, FromJSVal d, FromJSVal e, FromJSVal f, FromJSVal g, FromJSVal h) => FromJSVal (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in GHCJS.Marshal

Methods

fromJSVal :: JSVal -> JSM (Maybe (a, b, c, d, e, f, g, h)) Source #

fromJSValUnchecked :: JSVal -> JSM (a, b, c, d, e, f, g, h) Source #

fromJSValListOf :: JSVal -> JSM (Maybe [(a, b, c, d, e, f, g, h)]) Source #

fromJSValUncheckedListOf :: JSVal -> JSM [(a, b, c, d, e, f, g, h)] Source #

class ToJSVal a where Source #

Minimal complete definition

Nothing

Methods

toJSVal :: a -> JSM JSVal Source #

default toJSVal :: (Generic a, GToJSVal (Rep a ())) => a -> JSM JSVal Source #

toJSValListOf :: [a] -> JSM JSVal Source #

Instances

Instances details
ToJSVal Value Source #

Makes a JSON value

Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Int16 Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Int32 Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Int8 Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Word16 Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Word32 Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Word8 Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal JSString Source #

Makes a JavaScript string

Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal JSVal Source #

If we already have a JSVal we are fine

Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Function Source # 
Instance details

Defined in Language.Javascript.JSaddle.Object

ToJSVal JSCallAsFunction Source #

A callback to Haskell can be used as a JavaScript value. This will create an anonymous JavaScript function object. Use function to create one with a name.

Instance details

Defined in Language.Javascript.JSaddle.Object

ToJSVal Object Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal JSNull Source #

Makes a null JavaScript value

Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal JSUndefined Source #

Makes an undefined JavaScript value

Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal JSValue Source #

Makes a JavaScript value from a JSValue ADT.

Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Text Source #

Makes a JavaScript string

Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Bool Source #

Make a JavaScript boolean value

Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Char Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Double Source #

Makes a JavaScript number

Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Float Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Int Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal Word Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal v => ToJSVal (JSM v) Source #

JSVal can be made by evaluating a function in JSM as long as it returns something we can make into a JSVal.

Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal a => ToJSVal (Maybe a) Source #

Makes a JSVal or null JavaScript value

Instance details

Defined in Language.Javascript.JSaddle.Value

ToJSVal a => ToJSVal [a] Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

Methods

toJSVal :: [a] -> JSM JSVal Source #

toJSValListOf :: [[a]] -> JSM JSVal Source #

(ToJSVal a, ToJSVal b) => ToJSVal (a, b) Source # 
Instance details

Defined in GHCJS.Marshal

Methods

toJSVal :: (a, b) -> JSM JSVal Source #

toJSValListOf :: [(a, b)] -> JSM JSVal Source #

(ToJSVal a, ToJSVal b, ToJSVal c) => ToJSVal (a, b, c) Source # 
Instance details

Defined in GHCJS.Marshal

Methods

toJSVal :: (a, b, c) -> JSM JSVal Source #

toJSValListOf :: [(a, b, c)] -> JSM JSVal Source #

(ToJSVal a, ToJSVal b, ToJSVal c, ToJSVal d) => ToJSVal (a, b, c, d) Source # 
Instance details

Defined in GHCJS.Marshal

Methods

toJSVal :: (a, b, c, d) -> JSM JSVal Source #

toJSValListOf :: [(a, b, c, d)] -> JSM JSVal Source #

(ToJSVal a, ToJSVal b, ToJSVal c, ToJSVal d, ToJSVal e) => ToJSVal (a, b, c, d, e) Source # 
Instance details

Defined in GHCJS.Marshal

Methods

toJSVal :: (a, b, c, d, e) -> JSM JSVal Source #

toJSValListOf :: [(a, b, c, d, e)] -> JSM JSVal Source #

(ToJSVal a, ToJSVal b, ToJSVal c, ToJSVal d, ToJSVal e, ToJSVal f) => ToJSVal (a, b, c, d, e, f) Source # 
Instance details

Defined in GHCJS.Marshal

Methods

toJSVal :: (a, b, c, d, e, f) -> JSM JSVal Source #

toJSValListOf :: [(a, b, c, d, e, f)] -> JSM JSVal Source #

(ToJSVal a, ToJSVal b, ToJSVal c, ToJSVal d, ToJSVal e, ToJSVal f, ToJSVal g) => ToJSVal (a, b, c, d, e, f, g) Source # 
Instance details

Defined in GHCJS.Marshal

Methods

toJSVal :: (a, b, c, d, e, f, g) -> JSM JSVal Source #

toJSValListOf :: [(a, b, c, d, e, f, g)] -> JSM JSVal Source #

class PToJSVal a where Source #

Methods

pToJSVal :: a -> JSVal Source #

Instances

Instances details
PToJSVal JSVal Source # 
Instance details

Defined in GHCJS.Marshal.Pure

Methods

pToJSVal :: JSVal -> JSVal Source #

PToJSVal MutableArrayBuffer Source # 
Instance details

Defined in JavaScript.TypedArray.ArrayBuffer.Internal

PToJSVal Bool Source # 
Instance details

Defined in GHCJS.Marshal.Pure

Methods

pToJSVal :: Bool -> JSVal Source #

class PFromJSVal a where Source #

Methods

pFromJSVal :: JSVal -> a Source #

Instances

Instances details
PFromJSVal JSVal Source # 
Instance details

Defined in GHCJS.Marshal.Pure

PFromJSVal MutableArrayBuffer Source # 
Instance details

Defined in JavaScript.TypedArray.ArrayBuffer.Internal

PFromJSVal () Source # 
Instance details

Defined in GHCJS.Marshal.Pure

Methods

pFromJSVal :: JSVal -> () Source #

data Purity Source #

Constructors

PureShared

conversion is pure even if the original value is shared

PureExclusive

conversion is pure if the we only convert once

Instances

Instances details
Data Purity Source # 
Instance details

Defined in GHCJS.Marshal.Internal

Methods

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

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

toConstr :: Purity -> Constr #

dataTypeOf :: Purity -> DataType #

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

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

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

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

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

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

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

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

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

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

Eq Purity Source # 
Instance details

Defined in GHCJS.Marshal.Internal

Methods

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

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

Ord Purity Source # 
Instance details

Defined in GHCJS.Marshal.Internal

toJSVal_generic :: forall a. (Generic a, GToJSVal (Rep a ())) => (String -> String) -> a -> JSM JSVal Source #

fromJSVal_generic :: forall a. (Generic a, GFromJSVal (Rep a ())) => (String -> String) -> JSVal -> JSM (Maybe a) Source #