packages feed

ki 0.1.0 → 0.1.0.1

raw patch · 3 files changed

+14/−11 lines, 3 filesdep −atomic-primopsPVP ok

version bump matches the API change (PVP)

Dependencies removed: atomic-primops

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to the [Haskell Package Versioning Policy](https://pvp.haskell.org/). +## [0.1.0.1] - 2020-11-30++### Changed+- Lower `cabal-version` from 3.0 to 2.2 because `stack` cannot parse 3.0+- Replace `AtomicCounter` with `Int` (to drop the `atomic-primops` dependency)+ ## [0.1.0] - 2020-11-11  ### Added
ki.cabal view
@@ -1,4 +1,4 @@-cabal-version: 3.0+cabal-version: 2.2  author: Mitchell Rosen bug-reports: https://github.com/mitchellwrosen/ki/issues@@ -11,7 +11,7 @@ name: ki stability: experimental synopsis: A lightweight, structured concurrency library-version: 0.1.0+version: 0.1.0.1  description:   A lightweight, structured-concurrency library.@@ -96,11 +96,11 @@   build-depends:     base >= 4.12.0.0 && < 4.15,     containers,-    stm,+    stm   exposed-modules:     Ki,     Ki.Implicit,-    Ki.Internal,+    Ki.Internal   hs-source-dirs: src   other-modules:     Ki.CancelToken@@ -120,9 +120,6 @@       concurrency ^>= 1.11.0.0,       dejafu ^>= 2.4.0.0,     cpp-options: -DTEST-  else-    build-depends:-      atomic-primops,  test-suite dejafu-tests   import: component
src/Ki/Concurrency.hs view
@@ -140,7 +140,7 @@ import Control.Concurrent.STM hiding (registerDelay) import Control.Exception import Control.Monad (unless)-import Data.Atomics.Counter+import Data.IORef (IORef, atomicModifyIORef', newIORef) import GHC.Conc (ThreadId (ThreadId)) #if defined(mingw32_HOST_OS) import GHC.Conc.Windows@@ -177,11 +177,11 @@  uniqueInt :: IO Int uniqueInt =-  incrCounter 1 counter+  atomicModifyIORef' counter \n -> let n' = n + 1 in (n', n') -counter :: AtomicCounter+counter :: IORef Int counter =-  unsafePerformIO (newCounter 0)+  unsafePerformIO (newIORef 0) {-# NOINLINE counter #-}  #endif