Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Knowles <[email protected]>
  • Loading branch information
Anviking and jonathanknowles committed Sep 15, 2023
1 parent 147f86b commit d0f58df
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 55 deletions.
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ packages:
, lib/numeric/
, lib/primitive/
, lib/read
, lib/std-gen-seed
, lib/std-gen-seed/
, lib/temporary-extra/
, lib/test-utils/
, lib/text-class/
Expand Down
58 changes: 29 additions & 29 deletions lib/balance-tx/cardano-balance-tx.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,48 +38,49 @@ library
import: language, opts-lib
hs-source-dirs: lib
build-depends:
, MonadRandom
, QuickCheck
, base
, cardano-coin-selection
, cardano-slotting
, ouroboros-consensus
, cardano-wallet-primitive
, cardano-strict-containers
, cardano-ledger-shelley
, cardano-ledger-core
, bytestring
, cardano-addresses
, cardano-api
, cardano-ledger-conway
, cardano-ledger-binary
, cardano-coin-selection
, cardano-crypto-class
, cardano-ledger-allegra
, cardano-ledger-alonzo
, cardano-ledger-api
, text
, lens
, serialise
, cborg
, monoid-subclasses
, pretty-simple
, random
, std-gen-seed
, cardano-ledger-mary
, cardano-ledger-babbage
, cardano-ledger-alonzo
, cardano-ledger-allegra
, cardano-crypto-class
, ouroboros-consensus-cardano
, int-cast
, cardano-addresses
, bytestring
, cardano-ledger-binary
, cardano-ledger-conway
, cardano-ledger-core
, cardano-ledger-mary
, cardano-ledger-shelley
, cardano-slotting
, cardano-strict-containers
, cardano-wallet-primitive
, cardano-wallet-test-utils
, cborg
, containers
, deepseq
, fmt
, generic-lens
, generics-sop
, MonadRandom
, QuickCheck
, int-cast
, lens
, monoid-subclasses
, ouroboros-consensus
, ouroboros-consensus-cardano
, pretty-simple
, random
, serialise
, std-gen-seed
, text
, transformers
exposed-modules:
Cardano.Tx.Balance
Cardano.Tx.Balance.Internal.CoinSelection
Cardano.Tx.Balance.Internal.CoinSelection.Gen
Cardano.Wallet.Shelley.Compatibility.Ledger
Cardano.Wallet.Write.ProtocolParameters
Cardano.Wallet.Write.Tx
Cardano.Wallet.Write.Tx.Balance
Expand All @@ -90,7 +91,6 @@ library
Cardano.Wallet.Write.Tx.SizeEstimation
Cardano.Wallet.Write.Tx.TimeTranslation
Cardano.Wallet.Write.UTxOAssumptions
Cardano.Wallet.Shelley.Compatibility.Ledger

test-suite test
import: language, opts-exe
Expand All @@ -99,6 +99,7 @@ test-suite test
hs-source-dirs: test/data test/spec
main-is: run-test-suite.hs
build-depends:
, QuickCheck
, base
, cardano-balance-tx
, cardano-wallet-launcher
Expand All @@ -107,7 +108,6 @@ test-suite test
, generics-sop
, hspec
, hspec-core
, QuickCheck
build-tool-depends: hspec-discover:hspec-discover
other-modules:
Cardano.Tx.Balance.Internal.CoinSelectionSpec
Expand Down
44 changes: 23 additions & 21 deletions lib/std-gen-seed/std-gen-seed.cabal
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
cabal-version: 3.0
name: std-gen-seed
version: 0.1.0.0
synopsis: modules to support applications for the cardano wallet
version: 0.0.0.0
synopsis: Support for standard random number generator seeds
license: Apache-2.0
author: HAL, Cardano Foundation
maintainer: [email protected]
build-type: Simple
extra-doc-files: CHANGELOG.md

library
common language
default-language: Haskell2010
default-extensions:
NoImplicitPrelude
DerivingStrategies
OverloadedStrings

ghc-options:
-O2 -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns
-Wunused-foralls -Wunused-foralls -fprint-explicit-foralls
-fprint-explicit-kinds -Wcompat -Widentities
-Werror=incomplete-patterns -Wredundant-constraints
-Wpartial-fields -Wtabs -fhelpful-errors -fprint-expanded-synonyms
-fwarn-unused-do-bind -fwarn-incomplete-uni-patterns
-freverse-errors
common opts-lib
ghc-options: -Wall -Wcompat -fwarn-redundant-constraints

if flag(release)
ghc-options: -O2 -Werror

common opts-exe
ghc-options: -threaded -rtsopts -Wall

if flag(release)
ghc-options: -O2 -Werror

flag release
description: Enable optimization and `-Werror`
default: False
manual: True

library
import: language, opts-lib
exposed-modules:
System.Random.StdGenSeed

hs-source-dirs: src
build-depends:
, base
Expand All @@ -37,14 +45,8 @@ library
, splitmix

test-suite unit
default-language:
Haskell2010
default-extensions:
NoImplicitPrelude
OverloadedStrings
ghc-options:
-threaded -rtsopts
-Wall -O2 -Werror
import: language, opts-exe
ghc-options: -with-rtsopts=-M2G -with-rtsopts=-N4
build-depends:
base
, hspec
Expand Down
4 changes: 2 additions & 2 deletions lib/wallet/cardano-wallet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,6 @@ test-suite unit
, mtl
, network
, network-uri
, std-gen-seed
, nothunks
, OddWord
, openapi3 ==3.2.2
Expand Down Expand Up @@ -812,6 +811,7 @@ test-suite unit
, si-timers
, sop-core
, splitmix
, std-gen-seed
, string-interpolate
, string-qq
, temporary
Expand Down Expand Up @@ -1048,6 +1048,7 @@ benchmark db
, bytestring
, cardano-addresses
, cardano-api
, cardano-balance-tx
, cardano-crypto
, cardano-wallet
, cardano-wallet-application-extras
Expand All @@ -1056,7 +1057,6 @@ benchmark db
, cardano-wallet-primitive
, cardano-wallet-read
, cardano-wallet-test-utils
, cardano-balance-tx
, containers
, contra-tracer
, criterion
Expand Down
4 changes: 2 additions & 2 deletions lib/wallet/src/Cardano/Wallet/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ import Cardano.Wallet.Primitive.Types.Tx.TxIn
( TxIn (..) )
import Cardano.Wallet.Primitive.Types.Tx.TxOut
( TxOut (..) )
import Cardano.Wallet.Write.Tx.SizeEstimation
( TxWitnessTag )
import Control.DeepSeq
( NFData (..) )
import Data.List.NonEmpty
Expand All @@ -121,8 +123,6 @@ import qualified Cardano.Api as Cardano
import qualified Cardano.Wallet.Primitive.Types.TokenMap as TokenMap
import qualified Cardano.Wallet.Primitive.Types.Tx.TxOut as TxOut
import qualified Cardano.Wallet.Write.Tx as Write
import Cardano.Wallet.Write.Tx.SizeEstimation
( TxWitnessTag )
import qualified Data.Foldable as F
import qualified Data.List as L
import qualified Data.Map.Strict as Map
Expand Down

0 comments on commit d0f58df

Please sign in to comment.