Skip to content

Commit

Permalink
Deprecation warning for HD module
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisdral authored and jasagredo committed Dec 2, 2022
1 parent 5092658 commit ed799ac
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 20 deletions.
7 changes: 0 additions & 7 deletions anti-diff/format-stylish.sh

This file was deleted.

6 changes: 2 additions & 4 deletions anti-diff/src/Data/Map/Diff/Strict.hs
Expand Up @@ -172,14 +172,12 @@ diff (Values m1) (Values m2) = Diff $
if v1 == v2 then
Nothing
else
Just $ singletonDelete v1 `unsafeMappend` singletonInsert v2
Just $ singletonDelete v1 `unsafeAppend` singletonInsert v2
)
m1
m2
where
-- Bypass the @'Semigroupoid'@ instance for @'NEDiffHistory'@, because we
-- know that @h1@ and @h2@ will not cancel out.
unsafeMappend (NEDiffHistory h1) (NEDiffHistory h2) =
unsafeAppend (NEDiffHistory h1) (NEDiffHistory h2) =
NEDiffHistory $ h1 <> h2

fromList :: Ord k => [(k, NEDiffHistory v)] -> Diff k v
Expand Down
Expand Up @@ -9,7 +9,7 @@
-- Except for the backing store, this interface would also be required for any
-- other kind of table. Some definitions would change depending on that table's
-- specifics.
module Ouroboros.Consensus.Storage.LedgerDB.HD (
module Ouroboros.Consensus.Storage.LedgerDB.HD {-# DEPRECATED "Use Data.Map.Diff.Strict instead" #-} (
-- * Values
UtxoValues (..)
, emptyUtxoValues
Expand Down
11 changes: 10 additions & 1 deletion scripts/ci/check-stylish.sh
Expand Up @@ -4,4 +4,13 @@ set -euo pipefail

export LC_ALL=C.UTF-8
# TODO the export of the <= operator TxLimits crashes stylish-haskell
fd -p ouroboros-consensus -e hs -E Setup.hs -E ouroboros-consensus/src/Ouroboros/Consensus/Mempool/TxLimits.hs -X stylish-haskell -c .stylish-haskell.yaml -i
# TODO the deprecation warning in the HD module will be removed by
# stylish-haskell, unless we update stylish-haskell to v0.14.3.0
fd -p ouroboros-consensus -e hs \
-E Setup.hs \
-E ouroboros-consensus/src/Ouroboros/Consensus/Mempool/TxLimits.hs \
-E ouroboros-consensus/src/Ouroboros/Consensus/Storage/LedgerDB/HD.hs \
-X stylish-haskell -c .stylish-haskell.yaml -i

fd -p anti-diff -e hs -X stylish-haskell -c .stylish-haskell.yaml -i
fd -p semigroupoid -e hs -X stylish-haskell -c .stylish-haskell.yaml -i
7 changes: 0 additions & 7 deletions semigroupoid/format-stylish.sh

This file was deleted.

0 comments on commit ed799ac

Please sign in to comment.