diff options
author | Ben Gamari <ben@smart-cactus.org> | 2018-02-03 13:11:17 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-02-03 13:25:07 -0500 |
commit | e5d0101121cf4ce4dffe59025360096ee57c5372 (patch) | |
tree | 602fff057162bb0bc5c36790883b553b01e38793 | |
parent | d8a0e6d322deaa3743c95a11a6b7272577d1f86e (diff) | |
download | haskell-e5d0101121cf4ce4dffe59025360096ee57c5372.tar.gz |
base: Deprecate STM invariant checking primitives
-rw-r--r-- | libraries/base/GHC/Conc/Sync.hs | 12 | ||||
-rw-r--r-- | libraries/base/changelog.md | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/libraries/base/GHC/Conc/Sync.hs b/libraries/base/GHC/Conc/Sync.hs index de7779291f..0bd2900e46 100644 --- a/libraries/base/GHC/Conc/Sync.hs +++ b/libraries/base/GHC/Conc/Sync.hs @@ -782,6 +782,18 @@ catchSTM (STM m) handler = STM $ catchSTM# m handler' Just e' -> unSTM (handler e') Nothing -> raiseIO# e +-- Invariant checking has been removed. See #14324 and +-- https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0011-deprecate-stm-invariants.rst +{-# DEPRECATED checkInv, always, alwaysSucceeds + [ "The STM invariant-checking mechanism is deprecated in GHC 8.4" + , "and will be removed in GHC 8.10. See " + , "<https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0011-deprecate-stm-invariants.rst>." + , "" + , "Existing users are encouraged to encapsulate their STM" + , "operations in safe abstractions which can perform the invariant" + , "checking without help from the runtime system." + ] #-} + -- | Low-level primitive on which 'always' and 'alwaysSucceeds' are built. -- 'checkInv' differs from these in that, -- diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md index fdeb7deb0c..ad8767f72f 100644 --- a/libraries/base/changelog.md +++ b/libraries/base/changelog.md @@ -76,6 +76,9 @@ * `getExecutablePath` now resolves symlinks on Windows (#14483) + * Deprecated STM invariant checking primitives (`checkInv`, `always`, and + `alwaysSucceeds`) in `GHC.Conc.Sync` (#14324). + ## 4.10.1.0 *November 2017* * Bundled with GHC 8.2.2 |