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

Experiment with DejaFu or IOSim #17

Open
NicolasT opened this issue Mar 22, 2023 · 0 comments
Open

Experiment with DejaFu or IOSim #17

NicolasT opened this issue Mar 22, 2023 · 0 comments

Comments

@NicolasT
Copy link
Owner

Currently, Process r a is defined as ReaderT (ProcessEnv r) IO a. Indeed, we don't want any other monad but IO as the base monad for processes (theoretically anything implementing MonadUnliftIO may work, dunno, but it's not really worth it since that's then limited to ReaderT and IdentityT anyway).

Now, it could make sense to have the internal implementation to be newtype ProcessT r m a = ProcessT (ReaderT (ProcessEnv r) m) a, and only export type Process r = ProcessT r IO in the public-facing API (and specializing all functions for it, as is already the case). Then, the implementation could be abstracted over MonadConc (or similar) and we could write tests using DejaFu or IOSim to validate certain behaviours.

Lots of opportunity for experimentation here.

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

No branches or pull requests

1 participant