Skip to content

Commit d1db6d9

Browse files
author
Jared Corduan
authored
Merge pull request #1486 from input-output-hk/edsko/epochinfo-callstack
HasCallStack around EpochInfo functions
2 parents 664e06f + 6d58970 commit d1db6d9

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

cabal.project

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,29 @@ write-ghc-environment-files: always
2222
source-repository-package
2323
type: git
2424
location: https://github.com/input-output-hk/cardano-base
25-
tag: 9b82346b78e212fcd3e795faf9dd7f3266ab7297
26-
--sha256: 04iv32x233bck4xd34x2g0yaxj438f57d3z6m0pvvzj2yca1slxm
25+
tag: 8061c5dd00f7aad134b18a4e6818879641f8589f
26+
--sha256: 182a2x16mh7gqjfkyrc4vgindxwwlr0i8vhmqyfbmnnvg6m8bzaq
2727
subdir: binary
2828

2929
source-repository-package
3030
type: git
3131
location: https://github.com/input-output-hk/cardano-base
32-
tag: 9b82346b78e212fcd3e795faf9dd7f3266ab7297
33-
--sha256: 04iv32x233bck4xd34x2g0yaxj438f57d3z6m0pvvzj2yca1slxm
32+
tag: 8061c5dd00f7aad134b18a4e6818879641f8589f
33+
--sha256: 182a2x16mh7gqjfkyrc4vgindxwwlr0i8vhmqyfbmnnvg6m8bzaq
3434
subdir: binary/test
3535

3636
source-repository-package
3737
type: git
3838
location: https://github.com/input-output-hk/cardano-base
39-
tag: 9b82346b78e212fcd3e795faf9dd7f3266ab7297
40-
--sha256: 04iv32x233bck4xd34x2g0yaxj438f57d3z6m0pvvzj2yca1slxm
39+
tag: 8061c5dd00f7aad134b18a4e6818879641f8589f
40+
--sha256: 182a2x16mh7gqjfkyrc4vgindxwwlr0i8vhmqyfbmnnvg6m8bzaq
4141
subdir: cardano-crypto-class
4242

4343
source-repository-package
4444
type: git
4545
location: https://github.com/input-output-hk/cardano-base
46-
tag: 9b82346b78e212fcd3e795faf9dd7f3266ab7297
47-
--sha256: 04iv32x233bck4xd34x2g0yaxj438f57d3z6m0pvvzj2yca1slxm
46+
tag: 8061c5dd00f7aad134b18a4e6818879641f8589f
47+
--sha256: 182a2x16mh7gqjfkyrc4vgindxwwlr0i8vhmqyfbmnnvg6m8bzaq
4848
subdir: slotting
4949

5050
source-repository-package

shelley/chain-and-ledger/executable-spec/src/Shelley/Spec/Ledger/Slot.hs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import Cardano.Slotting.Slot (EpochNo (..), EpochSize (..), SlotNo (..))
3232
import Control.Monad.Trans (lift)
3333
import Data.Functor.Identity (Identity)
3434
import Data.Word (Word64)
35+
import GHC.Stack (HasCallStack)
3536
import Shelley.Spec.Ledger.BaseTypes (ShelleyBase)
3637

3738
newtype Duration = Duration Word64
@@ -61,11 +62,23 @@ slotByronToShelley (Byron.Slot s) = SlotNo s
6162
slotShelleyToByron :: SlotNo -> Byron.Slot
6263
slotShelleyToByron (SlotNo s) = Byron.Slot s
6364

64-
epochInfoEpoch :: EpochInfo Identity -> SlotNo -> ShelleyBase EpochNo
65+
epochInfoEpoch ::
66+
HasCallStack =>
67+
EpochInfo Identity ->
68+
SlotNo ->
69+
ShelleyBase EpochNo
6570
epochInfoEpoch ei = lift . EI.epochInfoEpoch ei
6671

67-
epochInfoFirst :: EpochInfo Identity -> EpochNo -> ShelleyBase SlotNo
72+
epochInfoFirst ::
73+
HasCallStack =>
74+
EpochInfo Identity ->
75+
EpochNo ->
76+
ShelleyBase SlotNo
6877
epochInfoFirst ei = lift . EI.epochInfoFirst ei
6978

70-
epochInfoSize :: EpochInfo Identity -> EpochNo -> ShelleyBase EpochSize
79+
epochInfoSize ::
80+
HasCallStack =>
81+
EpochInfo Identity ->
82+
EpochNo ->
83+
ShelleyBase EpochSize
7184
epochInfoSize ei = lift . EI.epochInfoSize ei

stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extra-deps:
3535
- test
3636

3737
- git: https://github.com/input-output-hk/cardano-base
38-
commit: 9b82346b78e212fcd3e795faf9dd7f3266ab7297
38+
commit: 8061c5dd00f7aad134b18a4e6818879641f8589f
3939
subdirs:
4040
- binary
4141
- binary/test

0 commit comments

Comments
 (0)