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

939 B
Raw Blame History

  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
  1. Impossible embedded hierarchy
  • Problems with StateL, ProcessL
  1. 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 = ...

  1. Hierarchy of runtimes breaks

  2. 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

  1. 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)