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

Use io-classes instead of unliftio #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jasagredo
Copy link

@jasagredo jasagredo commented Jun 18, 2024

io-classes is a drop-in replacement for IO that allows to run code in IOSim which can simulate most aspects of IO (see).

@stevana
Copy link
Owner

stevana commented Jun 18, 2024

If this is a drop-in replacement, then why is it a 1.6KLOC change?

@jasagredo
Copy link
Author

Stylish-haskell accidentally replaced all LF with CRLF in a couple of long files. I will amend that probably tomorrow. You can see the diff excluding whitespace changes in GitHub in the meantime.

@jasagredo
Copy link
Author

Much better now, without \rs 👍

@stevana
Copy link
Owner

stevana commented Jun 19, 2024

Thanks, but I still don't understand why this change is needed. Can you give an example of what this allows you to do that you couldn't do before?

@jasagredo
Copy link
Author

This allows us to run tests where the SUT runs in IOSim. We can now inject artificial file-system failures, exceptions, make time progress at different speed that real time, trace changes in TVars, or finding race conditions via IOSimPOR.

In IOG we are using this to run some tests and we use IOSim extensively, we vendored temporarily a version of Sequential.hs for this purpose.

@stevana
Copy link
Owner

stevana commented Jun 19, 2024

Think you can provide an example that makes use of any of what you just mentioned? I don't see how finding races with IOSimPOR can work wth Sequentail.hs (nor Parallel.hs).

At the very least the changelog should be updated to mention these possibilities with links to docs.

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.

None yet

2 participants