Safe Haskell | None |
---|---|
Language | Haskell98 |
Module to be shared between server and client.
This module must be valid for both GHC and Fay.
Synopsis
- data Returns a = Returns
- call :: (Returns a -> command) -> (a -> Fay ()) -> Fay ()
- callWithErrorHandling :: (Returns a -> command) -> (a -> Fay ()) -> Fay () -> Fay ()
- ajaxCommand :: Automatic command -> (Automatic a -> Fay ()) -> Fay ()
- ajaxCommandWithErrorHandling :: Automatic command -> (Automatic a -> Fay ()) -> Fay () -> Fay ()
Documentation
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
.
Instances
Eq (Returns a) Source # | |
Data a => Data (Returns a) Source # | |
Defined in Fay.Yesod gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Returns a -> c (Returns a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Returns a) # toConstr :: Returns a -> Constr # dataTypeOf :: Returns a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Returns a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Returns a)) # gmapT :: (forall b. Data b => b -> b) -> Returns a -> Returns a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Returns a -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Returns a -> r # gmapQ :: (forall d. Data d => d -> u) -> Returns a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Returns a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Returns a -> m (Returns a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Returns a -> m (Returns a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Returns a -> m (Returns a) # | |
Read (Returns a) Source # | |
Show (Returns a) Source # | |
callWithErrorHandling Source #
:: (Returns a -> command) | |
-> (a -> Fay ()) | Success Handler |
-> Fay () | Failure Handler |
-> Fay () |
:: Automatic command | |
-> (Automatic a -> Fay ()) | Success Handler |
-> Fay () |
Run the AJAX command.
ajaxCommandWithErrorHandling Source #
:: Automatic command | |
-> (Automatic a -> Fay ()) | Success Handler |
-> Fay () | Failure Handler |
-> Fay () |
Run the AJAX command, handling errors as well