Minor code fixes and massive TODO update
This commit is contained in:
parent
ee64c7e894
commit
0fcfa1b9d8
16
TODO
16
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.
|
||||
|
||||
4
Yesod.hs
4
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
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
-- Stability : Stable
|
||||
-- Portability : portable
|
||||
--
|
||||
-- Constants used throughout Restful.
|
||||
-- Constants used throughout Yesod.
|
||||
--
|
||||
---------------------------------------------------------
|
||||
module Yesod.Constants
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
---------------------------------------------------------
|
||||
--
|
||||
-- Module : Yesod.Response.AtomFeed
|
||||
-- Module : Yesod.Helpers.AtomFeed
|
||||
-- Copyright : Michael Snoyman
|
||||
-- License : BSD3
|
||||
--
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
---------------------------------------------------------
|
||||
--
|
||||
-- Module : Yesod.Response.AtomFeed
|
||||
-- Module : Yesod.Helpers.Sitemap
|
||||
-- Copyright : Michael Snoyman
|
||||
-- License : BSD3
|
||||
--
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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 "/"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user