Do not expose SubsiteGetter, fix a number of warnings
This commit is contained in:
parent
3a92c46787
commit
7cf5609009
@ -62,7 +62,7 @@ import Control.Monad
|
||||
import Data.Maybe
|
||||
import Web.ClientSession
|
||||
import qualified Web.ClientSession as CS
|
||||
import Data.Char (isLower, isUpper)
|
||||
import Data.Char (isUpper)
|
||||
|
||||
import Data.Serialize
|
||||
import qualified Data.Serialize as Ser
|
||||
@ -183,14 +183,10 @@ isStatic :: Piece -> Bool
|
||||
isStatic StaticPiece{} = True
|
||||
isStatic _ = False
|
||||
|
||||
fromStatic :: Piece -> String
|
||||
fromStatic (StaticPiece s) = s
|
||||
fromStatic _ = error "fromStatic"
|
||||
|
||||
thResourceFromResource :: Type -> Resource -> Q THResource
|
||||
thResourceFromResource _ (Resource n ps atts)
|
||||
| all (all isUpper) atts = return (n, Simple ps atts)
|
||||
thResourceFromResource master (Resource n ps atts@[stype, toSubArg])
|
||||
thResourceFromResource master (Resource n ps [stype, toSubArg])
|
||||
-- static route to subsite
|
||||
= do
|
||||
let stype' = ConT $ mkName stype
|
||||
|
||||
@ -77,7 +77,7 @@ module Yesod.Handler
|
||||
-- * Internal Yesod
|
||||
, runHandler
|
||||
, YesodApp (..)
|
||||
, SubsiteGetter(..)
|
||||
, runSubsiteGetter
|
||||
, toMasterHandler
|
||||
, toMasterHandlerDyn
|
||||
, toMasterHandlerMaybe
|
||||
@ -183,9 +183,9 @@ class SubsiteGetter g m s | g -> s where
|
||||
|
||||
instance (master ~ master'
|
||||
) => SubsiteGetter (master -> sub) (GHandler anySub master') sub where
|
||||
runSubsiteGetter get = do
|
||||
runSubsiteGetter getter = do
|
||||
y <- getYesod
|
||||
return $ get y
|
||||
return $ getter y
|
||||
|
||||
instance (anySub ~ anySub'
|
||||
,master ~ master'
|
||||
|
||||
@ -31,6 +31,9 @@ module Yesod.Helpers.Static
|
||||
-- * Lookup files in filesystem
|
||||
, fileLookupDir
|
||||
, staticFiles
|
||||
-- * Embed files
|
||||
, mkEmbedFiles
|
||||
, getStaticHandler
|
||||
-- * Hashing
|
||||
, base64md5
|
||||
#if TEST
|
||||
|
||||
Loading…
Reference in New Issue
Block a user