fay-0.1.1.0: A compiler for Fay, a Haskell subset that compiles to JavaScript.

Safe HaskellSafe-Infered

Language.Fay.FFI

Synopsis

Documentation

data JsPtr a Source

Instances

Foreign (JsPtr a)

Pointers to arbitrary objects are OK.

class Foreign a Source

Contains allowed foreign function types.

Instances

Foreign Bool

Bools are OK.

Foreign Char

Characters are OK.

Foreign Double

All numbers in JS are double.

Foreign ()

Unit is OK.

Foreign a => Foreign [a]

Lists → arrays are OK.

Foreign a => Foreign (Fay a)

JS values are foreignable.

Foreign (JsPtr a)

Pointers to arbitrary objects are OK.

(Foreign a, Foreign b) => Foreign (a -> b)

Functions are foreignable.

foreignFaySource

Arguments

:: Foreign a 
=> String

The foreign function name.

-> String

JS return type.

-> a

Bottom.

Declare a foreign action.

foreignPureSource

Arguments

:: Foreign a 
=> String

The foreign function name.

-> String

JS return type.

-> a

Bottom.

Declare a foreign function.

foreignMethodFaySource

Arguments

:: Foreign a 
=> String

The foreign function name.

-> String

JS return type.

-> a

Bottom.

Declare a foreign action.

foreignMethodSource

Arguments

:: Foreign a 
=> String

The foreign function name.

-> String

JS return type.

-> a

Bottom.

Declare a foreign function.