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

Yesod

Contents

Description

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

Synopsis

Re-exports from yesod-core

module Yesod.Core

module Yesod.Form

module Yesod.Json

Running your application

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

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 ()Source

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

develServerSource

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

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

Lift a computation from the argument monad to the constructed monad.

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

Lift a computation from the IO monad.

class MonadIO m => MonadPeelIO m

MonadPeelIO is the class of IO-based monads supporting an extra operation peelIO, enabling control operations on IO to be lifted into the monad.

Utilities

Hamlet library

Hamlet

xhamlet :: QuasiQuoter

Calls hamletWithSettings using XHTML 1.0 Strict settings.

type Hamlet url = (url -> [(String, String)] -> String) -> Html

An function generating an Html given a URL-rendering function.

type Html = HtmlM ()

Simplification of the HtmlM datatype.

renderHamlet :: (url -> [(String, String)] -> String) -> Hamlet url -> ByteString

Converts a Hamlet to lazy bytestring.

renderHtml

Arguments

:: Html

HTML to render

-> ByteString

Resulting ByteString

Render HTML to a lazy UTF-8 encoded 'L.ByteString.'

string

Arguments

:: String

String to insert.

-> Html

Resulting HTML fragment.

Create an HTML snippet from a String.

preEscapedString

Arguments

:: String

String to insert.

-> Html

Resulting HTML fragment.

Create an HTML snippet from a String without escaping

cdata :: Html -> Html

Wrap an Html for embedding in an XML file.

Julius

type Julius url = (url -> [(String, String)] -> String) -> Javascript

renderJulius :: (url -> [(String, String)] -> String) -> Julius url -> Text

Cassius

type Cassius url = (url -> [(String, String)] -> String) -> Css

renderCassius :: (url -> [(String, String)] -> String) -> Cassius url -> Text