Skip to content

Commit 2a8a973

Browse files
committed
fix: GHC 9.10 unit test compilation errors
- Remove redundant foldl' imports (now in Prelude) - Add annotateIO to MonadThrow MonadDatabase instance (required by io-classes MINIMAL pragma for GHC >= 9.10)
1 parent 5e9ec6d commit 2a8a973

File tree

7 files changed

+5
-13
lines changed

7 files changed

+5
-13
lines changed

lib/benchmarks/exe/db-bench.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@ import Data.Functor
264264
import Data.Functor.Identity
265265
( Identity (..)
266266
)
267-
import Data.List
268-
( foldl'
269-
)
270267
import Data.Maybe
271268
( fromMaybe
272269
)

lib/benchmarks/exe/restore-bench.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,6 @@ import Data.Functor
275275
import Data.Functor.Contravariant
276276
( contramap
277277
)
278-
import Data.List
279-
( foldl'
280-
)
281278
import Data.Percentage
282279
( Percentage
283280
)

lib/unit/test/unit/Cardano/Wallet/Address/PoolSpec.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ import Data.Functor.Identity
2727
( Identity (..)
2828
)
2929
import Data.List
30-
( foldl'
31-
, sortOn
30+
( sortOn
3231
)
3332
import Data.Map
3433
( Map

lib/unit/test/unit/Cardano/Wallet/Api/TypesSpec.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,7 @@ import Data.Function
537537
( (&)
538538
)
539539
import Data.List
540-
( foldl'
541-
, intercalate
540+
( intercalate
542541
)
543542
import Data.List.NonEmpty
544543
( NonEmpty (..)

lib/unit/test/unit/Cardano/Wallet/DB/MigrationSpec.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ newtype MonadDatabase a = MonadDatabase
121121
instance MonadThrow MonadDatabase where
122122
throwIO = MonadDatabase . ExceptT . pure . Left . toException
123123
bracket = error "not defined"
124+
annotateIO _ = id
124125

125126
liftState :: State Database a -> MonadDatabase a
126127
liftState = MonadDatabase . lift

lib/unit/test/unit/Cardano/Wallet/DB/StateMachine.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,7 @@ import Data.Bifunctor
252252
( first
253253
)
254254
import Data.Foldable
255-
( foldl'
256-
, toList
255+
( toList
257256
)
258257
import Data.Functor.Classes
259258
( Eq1

lib/wallet/src/Cardano/Wallet.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ import Data.Functor
733733
( ($>)
734734
, (<&>)
735735
)
736+
import qualified Data.Functor
736737
import Data.Functor.Contravariant
737738
( (>$<)
738739
)
@@ -752,7 +753,6 @@ import Data.Generics.Product.Typed
752753
import Data.IntCast
753754
( intCast
754755
)
755-
import qualified Data.Functor
756756
import Data.List.NonEmpty
757757
( NonEmpty (..)
758758
)

0 commit comments

Comments
 (0)