Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- class MakeObject this where
- makeObject :: this -> JSM Object
- class MakeArgs this where
Type classes to convert Haskell data to JavaScript
class MakeObject this where Source #
Anything that can be used to make a JavaScript object reference
makeObject :: this -> JSM Object Source #
Instances
MakeObject JSVal Source # | |
Defined in Language.Javascript.JSaddle.Value | |
MakeObject Object Source # | If we already have a Object we are fine |
Defined in Language.Javascript.JSaddle.Classes.Internal | |
MakeObject v => MakeObject (JSM v) Source # | Object can be made by evaluating a fnction in |
Defined in Language.Javascript.JSaddle.Object |
class MakeArgs this where Source #
Anything that can be used to make a list of JavaScript value references for use as function arguments
Instances
MakeArgs Bool Source # | Makes an argument list with just a single JavaScript boolean value |
MakeArgs Double Source # | Makes an argument list with just a single JavaScript number |
MakeArgs () Source # | This allows us to pass no arguments easily (altenative would be to use |
MakeArgs Text Source # | Makes an argument list with just a single JavaScript string |
MakeArgs Value Source # | Makes an argument list with just a single JSON value |
MakeArgs JSVal Source # | A single JSVal can be used as the argument list |
MakeArgs JSCallAsFunction Source # | |
Defined in Language.Javascript.JSaddle.Object | |
MakeArgs JSValue Source # | Makes an argument list with just a single JavaScript value from a |
MakeArgs JSNull Source # | Makes an argument list with just a single |
ToJSVal arg => MakeArgs [arg] Source # | |
MakeArgs arg => MakeArgs (JSM arg) Source # | |
(ToJSVal arg1, ToJSVal arg2) => MakeArgs (arg1, arg2) Source # | |
(ToJSVal arg1, ToJSVal arg2, ToJSVal arg3) => MakeArgs (arg1, arg2, arg3) Source # | |
(ToJSVal arg1, ToJSVal arg2, ToJSVal arg3, ToJSVal arg4) => MakeArgs (arg1, arg2, arg3, arg4) Source # | |
(ToJSVal arg1, ToJSVal arg2, ToJSVal arg3, ToJSVal arg4, ToJSVal arg5) => MakeArgs (arg1, arg2, arg3, arg4, arg5) Source # | |
(ToJSVal arg1, ToJSVal arg2, ToJSVal arg3, ToJSVal arg4, ToJSVal arg5, ToJSVal arg6) => MakeArgs (arg1, arg2, arg3, arg4, arg5, arg6) Source # | |