Skip to content

Commit

Permalink
Merge #3725
Browse files Browse the repository at this point in the history
3725: Re-write withRecentEra to require less nesting r=Anviking a=Anviking

It seems we can replace

```haskell
main = do
    era <- getEra
    withRecentEra era $ \(recentEra :: WriteTx.RecentEra era) -> do
        doStuff recentEra
```
with
```haskell
main = do
    era <- getEra
    AnyRecentEra (recentEra :: WriteTx.RecentEra era) <- guardIsRecentEra era
    doStuff recentEra
```
to save on precious horizontal space!

### Comments

<!-- Additional comments, links, or screenshots to attach, if any. -->

### Issue Number

<!-- Reference the Jira/GitHub issue that this PR relates to, and which requirements it tackles.
  Note: Jira issues of the form ADP- will be auto-linked. -->


Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
  • Loading branch information
iohk-bors[bot] and Anviking committed Jan 31, 2023
2 parents e0fcd91 + 0dc73b2 commit a1ec20b
Showing 1 changed file with 219 additions and 219 deletions.
Loading

0 comments on commit a1ec20b

Please sign in to comment.