[Haskell-cafe] Asynchronous computations and error handling in the free monad
Will Yager
will.yager at gmail.com
Wed Nov 9 22:10:53 UTC 2016
Without knowing exactly what the problem is, perhaps you could use "FreeT ast Either"?
This will allow you to extend the Free monad with failure semantics.
Will
> On Nov 9, 2016, at 15:34, Damian Nadales <damian.nadales at gmail.com> wrote:
>
> Yesterday I posted the following question to SO:
> http://stackoverflow.com/questions/40495304/abstract-result-types-in-free-monads
>
> As discussion with Benjamin ensued, in which he stated that it is
> better to be explicit about the fact that we want parts of our code to
> run asynchronously. I am not so sure.
>
> I also have a similar question about how would you deal with fatal
> errors that could happen at the interpreter. I guess this could be
> modeled in the free monad by having a command returning a `Maybe` or
> `Either` type. However we're adding details about the interpreters in
> our DSL, since we are stating that certain command could cause fatal
> errors.
>
> So my question is what approach do you or would you use?
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
More information about the Haskell-Cafe
mailing list