universum icon indicating copy to clipboard operation
universum copied to clipboard

Re-export `hoistMaybe` from `transformers`

Open dcastro opened this issue 2 years ago • 4 comments

At the moment, we're defining hoistMaybe in Universum.Monad.Trans.

However, transformers also introduced a hoistMaybe function in 0.6.0.0. We should just re-export it.

We shouldn't do this now though. Even recent LTSs are still using older versions of transformers. LTS 18.28 uses transformers-0.5.6.2. Let's do this when transformers >= 0.6.0.0 gains widespread adoption.

dcastro avatar Mar 31 '22 10:03 dcastro

Why not use a bit of CPP?

treeowl avatar Mar 31 '22 13:03 treeowl

Why not use a bit of CPP?

Hmm I guess using CPP to either re-export hoistMaybe or define it from scratch would help avoid issues when a user has both Control.Monad.Trans.Maybe.hoistMaybe and Universum.hoistMaybe in scope at the same time.

Yup, we could do that in the interim, and then delete it and re-export transformer's when it gains widespread adoption, good idea!

dcastro avatar Mar 31 '22 13:03 dcastro

Cool. Do you know of any tools that try to point out (or even remove) MIN_VERSION macros that Cabal bounds make redundant? I probably wouldn't want negated invocations removed.

treeowl avatar Mar 31 '22 14:03 treeowl

I'm not aware of any, no :/

dcastro avatar Mar 31 '22 14:03 dcastro