diff --git a/TODO b/TODO index 45fb01e7..bb7148d8 100644 --- a/TODO +++ b/TODO @@ -1 +1,17 @@ HTML sitemap generation +Cleanup Data.Object.Translate +Remove Data.Object.Instances (Web.Types?) +Possibly unify ResourceName and RestfulApp? +Expand Yesod.Definitions? +Cleanup Parameter stuff. Own module? Interface with formlets? +Merge MonadRequestReader class with other Handler stuff +SitemapLoc: what's the point again? +Authentication via e-mail address built in. (eaut.org) +OpenID 2 stuff (for direct Google login). +Simple model information (settings files, etc) in RestfulApp +Is there a mimetype package on hackage for Yesod.Helpers.Static? +The RepT stuff is hideous. +More than one type of objectResponse? +Native support for HStringTemplate. +Automatic HTML escaping, something smart for templates vs JSON. +Handler should be a better type, do something about ToHandler. diff --git a/Yesod.hs b/Yesod.hs index d8e46268..32272254 100644 --- a/Yesod.hs +++ b/Yesod.hs @@ -13,8 +13,7 @@ --------------------------------------------------------- module Yesod ( - module Data.Object - , module Yesod.Request + module Yesod.Request , module Yesod.Response , module Yesod.Application , module Yesod.Definitions @@ -23,7 +22,6 @@ module Yesod , Application ) where -import Data.Object import Yesod.Request import Yesod.Response import Yesod.Application diff --git a/Yesod/Constants.hs b/Yesod/Constants.hs index 09b7ad6d..3fe16922 100644 --- a/Yesod/Constants.hs +++ b/Yesod/Constants.hs @@ -8,7 +8,7 @@ -- Stability : Stable -- Portability : portable -- --- Constants used throughout Restful. +-- Constants used throughout Yesod. -- --------------------------------------------------------- module Yesod.Constants diff --git a/Yesod/Helpers/AtomFeed.hs b/Yesod/Helpers/AtomFeed.hs index 1690b800..77a35bc4 100644 --- a/Yesod/Helpers/AtomFeed.hs +++ b/Yesod/Helpers/AtomFeed.hs @@ -2,7 +2,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} --------------------------------------------------------- -- --- Module : Yesod.Response.AtomFeed +-- Module : Yesod.Helpers.AtomFeed -- Copyright : Michael Snoyman -- License : BSD3 -- diff --git a/Yesod/Helpers/Sitemap.hs b/Yesod/Helpers/Sitemap.hs index bf5a1340..bc1455a5 100644 --- a/Yesod/Helpers/Sitemap.hs +++ b/Yesod/Helpers/Sitemap.hs @@ -2,7 +2,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} --------------------------------------------------------- -- --- Module : Yesod.Response.AtomFeed +-- Module : Yesod.Helpers.Sitemap -- Copyright : Michael Snoyman -- License : BSD3 -- diff --git a/Yesod/Helpers/Static.hs b/Yesod/Helpers/Static.hs index 4468dea7..dd3d3066 100644 --- a/Yesod/Helpers/Static.hs +++ b/Yesod/Helpers/Static.hs @@ -10,7 +10,10 @@ -- Stability : Unstable -- Portability : portable -- --- Serve static files from a Restful app. +-- Serve static files from a Yesod app. +-- +-- This is most useful for standalone testing. When running on a production +-- server (like Apache), just let the server do the static serving. -- --------------------------------------------------------- module Yesod.Helpers.Static diff --git a/Yesod/Request.hs b/Yesod/Request.hs index 490611b6..496e6dda 100644 --- a/Yesod/Request.hs +++ b/Yesod/Request.hs @@ -39,7 +39,6 @@ module Yesod.Request , acceptedLanguages , requestPath , parseEnv - , approot -- * Building actual request , Request (..) , Hack.RequestMethod (..) @@ -189,21 +188,6 @@ maybeIdentifier = do parseEnv :: MonadRequestReader m => m Hack.Env parseEnv = rawEnv `fmap` askRawRequest --- | The URL to the application root (ie, the URL with pathInfo /). -approot :: MonadRequestReader m => m String -approot = do - env <- parseEnv - let (scheme, defPort) = - case Hack.hackUrlScheme env of - Hack.HTTP -> ("http://", 80) - Hack.HTTPS -> ("https://", 443) - let sn = Hack.serverName env - let portSuffix = - if Hack.serverPort env == defPort - then "" - else ':' : show (Hack.serverPort env) - return $! scheme ++ sn ++ portSuffix ++ "/" - -- | Determine the ordered list of language preferences. -- -- FIXME: Future versions should account for some cookie. diff --git a/Yesod/Resource.hs b/Yesod/Resource.hs index 04c0c746..05a90be7 100644 --- a/Yesod/Resource.hs +++ b/Yesod/Resource.hs @@ -14,7 +14,7 @@ -- Stability : Stable -- Portability : portable -- --- Defines the Resource class. +-- Defines the ResourceName class. -- --------------------------------------------------------- module Yesod.Resource @@ -65,6 +65,7 @@ isSlurp _ = False newtype ResourcePattern = ResourcePattern { unRP :: [ResourcePatternPiece] } deriving Eq +-- | FIXME not a good name for the function. Use convertible fromString :: String -> ResourcePattern fromString = ResourcePattern . map fromString' . filter (not . null) . splitOn "/"