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

runIOSimProp: refactored #1300

Merged
merged 3 commits into from
Feb 12, 2024
Merged

Conversation

coot
Copy link
Contributor

@coot coot commented Feb 10, 2024

Refactored runIOSimProp in style of monadicST from QuickCheck.

@coot coot force-pushed the coot/runIOSimProp branch 2 times, most recently from 480044a to 7deeafc Compare February 12, 2024 09:37
@coot
Copy link
Contributor Author

coot commented Feb 12, 2024

Once we publish input-output-hk/io-sim#140 this can be offloaded to IOSim's monadicIOSim, but it will require to redefine the RunMonad as:

newtype RunState s   = RunState (TVar (IOSim s) (Nodes (IOSim s)))
newtype RunMonad s a = RunMonad (ReaderT (RunState s) (IOSim s) a)

Although this might not be desirable, if RunMonad as currently used for IO and IOSim. In such case one can provide a newtype M s a = M { runM :: RunMonad (IOSim s) a } wrapper which can be used just for simulation tests.

Refactored `runIOSimProp` in style of `monadicST` from `QuickCheck`.
@coot coot force-pushed the coot/runIOSimProp branch from 7deeafc to e2e620e Compare February 12, 2024 11:11
@coot
Copy link
Contributor Author

coot commented Feb 12, 2024

The formatting check fails with:

error: writing to file: No space left on device
error: executing SQLite statement 'insert or replace into NARs(cache, hashPart, timestamp, present) values (1, 'cgc2nw5nw0js1aphc8plcg8zj90c1gqd', 1707736522, 0)': database or disk is full, database or disk is full (in '/root/.cache/nix/binary-cache-v6.sqlite')

Copy link
Contributor

@locallycompact locallycompact left a comment

Choose a reason for hiding this comment

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

Thanks!

@locallycompact locallycompact merged commit fffcb4b into cardano-scaling:master Feb 12, 2024
18 checks passed
@coot coot deleted the coot/runIOSimProp branch February 12, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants