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