well that was fun... had some hours alone, wrote a sketch of a monad lib which fixes the principal difficulties i've been having with funcool/cats
(principally around lifting and cats' use of dynvars)
yes - https://github.com/mccraigmccraig/mopr/blob/master/src/mopr/control/monad.cljc
still very much a work-in-progress though
no comments and all in one repl-driven ns 😬
but it lets me define some more complex monad types like promise-of-reader-and-writer, and can auto-lift from other types - which is roughly where i wanted to get to
the background being that i've got a load of code structured with a promise monad, but i would like to introduce a reader and a writer
the reader so i can pass around a log-context-value for easier tracing of production log messages, and also to pass around the system map
the writer so i can introduce some improved tracing of async code for debugging
and i wanted it to auto-lift so that i could incrementally add the new monads in to the old system, witthout being forced to refactor the whole thing in one hit
isn't the system map a pretty large context to carry around on every call?
it's just a reference
and we currently have to pass it around everywhere it might be needed as an explicit parameter anyway
ahh gotcha
okay yeah that makes sense
the debug-ctx stuff in liberator was super useful for that in the context of v complex http routing so can imagine having that extra info would make debugging all the wild promise stuff easier
do you plan to share it?