binarydefer 1.2 → 1.2.1
raw patch · 3 files changed
+41/−6 lines, 3 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Data.Binary.Defer: instance (BinaryDefer a) => BinaryDefer (Defer a)
- Data.Binary.Defer: instance (BinaryDefer a) => BinaryDefer [a]
- Data.Binary.Defer: instance (BinaryDefer a) => BinaryDeferStatic (Defer a)
- Data.Binary.Defer: instance (Show a) => Show (Defer a)
- Data.Binary.Defer.List: instance (BinaryDeferStatic a) => BinaryDefer (ListDefer a)
+ Data.Binary.Defer: instance BinaryDefer a => BinaryDefer (Defer a)
+ Data.Binary.Defer: instance BinaryDefer a => BinaryDefer [a]
+ Data.Binary.Defer: instance BinaryDefer a => BinaryDeferStatic (Defer a)
+ Data.Binary.Defer: instance Show a => Show (Defer a)
+ Data.Binary.Defer.List: instance BinaryDeferStatic a => BinaryDefer (ListDefer a)
- Data.Binary.Defer: (<<) :: (BinaryDefer a) => Pending (a -> b) p -> a -> Pending b PendingSome
+ Data.Binary.Defer: (<<) :: BinaryDefer a => Pending (a -> b) p -> a -> Pending b PendingSome
- Data.Binary.Defer: (<<~) :: (BinaryDefer a) => Pending (a -> b) p -> a -> Pending b PendingSome
+ Data.Binary.Defer: (<<~) :: BinaryDefer a => Pending (a -> b) p -> a -> Pending b PendingSome
- Data.Binary.Defer: bothDefer :: (BinaryDefer a) => (Handle -> a -> IO [(Int, IO ())], Handle -> IO a)
+ Data.Binary.Defer: bothDefer :: BinaryDefer a => (Handle -> a -> IO [(Int, IO ())], Handle -> IO a)
- Data.Binary.Defer: class (BinaryDefer a) => BinaryDeferStatic a
+ Data.Binary.Defer: class BinaryDefer a => BinaryDeferStatic a
- Data.Binary.Defer: get :: (BinaryDefer a) => Handle -> IO a
+ Data.Binary.Defer: get :: BinaryDefer a => Handle -> IO a
- Data.Binary.Defer: getSize :: (BinaryDeferStatic a) => a -> Int
+ Data.Binary.Defer: getSize :: BinaryDeferStatic a => a -> Int
- Data.Binary.Defer: put :: (BinaryDefer a) => Handle -> a -> IO ()
+ Data.Binary.Defer: put :: BinaryDefer a => Handle -> a -> IO ()
- Data.Binary.Defer: putDefer :: (BinaryDefer a) => Handle -> a -> IO [(Int, IO ())]
+ Data.Binary.Defer: putDefer :: BinaryDefer a => Handle -> a -> IO [(Int, IO ())]
- Data.Binary.Defer.List: newListDefer :: (BinaryDeferStatic a) => [a] -> ListDefer a
+ Data.Binary.Defer.List: newListDefer :: BinaryDeferStatic a => [a] -> ListDefer a
- Data.Binary.Defer.List: readListDefer :: (BinaryDeferStatic a) => ListDefer a -> Int -> Int -> [a]
+ Data.Binary.Defer.List: readListDefer :: BinaryDeferStatic a => ListDefer a -> Int -> Int -> [a]
Files
- Data/Binary/Defer.hs +4/−3
- LICENSE +30/−0
- binarydefer.cabal +7/−3
Data/Binary/Defer.hs view
@@ -1,10 +1,11 @@+{-# LANGUAGE ScopedTypeVariables #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Binary.Defer -- Copyright : Neil Mitchell -- License : BSD3 -- --- Maintainer : Neil Mitchell <http://www.cs.york.ac.uk/~ndm/>+-- Maintainer : Neil Mitchell <http://community.haskell.org/~ndm/> -- Stability : unstable -- Portability : portable to Hugs and GHC. Requires Control.Exception.catch --@@ -21,7 +22,7 @@ ) where import Prelude hiding (catch)-import Control.Exception (catch)+import Control.Exception (catch, SomeException) import System.IO import Foreign(unsafePerformIO)@@ -85,7 +86,7 @@ save hndl value = value `seq` f (zip [0::Int ..] xs) where f [] = error "unmatched item to save, or trying to save _|_"- f ((i,x):xs) = catch (psave (x value) hndl i) (const $ f xs)+ f ((i,x):xs) = catch (psave (x value) hndl i) (\(e :: SomeException) -> f xs) load hndl = do i <- hGetInt hndl
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright Neil Mitchell 2006-2010.+All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are+met:++ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above+ copyright notice, this list of conditions and the following+ disclaimer in the documentation and/or other materials provided+ with the distribution.++ * Neither the name of Neil Mitchell nor the names of other+ contributors may be used to endorse or promote products derived+ from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
binarydefer.cabal view
@@ -1,10 +1,14 @@ name: binarydefer build-type: Simple-version: 1.2+version: 1.2.1 license: BSD3-author: Neil Mitchell+license-file: LICENSE+author: Neil Mitchell <ndmitchell@gmail.com>+maintainer: Neil Mitchell <ndmitchell@gmail.com> synopsis: Binary serialization with deferred loading-build-depends: base+description: Binary serialization, but with delays.+category: Data+build-depends: base < 5 exposed-modules: Data.Binary.Defer, Data.Binary.Defer.List Data.Binary.Defer.Internal