Skip to content

Commit

Permalink
Fixed Yesod.Static
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Mar 14, 2013
1 parent 44a01d7 commit 2d93157
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions yesod-static/Yesod/Static.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
---------------------------------------------------------
--
-- | Serve static files from a Yesod app.
Expand Down Expand Up @@ -69,7 +70,6 @@ import qualified Data.Serialize
import Data.Text (Text, pack)
import qualified Data.Map as M
import Data.IORef (readIORef, newIORef, writeIORef)
import Network.Wai (pathInfo)
import Data.Char (isLower, isDigit)
import Data.List (foldl')
import qualified Data.ByteString as S
Expand Down Expand Up @@ -144,10 +144,10 @@ instance RenderRoute Static where
renderRoute (StaticRoute x y) = (x, y)

instance YesodSubDispatch Static m where
yesodSubDispatch _run getSub _toMaster env req =
yesodSubDispatch YesodSubRunnerEnv {..} req =
staticApp set req
where
Static set = getSub $ yreSite env
Static set = ysreGetSub $ yreSite $ ysreParentEnv

notHidden :: Prelude.FilePath -> Bool
notHidden "tmp" = False
Expand Down
1 change: 0 additions & 1 deletion yesod-static/sample.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{-# LANGUAGE QuasiQuotes, TypeFamilies, MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
import Yesod.Static
import Yesod.Dispatch
import Yesod.Core
import Network.Wai.Handler.Warp (run)
import Network.Wai.Application.Static
Expand Down

0 comments on commit 2d93157

Please sign in to comment.