packages feed

ivar-simple 0.1.0.1 → 0.2

raw patch · 5 files changed

+31/−34 lines, 5 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

HISTORY view
@@ -1,3 +1,9 @@+0.2     (2012-07-23)+   change BlockedIndefinitely exception (gone since ghc 7.0) to NonTermination++0.1.0.2 (2009-06-03)+   depend on base < 5 instead of base.+ 0.1.0.1 (2009-01-11)    make Data.IVar.Simple.tryWrite exception safe (noticed by Chris Kuklewicz) 
LICENSE view
@@ -1,28 +1,19 @@-Copyright (c) 2008, Bertram Felgenhauer--All rights reserved.+Copyright (c) 2008, 2009 Bertram Felgenhauer -Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions-are met:+Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions: -1. Redistributions of source code must retain the above copyright-   notice, this list of conditions and the following disclaimer.-2. 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.-3. Neither the name of the author nor the names of his contributors-   may be used to endorse or promote products derived from this-   software without specific prior written permission.+The above copyright notice and this permission notice shall be included in+all copies or substantial portions of the Software. -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.+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+THE SOFTWARE.
ivar-simple.cabal view
@@ -1,14 +1,14 @@ Name:          ivar-simple-Version:       0.1.0.1+Version:       0.2 Category:      Concurrency Stability:     experimental-Copyright:     (c) 2008, 2009 Bertram Felgenhauer+Copyright:     (c) 2008-2012 Bertram Felgenhauer Maintainer:    Bertram Felgenhauer <int-e@gmx.de> License:       MIT License-File:  LICENSE Synopsis:      Write once concurrency primitives. Description:-  @IVar@s are write-once variables.+  @IVar@s are write-once (immutable) variables.   .   They can be read, an operation that will block until a value was written   to the variable. They can be written to exactly once.@@ -24,7 +24,7 @@         Data.IVar.Simple         Data.IVar.Simple.IChan         Data.IVar.Simple.MIChan-    Build-Depends:      base+    Build-Depends:      base < 5     -- workaround for http://hackage.haskell.org/trac/ghc/ticket/2756     if impl(ghc <= 6.10.1)         GHC-Options:        -fno-state-hack
src/Data/IVar/Simple.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.IVar.Simple--- Copyright   : (c) 2008, 2009 Bertram Felgenhauer+-- Copyright   : (c) 2008-2012 Bertram Felgenhauer -- License     : BSD3 -- -- Maintainer  : Bertram Felgenhauer <int-e@gmx.de>@@ -64,12 +64,12 @@     empty <- isEmptyMVar lock     if empty then return (Just value) else return Nothing --- | Writes a value to an 'IVar'. Raises a 'BlockedIndefinitely' exception if+-- | Writes a value to an 'IVar'. Raises a 'NonTermination' exception if -- it fails. write :: IVar a -> a -> IO () write ivar value = do     result <- tryWrite ivar value-    when (not result) $ throwIO BlockedIndefinitely+    when (not result) $ throwIO NonTermination -- Note: It would be easier to block forever when the IVar is full. However, -- the thread would likely not be garbage collected then. 
src/Data/IVar/Simple/IChan.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.IVar.Simple.IChan--- Copyright   : (c) 2008, 2009 Bertram Felgenhauer+-- Copyright   : (c) 2008-2012 Bertram Felgenhauer -- License     : BSD3 -- -- Maintainer  : Bertram Felgenhauer <int-e@gmx.de>@@ -45,7 +45,7 @@  -- | Write a single value to the channel. ----- Raises a 'BlockedIndefinitely' exception if a value has already been+-- Raises a 'NonTermination' exception if a value has already been -- written to the channel. Otherwise, returns a new channel head for -- writing further values. write :: IChan a -> a -> IO (IChan a)