yesod-fay-0.2.0.1: Utilities for using the Fay Haskell-to-JS compiler with Yesod.

Safe HaskellNone

Language.Fay.Yesod

Description

Module to be shared between server and client.

This module must be valid for both GHC and Fay.

Synopsis

Documentation

data Returns a Source

A proxy type for specifying what type a command should return. The final field for each data constructor in a command datatype should be Returns.

Constructors

Returns 

Instances

callSource

Arguments

:: (Foreign a, Foreign command) 
=> (Returns a -> command) 
-> (a -> Fay ())

Success Handler

-> Fay () 

Call a command.

callWithErrorHandlingSource

Arguments

:: (Foreign a, Foreign command) 
=> (Returns a -> command) 
-> (a -> Fay ())

Success Handler

-> Fay ()

Failure Handler

-> Fay () 

ajaxCommandSource

Arguments

:: (Foreign a, Foreign command) 
=> command 
-> (a -> Fay ())

Success Handler

-> Fay () 

Run the AJAX command.

ajaxCommandWithErrorHandlingSource

Arguments

:: (Foreign a, Foreign command) 
=> command 
-> (a -> Fay ())

Success Handler

-> Fay ()

Failure Handler

-> Fay () 

Run the AJAX command, handling errors as well