snoyberg / classy-prelude

A typeclass-based Prelude.
108 stars 15 forks source link

Needed to use ExceptT today, but had no access to it from classy-prelude #114

Open kozross opened 8 years ago

kozross commented 8 years ago

Maybe I'm missing something obvious, but I can't seem to use ExceptT at all via classy-prelude. I cannot import it (due to hiding in mtl and transformers), but given that classy-prelude uses both, I assume the capabilities are there.

Essentially, I wanted to use ExceptT to wrap some IO operations which return Eithers. Could you suggest what part of classy-prelude I need to read up on to be able to do something similar?

Edit: Seem like I found liftIO. However, runExceptT, which I also needed, I couldn't find any equivalent for.

snoyberg commented 8 years ago

You would import it manually, is there something preventing that from happening?

On Mon, Feb 1, 2016 at 5:48 AM, Koz Ross notifications@github.com wrote:

Maybe I'm missing something obvious, but I can't seem to use ExceptT at all via classy-prelude. I cannot import it (due to hiding in mtl and transformers), but given that classy-prelude uses both, I assume the capabilities are there.

Essentially, I wanted to use ExceptT to wrap some IO operations which return Eithers. Could you suggest what part of classy-prelude I need to read up on to be able to do something similar?

— Reply to this email directly or view it on GitHub https://github.com/snoyberg/classy-prelude/issues/114.

kozross commented 8 years ago

Nothing preventing it - I was just surprised at the need to do this, given how classy-prelude tends to be very inclusive (it has liftIO for example).