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




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


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.



:: 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 => MonadControlIO m

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


Hamlet library


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.


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

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


lucius :: QuasiQuoter

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

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

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