Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrently combinator & Handler in MonadCatch #2298

Merged
merged 2 commits into from
Jun 25, 2020
Merged

Conversation

coot
Copy link
Contributor

@coot coot commented Jun 22, 2020

ConcurentlyM, like Concurently but for MonadAsync. It's not part of the
MonadAsync which makes it simpler to implement and use, but we're not reusing
Concurrently for MonadAsync's IO instance.

@coot coot added networking io-classes Issues / PRs related to io-classes labels Jun 22, 2020
@coot coot requested a review from dcoutts June 22, 2020 06:36
@mrBliss mrBliss changed the title ConcurtentlyM combinator ConcurrentlyM combinator Jun 22, 2020
@coot
Copy link
Contributor Author

coot commented Jun 22, 2020

In second patch I simplified MonadCatch'es HandlerM.

@coot coot force-pushed the coot/ConcurrentlyM branch from 14babfb to 87504e6 Compare June 25, 2020 11:13
@coot coot mentioned this pull request Jun 25, 2020
Copy link
Contributor

@dcoutts dcoutts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is in principle fine I think.

A couple minor requests below.

io-sim-classes/src/Control/Monad/Class/MonadThrow.hs Outdated Show resolved Hide resolved
@coot coot force-pushed the coot/ConcurrentlyM branch from 87504e6 to 7b27926 Compare June 25, 2020 11:48
Copy link
Contributor

@dcoutts dcoutts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The commit messages still talk about the "M" variants, but not a big deal.

@coot
Copy link
Contributor Author

coot commented Jun 25, 2020

Yes, and the branch name too :D; I'll clean the commits, consensus folks might read it.

coot added 2 commits June 25, 2020 14:02
Remove `HandlerM` from `MonadCatch` class and provide use `Handler`
directly, without `mkHandler`.
@coot coot force-pushed the coot/ConcurrentlyM branch from 7b27926 to dabcb98 Compare June 25, 2020 12:04
@coot coot changed the title ConcurrentlyM combinator Concurrently combinator & Handler in MonadCatch Jun 25, 2020
@coot
Copy link
Contributor Author

coot commented Jun 25, 2020

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 25, 2020

@iohk-bors iohk-bors bot merged commit e83a197 into master Jun 25, 2020
@iohk-bors iohk-bors bot deleted the coot/ConcurrentlyM branch June 25, 2020 14:13
@coot coot modified the milestones: S17 2020-07-16, S16 2020-07-02 Jul 3, 2020
jasagredo added a commit that referenced this pull request May 24, 2021
As by cardano-ledger-specs' PR #2298, the code that was isolated previously is
being moved to the ledger side. This commit updates the ledger-spec dependency
commit to the head of that branch and removes the relevant code.

Co-authored-by: EncodePanda <[email protected]>
jasagredo added a commit that referenced this pull request May 24, 2021
As by cardano-ledger-specs' PR #2298, the code that was isolated previously is
being moved to the ledger side. This commit updates the ledger-spec dependency
commit to the head of that branch and removes the relevant code.

Co-authored-by: EncodePanda <[email protected]>
jasagredo added a commit that referenced this pull request May 24, 2021
As by cardano-ledger-specs' PR #2298, the code that was isolated previously is
being moved to the ledger side. This commit updates the ledger-spec dependency
commit to the head of that branch and removes the relevant code.

Co-authored-by: EncodePanda <[email protected]>
jasagredo added a commit that referenced this pull request May 25, 2021
As by cardano-ledger-specs' PR #2298, the code that was isolated previously is
being moved to the ledger side. This commit updates the ledger-spec dependency
commit to the head of that branch and removes the relevant code.

Co-authored-by: EncodePanda <[email protected]>
jasagredo added a commit that referenced this pull request May 25, 2021
As by cardano-ledger-specs' PR #2298, the code that was isolated previously is
being moved to the ledger side. This commit updates the ledger-spec dependency
commit to the head of that branch and removes the relevant code.

Co-authored-by: EncodePanda <[email protected]>
iohk-bors bot added a commit that referenced this pull request May 26, 2021
3177: Remove ShelleyLedgerExamples and update cardano-ledger-specs r=Jasagredo a=Jasagredo

As by [cardano-ledger-specs' PR #2298](IntersectMBO/cardano-ledger#2298), the code that was isolated previously is
being moved to the ledger side. This PR updates the ledger-spec dependency
commit to the head of that branch and removes the relevant code.

As a side change, `StandardCrypto` was defined in `Ouroboros.Consensus.Shelley.Protocol.Crypto` as
well as in `Cardano.Ledger.Crypto`, with the same verbatim declaration. Now that
we generate data on ledger's side we are using their `StandardCrypto` definition
which is incompatible with ours, so in order to fix type errors, our definition
was removed in favor of theirs.

This shouldn't mean any real change because as stated in their code (see the
comment removed in their [PR#2298](IntersectMBO/cardano-ledger#2298), both definitions MUST have been (and remain)
equal at all times.

Note that the two first commits are related to this PR and the last one updates 
ledger-specs and plutus to the correct commits, and fixes imports.

This addresses #3139 

Co-authored-by: Javier Sagredo <[email protected]>
coot added a commit that referenced this pull request May 16, 2022
2298: Concurrently combinator & Handler in MonadCatch r=coot a=coot

`ConcurentlyM`, like `Concurently` but for `MonadAsync`.   It's not part of the
`MonadAsync` which makes it simpler to implement and use, but we're not reusing
`Concurrently` for `MonadAsync`'s `IO` instance.


Co-authored-by: Marcin Szamotulski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
io-classes Issues / PRs related to io-classes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants