1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-12 04:43:18 +03:00
juvix/test/Typecheck
janmasrovira 0f29b3ee93
Fix type synonym in let (#1880)
- 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.
2023-03-10 09:53:05 +01:00
..
Negative.hs Fix inference loop (#1726) 2023-01-17 13:28:38 +01:00
Positive.hs Fix type synonym in let (#1880) 2023-03-10 09:53:05 +01:00