yesod-fay-0.4.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

:: (Returns a -> command) 
-> (a -> Fay ())

Success Handler

-> Fay () 

Call a command.

callWithErrorHandlingSource

Arguments

:: (Returns a -> command) 
-> (a -> Fay ())

Success Handler

-> Fay ()

Failure Handler

-> Fay () 

ajaxCommandSource

Arguments

:: Automatic command 
-> (Automatic a -> Fay ())

Success Handler

-> Fay () 

Run the AJAX command.

ajaxCommandWithErrorHandlingSource

Arguments

:: Automatic command 
-> (Automatic a -> Fay ())

Success Handler

-> Fay ()

Failure Handler

-> Fay () 

Run the AJAX command, handling errors as well