jsaddle-0.9.4.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 Object Source #

If we already have a Object we are fine

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 JSValue Source #

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

Methods

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

MakeArgs JSNull Source #

Makes an argument list with just a single null JavaScript value

Methods

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

MakeArgs arg => MakeArgs (JSM arg) Source # 

Methods

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