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

Safe HaskellNone
LanguageHaskell98

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

Eq (Returns a) 
Data a => Data (Returns a) 
Read (Returns a) 
Show (Returns a) 
Typeable (* -> *) Returns 

call Source

Arguments

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

Success Handler

-> Fay () 

Call a command.

callWithErrorHandling Source

Arguments

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

Success Handler

-> Fay ()

Failure Handler

-> Fay () 

ajaxCommand Source

Arguments

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

Success Handler

-> Fay () 

Run the AJAX command.

ajaxCommandWithErrorHandling Source

Arguments

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

Success Handler

-> Fay ()

Failure Handler

-> Fay () 

Run the AJAX command, handling errors as well