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

Safe HaskellNone
LanguageHaskell2010

Language.Javascript.JSaddle.Classes

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 ToJSVal a where Source #

Anything that can be used to make a JavaScript value reference

Minimal complete definition

toJSVal

Methods

toJSVal :: a -> JSM JSVal Source #

Instances

ToJSVal Object Source # 
ToJSVal JSValue Source #

Makes a JavaScript value from a JSValue ADT.

ToJSVal JSNull Source #

Makes a null JavaScript value

ToJSVal Function Source # 

class ToJSVal a => ToJSString a where Source #

Anything that can be used to make a JavaScript string reference

Minimal complete definition

toJSString

Methods

toJSString :: a -> JSString Source #

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