snaplet-fay-0.3.3.14: Fay integration for Snap with request- and pre-compilation.

Safe HaskellNone
LanguageHaskell98

Snap.Snaplet.Fay

Synopsis

Documentation

data Fay Source #

Configuration

Instances

Show Fay Source # 

Methods

showsPrec :: Int -> Fay -> ShowS #

show :: Fay -> String #

showList :: [Fay] -> ShowS #

initFay :: SnapletInit b Fay Source #

Snaplet initialization

fayServe :: Handler b Fay () Source #

Serves the compiled Fay scripts using the chosen compile mode.

fayax :: (Data f1, Read f1, Data f2) => (f1 -> Handler h1 h2 f2) -> Handler h1 h2 () Source #

Send and receive JSON. | Automatically decodes a JSON request into a Fay record which is | passed to g. The handler g should then return a Fay record (of | a possibly separate type) which is encoded and passed back as a | JSON response. | If you only want to send JSON and handle input manually, use toFayax. | If you want to receive JSON and handle the response manually, use fromFayax

toFayax :: Data f2 => Handler h1 h2 f2 -> Handler h1 h2 () Source #

fayax only sending JSON.

fromFayax :: (Data f1, Read f1) => (f1 -> Handler h1 h2 ()) -> Handler h1 h2 () Source #

fayax only recieving JSON.