diff --git a/Yesod.hs b/Yesod.hs index a0da8aef..dd7360bc 100644 --- a/Yesod.hs +++ b/Yesod.hs @@ -8,6 +8,9 @@ module Yesod , module Yesod.Handler , module Yesod.Dispatch , module Yesod.Widget + , module Yesod.Form + , module Yesod.Json + , module Yesod.Persist -- * Running your application , warp , warpDebug @@ -50,7 +53,11 @@ import Text.Julius import Yesod.Request import Yesod.Widget +import Yesod.Form +import Yesod.Json +import Yesod.Persist import Network.Wai (Application) +import Network.Wai.Middleware.Debug import qualified Network.Wai as W import Control.Monad.Trans.Class (lift) import Control.Monad.IO.Class (liftIO) @@ -78,12 +85,4 @@ warp port a = toWaiApp a >>= run port warpDebug :: (Yesod a, YesodSite a) => Int -> a -> IO () warpDebug port a = do hPutStrLn stderr $ "Application launched, listening on port " ++ show port - toWaiApp a >>= run port . debugMiddleware - where - debugMiddleware app req = do - hPutStrLn stderr $ concat - [ show $ W.requestMethod req - , " " - , show $ W.pathInfo req - ] - app req + toWaiApp a >>= run port . debug diff --git a/yesod.cabal b/yesod.cabal index acaa9e48..78b8f4e5 100644 --- a/yesod.cabal +++ b/yesod.cabal @@ -23,11 +23,18 @@ flag test library build-depends: base >= 4 && < 5 , yesod-core >= 0.7 && < 0.8 + , yesod-auth >= 0.3 && < 0.4 + , yesod-form >= 0.0 && < 0.1 + , yesod-json >= 0.0 && < 0.1 + , yesod-persistent >= 0.0 && < 0.1 + , yesod-static >= 0.0 && < 0.1 , monad-peel >= 0.1 && < 0.2 , transformers >= 0.2 && < 0.3 , wai >= 0.3 && < 0.4 , hamlet >= 0.7 && < 0.8 , warp >= 0.3 && < 0.4 + , mime-mail >= 0.1 && < 0.2 + , hjsmin >= 0.0.5 && < 0.1 exposed-modules: Yesod ghc-options: -Wall