Skip to content

Commit

Permalink
Merge pull request #487 from IntersectMBO/lehins/fixup-versions
Browse files Browse the repository at this point in the history
Fixup package versions
  • Loading branch information
lehins authored Jun 19, 2024
2 parents caf8a35 + be77d5c commit e87e68e
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 39 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
ghc: "9.6.4"
- os: macos-13
ghc: "9.8.2"
- os: macos-13
ghc: "9.10.1"

env:
# Modify this value to "invalidate" the cabal cache.
Expand Down
2 changes: 1 addition & 1 deletion cardano-crypto-class/cardano-crypto-class.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: cardano-crypto-class
version: 2.2.1.0
version: 2.2.0.0
synopsis:
Type classes abstracting over cryptography primitives for Cardano

Expand Down
7 changes: 2 additions & 5 deletions cardano-crypto-class/src/Cardano/Crypto/Hash/Class.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
Expand Down Expand Up @@ -55,9 +54,7 @@ module Cardano.Crypto.Hash.Class
)
where

#if ! MIN_VERSION_base(4,20,0)
import Data.Foldable (foldl')
#endif
import qualified Data.Foldable as F (foldl')
import Data.Maybe (maybeToList)
import Data.Proxy (Proxy(..))
import Data.Typeable (Typeable)
Expand Down Expand Up @@ -375,7 +372,7 @@ hash = hashWithSerialiser toCBOR

{-# DEPRECATED fromHash "Use bytesToNatural . hashToBytes" #-}
fromHash :: Hash h a -> Natural
fromHash = foldl' f 0 . BS.unpack . hashToBytes
fromHash = F.foldl' f 0 . BS.unpack . hashToBytes
where
f :: Natural -> Word8 -> Natural
f n b = n * 256 + fromIntegral b
Expand Down
6 changes: 5 additions & 1 deletion cardano-crypto-praos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog for `cardano-crypto-praos`

## 2.1.1.2
## 2.1.2.1

*

## 2.1.2.0

*

Expand Down
2 changes: 1 addition & 1 deletion cardano-crypto-praos/cardano-crypto-praos.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ library
build-depends: base
, bytestring
, cardano-binary
, cardano-crypto-class ^>= 2.2
, cardano-crypto-class >=2.1
, deepseq
, nothunks

Expand Down
8 changes: 8 additions & 0 deletions cardano-crypto-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog for `cardano-crypto-tests`

## 2.2.0.0

*

## 2.1.2.0

* Add tests for BLST

## 2.1.1.0

* Add benchmark for `HASH`
Expand Down
2 changes: 1 addition & 1 deletion cardano-crypto-tests/cardano-crypto-tests.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 2.2

name: cardano-crypto-tests
version: 2.2.2.0
version: 2.2.0.0
synopsis: Tests for cardano-crypto-class and -praos
description: Tests for cardano-crypto-class and -praos
license: Apache-2.0
Expand Down
7 changes: 2 additions & 5 deletions cardano-crypto-tests/src/Test/Crypto/EllipticCurve.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# OPTIONS_GHC -Wno-orphans #-}

{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE LambdaCase #-}
Expand Down Expand Up @@ -36,9 +35,7 @@ import qualified Data.ByteString.Char8 as BS8
import qualified Data.ByteString.Base16 as Base16
import System.IO.Unsafe (unsafePerformIO)
import Data.Bits (shiftL)
#if ! MIN_VERSION_base(4,20,0)
import Data.Foldable (foldl')
#endif
import qualified Data.Foldable as F (foldl')

tests :: TestTree
tests =
Expand Down Expand Up @@ -370,7 +367,7 @@ prop_repeatedAddition a p = BLS.blsMult p (fromIntegral a) === repeatedAdd a p
where
repeatedAdd :: Int -> BLS.Point curve -> BLS.Point curve
repeatedAdd scalar point =
foldl' BLS.blsAddOrDouble BLS.blsZero $ replicate (abs scalar) (BLS.blsCneg point (scalar < 0))
F.foldl' BLS.blsAddOrDouble BLS.blsZero $ replicate (abs scalar) (BLS.blsCneg point (scalar < 0))

testAddNegYieldsInf :: forall curve. BLS.BLS curve
=> BLS.Point curve -> Bool
Expand Down
7 changes: 2 additions & 5 deletions cardano-crypto-tests/src/Test/Crypto/KES.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
Expand All @@ -26,9 +25,7 @@ module Test.Crypto.KES
where

import Data.Proxy (Proxy(..))
#if ! MIN_VERSION_base(4,20,0)
import Data.Foldable (foldl')
#endif
import qualified Data.Foldable as F (foldl')
import qualified Data.ByteString as BS
import Data.Set (Set)
import qualified Data.Set as Set
Expand Down Expand Up @@ -159,7 +156,7 @@ eventTracer :: IORef [event] -> Tracer IO event
eventTracer logVar = Tracer (\ev -> liftIO $ atomicModifyIORef' logVar (\acc -> (acc ++ [ev], ())))

matchAllocLog :: [AllocEvent] -> Set WordPtr
matchAllocLog = foldl' (flip go) Set.empty
matchAllocLog = F.foldl' (flip go) Set.empty
where
go (AllocEv ptr) = Set.insert ptr
go (FreeEv ptr) = Set.delete ptr
Expand Down
2 changes: 1 addition & 1 deletion cardano-slotting/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Add `binOpEpochNo` helper function to facilitate binary operations on
`EpochNo`.
* Remove numeric instances (`Num`, `Integral`, `Real`) of `EpochNo` and
`EpochSize` for safety.
`EpochSize` for safety.
They are still available for testing from the `testlib` as orphans.
* New `Test.Cardano.Slotting.TreeDiff` module extracted from
`cardano-ledger-binary`. It lives in a new public sublibrary `testlib`.
Expand Down
7 changes: 2 additions & 5 deletions cardano-strict-containers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# Changelog for `cardano-strict-containers`

# next version
# 0.1.4.0

* GHC-8.10 compatibility
* Added `takeWhileR` and `takeWhileL` to `Data.Sequence.Strict`

# 0.1.3.1

*

# 0.1.3.0

* Added `IsList` instance for `StrictSeq`
Expand Down
10 changes: 3 additions & 7 deletions cardano-strict-containers/src/Data/FingerTree/Strict.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleInstances #-}
Expand Down Expand Up @@ -54,11 +53,8 @@ where

import Data.FingerTree (Measured (..), ViewL (..), ViewR (..))
import qualified Data.FingerTree as FT
import Data.Foldable (
#if ! MIN_VERSION_base(4,20,0)
foldl',
#endif
toList)
import qualified Data.Foldable as F (foldl')
import Data.Foldable (toList)
import Data.Unit.Strict (forceElemsToWHNF)
import GHC.Generics (Generic)
import NoThunks.Class (NoThunks (..), noThunksInValues)
Expand Down Expand Up @@ -100,7 +96,7 @@ singleton !a = SFT (FT.singleton a)
-- | /O(n)/. Create a sequence from a finite list of elements.
-- The opposite operation 'toList' is supplied by the 'Foldable' instance.
fromList :: (Measured v a) => [a] -> StrictFingerTree v a
fromList !xs = foldl' (|>) (SFT FT.empty) xs
fromList !xs = F.foldl' (|>) (SFT FT.empty) xs

-- | /O(1)/. Add an element to the left end of a sequence.
-- Mnemonic: a triangle with the single element at the pointy end.
Expand Down
10 changes: 3 additions & 7 deletions cardano-strict-containers/src/Data/Sequence/Strict.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE PatternSynonyms #-}
Expand Down Expand Up @@ -71,11 +70,8 @@ import Codec.Serialise (Serialise)
import Control.Arrow ((***))
import Control.DeepSeq (NFData)
import Data.Aeson (FromJSON(..), ToJSON(..))
import Data.Foldable (
#if ! MIN_VERSION_base(4,20,0)
foldl',
#endif
toList)
import qualified Data.Foldable as F (foldl')
import Data.Foldable (toList)
import Data.Sequence (Seq)
import qualified Data.Sequence as Seq
import Data.Unit.Strict (forceElemsToWHNF)
Expand Down Expand Up @@ -210,7 +206,7 @@ StrictSeq s |> (!x) = StrictSeq (s Seq.|> x)
StrictSeq xs >< StrictSeq ys = StrictSeq (xs Seq.>< ys)

fromList :: [a] -> StrictSeq a
fromList !xs = foldl' (|>) empty xs
fromList !xs = F.foldl' (|>) empty xs

-- | Convert a 'Seq' into a 'StrictSeq' by forcing each element to WHNF.
forceToStrict :: Seq a -> StrictSeq a
Expand Down

0 comments on commit e87e68e

Please sign in to comment.