Skip to content

Conversation

coot
Copy link
Collaborator

@coot coot commented Sep 23, 2022

resolves IntersectMBO/ouroboros-network#2797
resolves IntersectMBO/ouroboros-network#2650
resolves IntersectMBO/ouroboros-network#3436
resolves IntersectMBO/ouroboros-network#2588
resolves IntersectMBO/ouroboros-network#2587
resolves IntersectMBO/ouroboros-network#2586

TODO:

  • StrictTArray
  • StrictTSem: TSem is already strict, there's no need to provide a wrapper.
  • StrictTChan
  • Update the changelog file.
  • flashTQueue
  • labelTChan & labelTChanIO
  • traceTChan & traceTChanIO
  • missing castStrictTQueue / castStrictTBQueue (and a likes)

@coot coot requested a review from dcoutts September 23, 2022 08:43
@coot coot force-pushed the coot/io-classes branch 4 times, most recently from de5daf1 to 014a6fc Compare September 23, 2022 11:18
@coot coot changed the title IO Classes Add various missing APIs to io-classes Sep 23, 2022
@coot
Copy link
Collaborator Author

coot commented Sep 23, 2022

It's probably not a bad idea to split the MonadSTM class into smaller pieces, following how the stm package is organised:

  • MoandSTM: which just provides STM, atomically, etc and is a base class for all the other type classes.
  • MonadTVar
  • MonadTArray
  • MonadTBQueue
  • MonadTChan
  • MonadTMVar
  • MonadTQueue
  • MonadTSem
    Similarly the Control.Monad.Class.MonadSTM.Strict ought to be split.

To make the transition simpler let's expose Control.Monad.Class.MonadSTM.Compat which expose:

class (MonadSTM.MonadSTM m, MonadTVar m, MonadMVar m, ...) => MonadSTM m where {}

There should also be a Control.Monad.Class.MonadSTM.Strict.Compat which exports all the strict interfaces and the above MonadSTM class.

@coot coot requested a review from bolt12 September 26, 2022 09:00
Follow a similar module structure as the "stm" package.
@coot coot force-pushed the coot/io-classes branch 2 times, most recently from de05e75 to f7e6406 Compare September 27, 2022 06:50
coot added 11 commits September 27, 2022 09:34
Added missing:
* flushTBQueue
`TSem` is already strict, so we just reexport the
`Control.Concurrent.Class.MonadSTM.TSem` module.
castStrictTArray is not possible with ghc
We need to wait for the next release of "cborg" package.
Need to rebuild `typed-protocols` inside  `dist-newstyle`.
Use the `fd` command in a way which allows to match relative paths and
exclude files by relative path.
@coot coot merged commit b9824e8 into main Sep 27, 2022
@coot coot deleted the coot/io-classes branch September 27, 2022 10:20
iohk-bors bot added a commit to IntersectMBO/ouroboros-network that referenced this pull request Oct 6, 2022
4047: Use newer version of io-sim r=coot a=coot

# Description

Update to newer version of `io-sim` (see input-output-hk/io-sim#24).



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
None yet
Projects
None yet
2 participants