Open klarkc opened 2 years ago
Pros:
Cons:
Effect
sometimes (have no idea if it's possible)We can eliminate the need of a monad transformer using qualified do:
count :: Unwrap "count" Int
count = ref 0
-- ?bind ma \a -> ?bind (foo a) \b -> ?bind (bar b) \c -> finalResult c
setup :: Setup Binding
setup = PureVue.do
count
...
Maybe we should improve setup hook using a custom type as a free monad instead of Effect.
Free monads updates a value on each code evaluation, creating a returning final value, it seems to fit our use case.
That final value would be
Either Render Binding