Hydra/Notes.md
2019-05-08 02:06:59 +07:00

49 lines
939 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1. Effects list vs type class hierarchy
```
meteorShower
:: (L.ControlFlowL m, L.RandomL m, L.LoggerL m)
=> AppState -> Region -> m ()
```
```
class (L.ControlFlowL m, L.RandomL m, L.LoggerL m) => LangL m
```
2. Impossible embedded hierarchy
- Problems with StateL, ProcessL
3. Too much freedom
```
-- Impossible to say it should not do anything but state.
initState :: L.StateL m => m AppState
initState = ...
-- Someone can fix it:
initState :: (L.LoggerL m, L.StateL m) => m AppState
initState = ...
```
4. Hierarchy of runtimes breaks
5. Single runtime
FT obligates to have a single runtime per application (only a single monad stack, only a single runtime structure). It makes the app hard coupled
6. Endless type checking battles
```
Could not deduce (Hydra.Core.Evaluable.Evaluable m'0)
Could not deduce (L.LangL m'0)
arising from a use of meteorCounter
from the context: (L.ProcessL m, L.LangL m)
```