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.
- class MakeValueRef a where
- makeValueRef :: a -> JSM JSValueRef
- class MakeStringRef a where
- makeStringRef :: a -> JSStringRef
- class MakeArgRefs this where
- makeArgRefs :: this -> JSM [JSValueRef]
- class MakeObjectRef this where
- makeObjectRef :: this -> JSM JSObjectRef
- class MakePropRef this where
- makePropRef :: this -> JSM JSPropRef
Type classes to convert Haskell data to JavaScript
class MakeValueRef a where Source
Anything that can be used to make a JavaScript value reference
makeValueRef :: a -> JSM JSValueRef Source
MakeValueRef JSValue Source | Makes a JavaScript value from a |
MakeValueRef JSNull Source | Makes a |
class MakeStringRef a where Source
Anything that can be used to make a JavaScript string reference
makeStringRef :: a -> JSStringRef Source
class MakeArgRefs this where Source
Anything that can be used to make a list of JavaScript value references for use as function arguments
makeArgRefs :: this -> JSM [JSValueRef] Source
MakeArgRefs JSValue Source | Makes an argument list with just a single JavaScript value from a |
MakeArgRefs JSNull Source | Makes an argument list with just a single |
class MakeObjectRef this where Source
Anything that can be used to make a JavaScript object reference
makeObjectRef :: this -> JSM JSObjectRef Source
class MakePropRef this where Source
Anything that can be used to make a JavaScript property reference
makePropRef :: this -> JSM JSPropRef Source