From 95047029f876205a68ac425f3ed2644f45a77386 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 30 Jun 2010 21:55:23 +0300 Subject: [PATCH] Some documentation updates Next target for cleanup: Yesod.Form, Yesod.Formable and Yesod.Helpers.Crud. --- Yesod/Json.hs | 4 ++-- Yesod/Request.hs | 4 +++- Yesod/Yesod.hs | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Yesod/Json.hs b/Yesod/Json.hs index e54631b7..1a12518b 100644 --- a/Yesod/Json.hs +++ b/Yesod/Json.hs @@ -35,8 +35,8 @@ import Yesod.Content #endif -- | A monad for generating Json output. In truth, it is just a newtype wrapper --- around 'Hamlet'; we thereby get the benefits of Hamlet (interleaving IO and --- enumerator output) without accidently mixing non-JSON content. +-- around 'Html'; we thereby get the benefits of BlazeHtml (type safety and +-- speed) without accidently mixing non-JSON content. -- -- This is an opaque type to avoid any possible insertion of non-JSON content. -- Due to the limited nature of the JSON format, you can create any valid JSON diff --git a/Yesod/Request.hs b/Yesod/Request.hs index f69c0a67..6171289c 100644 --- a/Yesod/Request.hs +++ b/Yesod/Request.hs @@ -63,12 +63,14 @@ instance RequestReader ((->) Request) where -- | Get the list of supported languages supplied by the user. -- -- Languages are determined based on the following three (in descending order --- of preference: +-- of preference): -- -- * The _LANG get parameter. -- -- * The _LANG cookie. -- +-- * The _LANG user session variable. +-- -- * Accept-Language HTTP header. -- -- This is handled by the parseWaiRequest function in Yesod.Dispatch (not diff --git a/Yesod/Yesod.hs b/Yesod/Yesod.hs index 381df617..d42230a5 100644 --- a/Yesod/Yesod.hs +++ b/Yesod/Yesod.hs @@ -41,6 +41,8 @@ class YesodSite y where getSite :: Site (Routes y) (Method -> Maybe (Handler y ChooseRep)) type Method = String +-- | Same as 'YesodSite', but for subsites. Once again, users should not need +-- to deal with it directly, as the mkYesodSub creates instances appropriately. class YesodSubSite s y where getSubSite :: Site (Routes s) (Method -> Maybe (GHandler s y ChooseRep))