Minor code fixes and massive TODO update

This commit is contained in:
Michael Snoyman 2009-12-11 00:35:31 +02:00
parent ee64c7e894
commit 0fcfa1b9d8
8 changed files with 26 additions and 24 deletions

16
TODO
View File

@ -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.

View File

@ -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

View File

@ -8,7 +8,7 @@
-- Stability : Stable
-- Portability : portable
--
-- Constants used throughout Restful.
-- Constants used throughout Yesod.
--
---------------------------------------------------------
module Yesod.Constants

View File

@ -2,7 +2,7 @@
{-# LANGUAGE MultiParamTypeClasses #-}
---------------------------------------------------------
--
-- Module : Yesod.Response.AtomFeed
-- Module : Yesod.Helpers.AtomFeed
-- Copyright : Michael Snoyman
-- License : BSD3
--

View File

@ -2,7 +2,7 @@
{-# LANGUAGE MultiParamTypeClasses #-}
---------------------------------------------------------
--
-- Module : Yesod.Response.AtomFeed
-- Module : Yesod.Helpers.Sitemap
-- Copyright : Michael Snoyman
-- License : BSD3
--

View File

@ -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

View File

@ -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.

View File

@ -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 "/"