mirror of
https://github.com/anoma/juvix.git
synced 2024-12-12 04:43:18 +03:00
0f29b3ee93
- Closes #1879 The issue was possibly caused by the use of `readerState`: ``` readerState :: forall a r x. (Member (State a) r) => Sem (Reader a ': r) x -> Sem r x readerState m = get >>= (`runReader` m) ``` I originally thought it would be a good idea to "freeze" some `State` effect into a `Reader` effect in the following situation: - Some function `s` needs to update the state. - Some function `f` only reads the state. - Then you would have `g .. = ... readerState @MyState f` - This way, it would be reflected in the type that `g` cannot update the state. However, for some reason I have not been able to clearly identify, this was not working as expected. |
||
---|---|---|
.. | ||
Negative.hs | ||
Positive.hs |