yesod-0.9.4.1: Creation of type-safe, RESTful web applications.

Yesod

Contents

- Re-exports from yesod-core
- Running your application
- Commonly referenced functions/datatypes
- Utilities
- Hamlet library
  - Hamlet
  - Julius
  - Cassius/Lucius

Description

This module simply re-exports from other modules for your convenience.

Synopsis

- module Yesod.Core
- module Yesod.Form
- module Yesod.Json
- module Yesod.Persist
- warp :: (Yesod a, YesodDispatch a a) => Int -> a -> IO ()
- warpDebug :: (Yesod a, YesodDispatch a a) => Int -> a -> IO ()
- develServer :: Int -> String -> String -> IO ()
- type Application = Request -> Iteratee ByteString IO Response
- lift :: MonadTrans t => forall m a. Monad m => m a -> t m a
- liftIO :: MonadIO m => forall a. IO a -> m a
- class MonadBase b m => MonadBaseControl b m | m -> b
- showIntegral :: Integral a => a -> String
- readIntegral :: Num a => String -> Maybe a
- hamlet :: QuasiQuoter
- xhamlet :: QuasiQuoter
- type HtmlUrl url = Render url -> Html
- type Html = HtmlM ()
- toHtml :: ToHtml a => a -> Html
- julius :: QuasiQuoter
- type JavascriptUrl url = (url -> [(Text, Text)] -> Text) -> Javascript
- renderJavascriptUrl :: (url -> [(Text, Text)] -> Text) -> JavascriptUrl url -> Text
- cassius :: QuasiQuoter
- lucius :: QuasiQuoter
- type CssUrl url = (url -> [(Text, Text)] -> Text) -> Css
- renderCssUrl :: (url -> [(Text, Text)] -> Text) -> CssUrl url -> Text

# Re-exports from yesod-core

module Yesod.Core

module Yesod.Form

module Yesod.Json

module Yesod.Persist

# Running your application

warp :: (Yesod a, YesodDispatch a a) => Int -> a -> IO ()

A convenience method to run an application using the Warp webserver on the specified port. Automatically calls `toWaiApp`.

warpDebug :: (Yesod a, YesodDispatch a a) => Int -> a -> IO ()

Same as `warp`, but also sends a message to stdout for each request, and an "application launched" message as well. Can be useful for development.

develServer

Arguments

:: Int | port number
-> String | module name holding the code
-> String | name of function providing a with-application
-> IO () |

Run a development server, where your code changes are automatically reloaded.

# Commonly referenced functions/datatypes

type Application = Request -> Iteratee ByteString IO Response

lift :: MonadTrans t => forall m a. Monad m => m a -> t m a

liftIO :: MonadIO m => forall a. IO a -> m a

class MonadBase b m => MonadBaseControl b m | m -> b

Instances

MonadBaseControl [] [] |
MonadBaseControl IO IO |
MonadBaseControl Maybe Maybe |
MonadBaseControl STM STM |
MonadBaseControl Identity Identity |
MonadBaseControl b m => MonadBaseControl b (SqlPersist m) |
MonadBaseControl b m => MonadBaseControl b (MaybeT m) |
MonadBaseControl b m => MonadBaseControl b (ListT m) |
MonadBaseControl b m => MonadBaseControl b (IdentityT m) |
MonadBaseControl b m => MonadBaseControl b (GGWidget master m) |
(Monoid w, MonadBaseControl b m) => MonadBaseControl b (WriterT w m) |
(Monoid w, MonadBaseControl b m) => MonadBaseControl b (WriterT w m) |
MonadBaseControl b m => MonadBaseControl b (StateT s m) |
MonadBaseControl b m => MonadBaseControl b (StateT s m) |
MonadBaseControl b m => MonadBaseControl b (ReaderT r m) |
(Error e, MonadBaseControl b m) => MonadBaseControl b (ErrorT e m) |
(Monoid w, MonadBaseControl b m) => MonadBaseControl b (RWST r w s m) |
(Monoid w, MonadBaseControl b m) => MonadBaseControl b (RWST r w s m) |
MonadBaseControl ((->) r) ((->) r) |
MonadBaseControl (Either e) (Either e) |
MonadBaseControl (ST s) (ST s) |
MonadBaseControl (ST s) (ST s) |

# Utilities

showIntegral :: Integral a => a -> String

readIntegral :: Num a => String -> Maybe a

# Hamlet library

## Hamlet

hamlet :: QuasiQuoter

xhamlet :: QuasiQuoter

type HtmlUrl url = Render url -> Html

A function generating an `Html` given a URL-rendering function.

type Html = HtmlM ()

Simplification of the `HtmlM` datatype.

toHtml :: ToHtml a => a -> Html

Convert a value to HTML.

## Julius

julius :: QuasiQuoter

type JavascriptUrl url = (url -> [(Text, Text)] -> Text) -> Javascript

renderJavascriptUrl :: (url -> [(Text, Text)] -> Text) -> JavascriptUrl url -> Text

## Cassius/Lucius

cassius :: QuasiQuoter

lucius :: QuasiQuoter

    >>> renderLucius undefined [lucius|foo{bar:baz}|]
    "foo{bar:baz}"

type CssUrl url = (url -> [(Text, Text)] -> Text) -> Css

renderCssUrl :: (url -> [(Text, Text)] -> Text) -> CssUrl url -> Text