packages feed

wai-handler-devel 1.3.0.2 → 1.3.0.3

raw patch · 3 files changed

+29/−8 lines, 3 filesdep +time

Dependencies added: time

Files

Network/Wai/Handler/DevelServer.hs view
@@ -25,14 +25,14 @@ import Control.Monad import Control.Concurrent.MVar -import System.Directory (getModificationTime) import qualified Network.Wai.Handler.Warp as Warp import Network.Wai.Application.Devel import Network.Wai.Middleware.RequestLogger (logStdoutDev)  import Data.List (nub, group, sort)-import System.Time (ClockTime) +import Network.Wai.Handler.DevelServer.Compat+ type FunctionName = String  runNoWatch :: Int -> ModuleName -> FunctionName@@ -98,8 +98,8 @@     void x = x >> return () -} -getTimes :: [FilePath] -> IO [ClockTime]-getTimes = E.handle (constSE $ return []) . mapM getModificationTime+getTimes :: [FilePath] -> IO [TimeStamp]+getTimes = E.handle (constSE $ return []) . mapM getTimeStamp  constSE :: x -> SomeException -> x constSE = const@@ -129,7 +129,7 @@        -> Maybe SomeException        -> AppHolder        -> [IO ()]-       -> IO (Maybe SomeException, [(FilePath, ClockTime)])+       -> IO (Maybe SomeException, [(FilePath, TimeStamp)]) reload modu func extras prevError ah actions = do     case prevError of          Nothing -> putStrLn "Attempting to interpret your app..."
+ Network/Wai/Handler/DevelServer/Compat.hs view
@@ -0,0 +1,19 @@+{-# LANGUAGE CPP #-}+module Network.Wai.Handler.DevelServer.Compat (+  TimeStamp+, getTimeStamp+) where++import System.Directory (getModificationTime)++#if MIN_VERSION_directory(1,2,0)+import Data.Time.Clock (UTCTime)+newtype TimeStamp = TimeStamp UTCTime+#else+import System.Time (ClockTime)+newtype TimeStamp = TimeStamp ClockTime+#endif+  deriving Eq++getTimeStamp :: FilePath -> IO TimeStamp+getTimeStamp = fmap TimeStamp . getModificationTime
wai-handler-devel.cabal view
@@ -1,5 +1,5 @@ Name:                wai-handler-devel-Version:             1.3.0.2+Version:             1.3.0.3 Synopsis:            WAI server that automatically reloads code after modification. Description:         This handler automatically reloads your source code upon any changes. It works by using the hint package, essentially embedding GHC inside the handler. The handler (both the executable and library) takes three arguments: the port to listen on, the module name containing the application function, and the name of the function.                      .@@ -32,18 +32,20 @@                    , hint                  >= 0.3.2.3       && < 0.4                    , text                  >= 0.7                    , old-time+                   , time                    , transformers          >= 0.2.2                    , attoparsec            >= 0.10   Exposed-modules:   Network.Wai.Handler.DevelServer                      Network.Wai.Application.Devel+  Other-modules:     Network.Wai.Handler.DevelServer.Compat   ghc-options:       -Wall  Executable           wai-handler-devel   Build-Depends:     cmdargs >= 0.4-  ghc-options:       -Wall -O2 -threaded+  ghc-options:       -Wall -threaded   main-is:           wai-handler-devel.hs  Executable           wai-handler-devel-unwatched   Build-Depends:     cmdargs >= 0.4-  ghc-options:       -Wall -O2 -threaded+  ghc-options:       -Wall -threaded   main-is:           wai-handler-devel-unwatched.hs