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

Splitting up StateC and CompState #432

Merged
merged 5 commits into from
Oct 8, 2022

Conversation

lepsa
Copy link
Contributor

@lepsa lepsa commented Oct 7, 2022

Splitting StateC into a Reader/Writer/State transformer, as scadOpts was only ever read from, and messages was only ever written to or returned at the end of a processing batch.

This also involved splitting these values out of CompState as they did not need to both readable and writable.

Setting up some constraint types to allow easier use of the new monad transformer in code that doesn't need to know the exact structure of the transformer, just what it can do.

Splitting StateC into a Reader/Writer/State transformer, as scadOpts was
only ever read from, and messages was only ever written to or returned
at the end of a processing batch.

This also involved splitting these values out of CompState as they did
not need to both readable and writable.

Setting up some constraint types to allow easier use of the new monad
transformer in code that doesn't need to know the exact structure of the
transformer, just what it can do.
StateE has been split up along the same lines as StateC.
ImplicitCadM has been fully parameterised so it can be used for StateE,
allowing us to have a single transformer core stack for all of the
reader/writer/state handling, dropping in types as needed.
Changing most references to ImplicitCadM to StateC, as it is a type
alias that has the expected types parameterised.
@julialongtin julialongtin merged commit 0b3a454 into Haskell-Things:master Oct 8, 2022
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