Some documentation updates
Next target for cleanup: Yesod.Form, Yesod.Formable and Yesod.Helpers.Crud.
This commit is contained in:
parent
ea48760294
commit
95047029f8
@ -35,8 +35,8 @@ import Yesod.Content
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
-- | A monad for generating Json output. In truth, it is just a newtype wrapper
|
-- | 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
|
-- around 'Html'; we thereby get the benefits of BlazeHtml (type safety and
|
||||||
-- enumerator output) without accidently mixing non-JSON content.
|
-- speed) without accidently mixing non-JSON content.
|
||||||
--
|
--
|
||||||
-- This is an opaque type to avoid any possible insertion of 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
|
-- Due to the limited nature of the JSON format, you can create any valid JSON
|
||||||
|
|||||||
@ -63,12 +63,14 @@ instance RequestReader ((->) Request) where
|
|||||||
-- | Get the list of supported languages supplied by the user.
|
-- | Get the list of supported languages supplied by the user.
|
||||||
--
|
--
|
||||||
-- Languages are determined based on the following three (in descending order
|
-- Languages are determined based on the following three (in descending order
|
||||||
-- of preference:
|
-- of preference):
|
||||||
--
|
--
|
||||||
-- * The _LANG get parameter.
|
-- * The _LANG get parameter.
|
||||||
--
|
--
|
||||||
-- * The _LANG cookie.
|
-- * The _LANG cookie.
|
||||||
--
|
--
|
||||||
|
-- * The _LANG user session variable.
|
||||||
|
--
|
||||||
-- * Accept-Language HTTP header.
|
-- * Accept-Language HTTP header.
|
||||||
--
|
--
|
||||||
-- This is handled by the parseWaiRequest function in Yesod.Dispatch (not
|
-- This is handled by the parseWaiRequest function in Yesod.Dispatch (not
|
||||||
|
|||||||
@ -41,6 +41,8 @@ class YesodSite y where
|
|||||||
getSite :: Site (Routes y) (Method -> Maybe (Handler y ChooseRep))
|
getSite :: Site (Routes y) (Method -> Maybe (Handler y ChooseRep))
|
||||||
type Method = String
|
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
|
class YesodSubSite s y where
|
||||||
getSubSite :: Site (Routes s) (Method -> Maybe (GHandler s y ChooseRep))
|
getSubSite :: Site (Routes s) (Method -> Maybe (GHandler s y ChooseRep))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user