packages feed

vault 0.2.0.1 → 0.2.0.3

raw patch · 5 files changed

+24/−12 lines, 5 filesdep ~basedep ~hashable

Dependency ranges changed: base, hashable

Files

src/Data/Unique/Really.hs view
@@ -11,7 +11,7 @@ import Control.Applicative import System.IO.Unsafe (unsafePerformIO) -#if __GLASGOW_HASKELL__+#if UseGHC  import Control.Exception (evaluate) import qualified Data.Unique@@ -33,7 +33,7 @@  hashUnique (Unique s) = hashStableName s -instance Hashable Unique where hash = hashUnique+instance Hashable Unique where hashWithSalt s = hashWithSalt s . hashUnique  #else 
src/Data/Vault/ST.hs view
@@ -28,7 +28,7 @@     for the second implementation that doesn't need to     bypass the type checker. -}-#if __GLASGOW_HASKELL__+#if UseGHC import qualified Data.Vault.ST_GHC as ST #else import qualified Data.Vault.ST_Pure as ST
src/Data/Vault/ST_GHC.hs view
@@ -9,6 +9,7 @@ import qualified Data.IntMap as IntMap import Data.IORef import Control.Monad.ST+import Control.Monad.ST.Unsafe   import Data.Unique.Really@@ -37,7 +38,7 @@ empty = Vault Map.empty  newKey :: ST s (Key s a)-newKey = unsafeIOToST $ Key <$> newUnique+newKey = Control.Monad.ST.Unsafe.unsafeIOToST $ Key <$> newUnique  lookup :: Key s a -> Vault s -> Maybe a lookup (Key k) (Vault m) = fromAny <$> Map.lookup k m
src/Data/Vault/ST_Pure.hs view
@@ -10,6 +10,7 @@ import Control.Monad.ST  import System.IO.Unsafe (unsafePerformIO)+import Control.Monad.ST.Unsafe  import Data.Unique @@ -41,7 +42,8 @@ empty  = Vault Map.empty  newKey :: ST s (Key s a)-newKey = unsafeIOToST $ Key <$> newUnique <*> newIORef Nothing+newKey = Control.Monad.ST.Unsafe.unsafeIOToST $+    Key <$> newUnique <*> newIORef Nothing  lookup :: Key s a -> Vault s -> Maybe a lookup key@(Key k _)   (Vault m) = unlock key =<< Map.lookup k m
vault.cabal view
@@ -1,5 +1,5 @@ Name:               vault-Version:            0.2.0.1+Version:            0.2.0.3 Synopsis:           a persistent store for values of arbitrary types Description:   A /vault/ is a persistent store for values of arbitrary types.@@ -28,19 +28,28 @@     type:           git     location:       git://github.com/HeinrichApfelmus/vault.git ++flag UseGHC+    description: Use GHC-specific packages and extensions.+    default:     True+     Library     hs-source-dirs:     src     build-depends:      base == 4.*, containers >= 0.4 && < 0.6-    if impl(ghc)+    if impl(ghc) && flag(UseGHC)         build-depends:  unordered-containers >= 0.2.1.0 && < 0.3,-                        hashable == 1.1.*+                        hashable >= 1.1 && < 1.3 +        CPP-options:    -DUseGHC -    ghc-options:        -Wall     extensions:         CPP+--    ghc-options:        -Wall+     exposed-modules:                         Data.Vault,                         Data.Vault.ST,                         Data.Unique.Really-    other-modules:-                        Data.Vault.ST_GHC,-                        Data.Vault.ST_Pure+                        +    if impl(ghc) && flag(UseGHC)+        other-modules: Data.Vault.ST_GHC+    else+        other-modules: Data.Vault.ST_Pure