jsaddle-0.9.5.0: Interface for JavaScript that works with GHCJS and GHC

Safe HaskellNone
LanguageHaskell2010

Language.Javascript.JSaddle.Classes.Internal

Contents

Description

These classes are used to make various JavaScript types out of whatever we have. Functions in jsaddle take these as inputs. This alows implicit casting and eager evaluation.

Synopsis

Type classes to convert Haskell data to JavaScript

class MakeObject this where Source #

Anything that can be used to make a JavaScript object reference

Minimal complete definition

makeObject

Methods

makeObject :: this -> JSM Object Source #

Instances
MakeObject JSVal Source # 
Instance details

Defined in Language.Javascript.JSaddle.Value

MakeObject Object Source #

If we already have a Object we are fine

Instance details

Defined in Language.Javascript.JSaddle.Classes.Internal

MakeObject v => MakeObject (JSM v) Source #

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

Instance details

Defined in Language.Javascript.JSaddle.Object

Methods

makeObject :: JSM v -> JSM Object Source #

class MakeArgs this where Source #

Anything that can be used to make a list of JavaScript value references for use as function arguments

Minimal complete definition

makeArgs

Methods

makeArgs :: this -> JSM [JSVal] Source #

Instances
MakeArgs Bool Source #

Makes an argument list with just a single JavaScript boolean value

Instance details

Defined in Language.Javascript.JSaddle.Value

Methods

makeArgs :: Bool -> JSM [JSVal] Source #

MakeArgs Double Source #

Makes an argument list with just a single JavaScript number

Instance details

Defined in Language.Javascript.JSaddle.Value

Methods

makeArgs :: Double -> JSM [JSVal] Source #

MakeArgs () Source #

This allows us to pass no arguments easily (altenative would be to use []::[JSVal]).

Instance details

Defined in Language.Javascript.JSaddle.Value

Methods

makeArgs :: () -> JSM [JSVal] Source #

MakeArgs Text Source #

Makes an argument list with just a single JavaScript string

Instance details

Defined in Language.Javascript.JSaddle.Value

Methods

makeArgs :: Text -> JSM [JSVal] Source #

MakeArgs Value Source #

Makes an argument list with just a single JSON value

Instance details

Defined in Language.Javascript.JSaddle.Value

Methods

makeArgs :: Value -> JSM [JSVal] Source #

MakeArgs JSVal Source #

A single JSVal can be used as the argument list

Instance details

Defined in Language.Javascript.JSaddle.Value

Methods

makeArgs :: JSVal -> JSM [JSVal] Source #

MakeArgs JSCallAsFunction Source # 
Instance details

Defined in Language.Javascript.JSaddle.Object

MakeArgs JSValue Source #

Makes an argument list with just a single JavaScript value from a JSValue ADT.

Instance details

Defined in Language.Javascript.JSaddle.Value

Methods

makeArgs :: JSValue -> JSM [JSVal] Source #

MakeArgs JSNull Source #

Makes an argument list with just a single null JavaScript value

Instance details

Defined in Language.Javascript.JSaddle.Value

Methods

makeArgs :: JSNull -> JSM [JSVal] Source #

ToJSVal arg => MakeArgs [arg] Source # 
Instance details

Defined in Language.Javascript.JSaddle.Arguments

Methods

makeArgs :: [arg] -> JSM [JSVal] Source #

MakeArgs arg => MakeArgs (JSM arg) Source # 
Instance details

Defined in Language.Javascript.JSaddle.Classes.Internal

Methods

makeArgs :: JSM arg -> JSM [JSVal] Source #

(ToJSVal arg1, ToJSVal arg2) => MakeArgs (arg1, arg2) Source # 
Instance details

Defined in Language.Javascript.JSaddle.Arguments

Methods

makeArgs :: (arg1, arg2) -> JSM [JSVal] Source #

(ToJSVal arg1, ToJSVal arg2, ToJSVal arg3) => MakeArgs (arg1, arg2, arg3) Source # 
Instance details

Defined in Language.Javascript.JSaddle.Arguments

Methods

makeArgs :: (arg1, arg2, arg3) -> JSM [JSVal] Source #

(ToJSVal arg1, ToJSVal arg2, ToJSVal arg3, ToJSVal arg4) => MakeArgs (arg1, arg2, arg3, arg4) Source # 
Instance details

Defined in Language.Javascript.JSaddle.Arguments

Methods

makeArgs :: (arg1, arg2, arg3, arg4) -> JSM [JSVal] Source #

(ToJSVal arg1, ToJSVal arg2, ToJSVal arg3, ToJSVal arg4, ToJSVal arg5) => MakeArgs (arg1, arg2, arg3, arg4, arg5) Source # 
Instance details

Defined in Language.Javascript.JSaddle.Arguments

Methods

makeArgs :: (arg1, arg2, arg3, arg4, arg5) -> JSM [JSVal] Source #

(ToJSVal arg1, ToJSVal arg2, ToJSVal arg3, ToJSVal arg4, ToJSVal arg5, ToJSVal arg6) => MakeArgs (arg1, arg2, arg3, arg4, arg5, arg6) Source # 
Instance details

Defined in Language.Javascript.JSaddle.Arguments

Methods

makeArgs :: (arg1, arg2, arg3, arg4, arg5, arg6) -> JSM [JSVal] Source #