[Haskell-cafe] How to handle recoverable errors in multi-step computation?

Imants Cekusins imantc at gmail.com
Sat Feb 6 08:23:42 UTC 2016


hello Hon,

you could:

Q1) return Either Partial Result from each step that may partially fail

Q2) Partial type may include (tag, level) where tag is generated by
the function where it first happened, level is incremented in each
caller function (where the "error" bubbled up/propagated). Log fails
in every steps. Tags would let you link errors, levels would hint at
the order in which the error bubbled up.

this may not be the best practice. Just a possibility.


More information about the Haskell-Cafe mailing list