Merged Yesod.Constants into Yesod.Definitions

This commit is contained in:
Michael Snoyman 2010-01-25 00:33:38 +02:00
parent 254018e3c3
commit b784ef935a
5 changed files with 13 additions and 30 deletions

View File

@ -1,27 +0,0 @@
---------------------------------------------------------
--
-- Module : Yesod.Constants
-- Copyright : Michael Snoyman
-- License : BSD3
--
-- Maintainer : Michael Snoyman <michael@snoyman.com>
-- Stability : Stable
-- Portability : portable
--
-- Constants used throughout Yesod.
--
---------------------------------------------------------
module Yesod.Constants
( authCookieName
, authDisplayName
, encryptedCookies
) where
authCookieName :: String
authCookieName = "IDENTIFIER"
authDisplayName :: String
authDisplayName = "DISPLAY_NAME"
encryptedCookies :: [String]
encryptedCookies = [authDisplayName, authCookieName]

View File

@ -21,6 +21,10 @@ module Yesod.Definitions
, Language
, Location (..)
, showLocation
-- * Constant values
, authCookieName
, authDisplayName
, encryptedCookies
) where
import qualified Hack
@ -66,3 +70,12 @@ data Location = AbsLoc String | RelLoc String
showLocation :: Approot -> Location -> String
showLocation _ (AbsLoc s) = s
showLocation ar (RelLoc s) = ar ++ s
authCookieName :: String
authCookieName = "IDENTIFIER"
authDisplayName :: String
authDisplayName = "DISPLAY_NAME"
encryptedCookies :: [String]
encryptedCookies = [authDisplayName, authCookieName]

View File

@ -27,7 +27,6 @@ import qualified Web.Authenticate.Rpxnow as Rpxnow
import qualified Web.Authenticate.OpenId as OpenId
import Yesod
import Yesod.Constants
import Control.Monad.Attempt

View File

@ -10,7 +10,6 @@ import Yesod.Rep
import Data.Object.Html (toHtmlObject)
import Yesod.Response
import Yesod.Request
import Yesod.Constants
import Yesod.Definitions
import Yesod.Handler
import Yesod.Template (TemplateGroup)

View File

@ -55,7 +55,6 @@ library
failure >= 0.0.0 && < 0.1,
safe-failure >= 0.4.0 && < 0.5
exposed-modules: Yesod
Yesod.Constants
Yesod.Rep
Yesod.Request
Yesod.Response