packages feed

snap-loader-dynamic 0.10.0.4 → 1.0.0.0

raw patch · 4 files changed

+28/−26 lines, 4 filesdep ~directorydep ~hintdep ~snap-corePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: directory, hint, snap-core, template-haskell, time

API changes (from Hackage documentation)

Files

README.md view
@@ -1,11 +1,12 @@ Snap Framework ============== -Snap is a web framework for Haskell, based on iteratee I/O (as [popularized by-Oleg Kiselyov](http://okmij.org/ftp/Streams.html#iteratee)).  For more-information about Snap, read the `README.SNAP.md` or visit the Snap project-website at http://www.snapframework.com/.+[![Build Status](https://travis-ci.org/snapframework/snap-loader-dynamic.svg?branch=master)](https://travis-ci.org/snapframework/snap-loader-dynamic) +Snap is a simple and fast web development framework and server written in+Haskell.  For more information about Snap, read the `README.SNAP.md` or visit+the Snap project website at http://www.snapframework.com/.+ ## Library contents  This is utility project for the Snap Framework, which contains a@@ -29,4 +30,3 @@ The haddock documentation can be built using 'cabal haddock'.  The docs get put in `dist/doc/html/`.-
snap-loader-dynamic.cabal view
@@ -1,7 +1,7 @@ name:           snap-loader-dynamic-version:        0.10.0.4-synopsis:       Snap: A Haskell Web Framework: dynamic loader-description:    Snap Framework dynamic loader+version:        1.0.0.0+synopsis:       Snap dynamic loader+description:    Snap Framework dynamic code loader for development mode license:        BSD3 license-file:   LICENSE author:         Carl Howells@@ -32,13 +32,13 @@     base              >= 4       && < 5,     directory-tree    >= 0.10    && < 0.13,     mtl               >  2.0     && < 2.3,-    snap-core         >= 0.9     && < 0.10,-    time              >= 1.1     && < 1.6,-    template-haskell  >= 2.2     && < 2.11+    snap-core         >= 1.0     && < 1.1,+    time              >= 1.1     && < 1.7,+    template-haskell  >= 2.2     && < 2.12    if impl(ghc >= 7.2.0)     build-depends:-      hint              >= 0.3.3.1 && < 0.6+      hint              >= 0.3.3.1 && < 0.7   else     build-depends:       hint              >= 0.3.3.1 && < 0.3.3.5@@ -58,10 +58,10 @@   extensions: CPP    if impl(ghc >= 6.12.0)-    ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2+    ghc-options: -Wall -fwarn-tabs -funbox-strict-fields                  -fno-warn-orphans -fno-warn-unused-do-bind   else-    ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2+    ghc-options: -Wall -fwarn-tabs -funbox-strict-fields                  -fno-warn-orphans  source-repository head
src/Snap/Loader/Dynamic.hs view
@@ -13,7 +13,9 @@ ------------------------------------------------------------------------------ import           Control.Concurrent import           Control.Monad (liftM2, forever)+#if !MIN_VERSION_base(4,7,0) import           Data.Char (isAlphaNum)+#endif import           Data.List import           Data.Maybe (maybeToList) import           Data.Time.Clock (diffUTCTime, getCurrentTime)@@ -161,8 +163,9 @@      --------------------------------------------------------------------------     dropInternal s = case stripPrefix "Snap.Internal." s of-        Nothing -> s-        Just x  -> "Snap." ++ x+        Nothing      -> s+        Just "Types" -> "Snap.Core"+        Just x       -> "Snap." ++ x #else     --------------------------------------------------------------------------     -- This is somewhat fragile, and probably can be cleaned up with a future
src/Snap/Loader/Dynamic/Evaluator.hs view
@@ -6,12 +6,11 @@   ) where  -------------------------------------------------------------------------------import Control.Exception+import qualified Control.Exception as Ex import Control.Monad (when) import Control.Monad.Trans (liftIO) import Control.Concurrent (ThreadId, forkIO, myThreadId) import Control.Concurrent.MVar-import Prelude hiding (catch, init, any) import Snap.Core (Snap)  @@ -75,7 +74,7 @@                     -- previous state, if there was any, and then begin                     -- evaluation of the new code and state.                     when (null readers) $ do-                        let runAndFill = mask $ \unmask -> do+                        let runAndFill = Ex.mask $ \unmask -> do                                 -- run the cleanup action                                 previous <- readMVar resultContainer                                 unmask $ cleanup previous@@ -89,11 +88,11 @@                                 clearAndNotify unmask (Right res)                                                (flip putMVar a . snd) -                            killWaiting :: SomeException -> IO ()-                            killWaiting e = mask $ \unmask -> do+                            killWaiting :: Ex.SomeException -> IO ()+                            killWaiting e = Ex.mask $ \unmask -> do                                 clearAndNotify unmask (Left e)-                                               (flip throwTo e . fst)-                                throwIO e+                                               (flip Ex.throwTo e . fst)+                                Ex.throwIO e                              clearAndNotify unmask r f = do                                 a <- unmask start@@ -101,7 +100,7 @@                                 allReaders <- swapMVar readerContainer []                                 mapM_ f allReaders -                        _ <- forkIO $ runAndFill `catch` killWaiting+                        _ <- forkIO $ runAndFill `Ex.catch` killWaiting                         return ()                      -- Wait for the evaluation of the action to complete,@@ -116,7 +115,7 @@                     valid <- test a                     case (valid, res) of                         (True, Right (x, _)) -> return x-                        (True, Left e)       -> throwIO e+                        (True, Left e)       -> Ex.throwIO e                         (False, _)           -> waitForNewResult                 Nothing -> waitForNewResult             getResult@@ -133,7 +132,7 @@     newReaderContainer :: IO (MVar [(ThreadId, MVar (Snap ()))])     newReaderContainer = newMVar [] -    newResultContainer :: IO (MVar (Maybe (Either SomeException+    newResultContainer :: IO (MVar (Maybe (Either Ex.SomeException                                                   (Snap (), IO ()), a)))     newResultContainer = newMVar Nothing