Remove orphans

This commit is contained in:
Michael Snoyman 2014-04-10 19:39:09 +03:00
parent e278bc65ca
commit 33206e8dc1
4 changed files with 4 additions and 22 deletions

View File

@ -22,8 +22,6 @@ import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize, flushLogStr)
import Network.Wai.Logger (clockDateCacher) import Network.Wai.Logger (clockDateCacher)
import Yesod.Core.Types (loggerSet, Logger (Logger)) import Yesod.Core.Types (loggerSet, Logger (Logger))
import qualified System.Random.MWC as MWC import qualified System.Random.MWC as MWC
import qualified Network.Wai as Wai
import Network.Wai.Middleware.MethodOverride (methodOverride)
import Data.BlobStore (fileStore) import Data.BlobStore (fileStore)
import Data.Hackage import Data.Hackage
@ -63,12 +61,9 @@ makeApplication conf = do
-- Create the WAI application and apply middlewares -- Create the WAI application and apply middlewares
app <- toWaiAppPlain foundation app <- toWaiAppPlain foundation
let logFunc = messageLoggerSource foundation (appLogger foundation) let logFunc = messageLoggerSource foundation (appLogger foundation)
middleware = logWare . defaultWAIMiddleware middleware = logWare . defaultMiddlewaresNoLogging
return (middleware app, logFunc) return (middleware app, logFunc)
defaultWAIMiddleware :: Wai.Middleware -- FIXME move upstream
defaultWAIMiddleware = methodOverride
-- | Loads up any necessary settings, creates your foundation datatype, and -- | Loads up any necessary settings, creates your foundation datatype, and
-- performs some initialization. -- performs some initialization.
makeFoundation :: AppConfig DefaultEnv Extra -> IO App makeFoundation :: AppConfig DefaultEnv Extra -> IO App
@ -90,7 +85,7 @@ makeFoundation conf = do
let updateLoop = do let updateLoop = do
threadDelay 1000000 threadDelay 1000000
updater updater
flushLogStr loggerSet' -- FIXME include upstream! flushLogStr loggerSet'
updateLoop updateLoop
_ <- forkIO updateLoop _ <- forkIO updateLoop

View File

@ -97,7 +97,3 @@ sourceHackageSdist name version = do
if exists if exists
then storeRead key then storeRead key
else return Nothing else return Nothing
-- FIXME orphan
instance MonadActive m => MonadActive (LoggingT m) where
monadActive = lift monadActive

View File

@ -163,12 +163,3 @@ extractCabal lbs name version =
, toPathPiece name , toPathPiece name
, ".cabal" , ".cabal"
] ]
-- FIXME orphan, move into yesod-core
instance MonadCatch m => MonadCatch (HandlerT site m) where
catch (HandlerT m) c = HandlerT $ \r -> m r `catch` \e -> unHandlerT (c e) r
mask a = HandlerT $ \e -> mask $ \u -> unHandlerT (a $ q u) e
where q u (HandlerT b) = HandlerT (u . b)
uninterruptibleMask a =
HandlerT $ \e -> uninterruptibleMask $ \u -> unHandlerT (a $ q u) e
where q u (HandlerT b) = HandlerT (u . b)

View File

@ -60,7 +60,7 @@ library
build-depends: base >= 4 && < 5 build-depends: base >= 4 && < 5
, yesod >= 1.2.5 && < 1.3 , yesod >= 1.2.5 && < 1.3
, yesod-core >= 1.2 && < 1.3 , yesod-core >= 1.2.12 && < 1.3
, yesod-auth >= 1.3 && < 1.4 , yesod-auth >= 1.3 && < 1.4
, yesod-static >= 1.2 && < 1.3 , yesod-static >= 1.2 && < 1.3
, yesod-form >= 1.3 && < 1.4 , yesod-form >= 1.3 && < 1.4
@ -81,7 +81,7 @@ library
, data-default , data-default
, aeson >= 0.6 && < 0.8 , aeson >= 0.6 && < 0.8
, conduit >= 1.0 && < 2.0 , conduit >= 1.0 && < 2.0
, monad-logger >= 0.3 && < 0.4 , monad-logger >= 0.3.6 && < 0.4
, fast-logger >= 2.1.4 && < 2.2 , fast-logger >= 2.1.4 && < 2.2
, wai >= 2.1 && < 2.2 , wai >= 2.1 && < 2.2
, wai-logger >= 2.1 && < 2.2 , wai-logger >= 2.1 && < 2.2