Skip to content

Consider the addition of withTransactionEither #33

@robertmassaioli

Description

@robertmassaioli

In my snap code I am threading EitherT (I probably should be threading Control.Error instead) through my code to handle failure gracefully in my Snap handlers. As such I have found the need for such helper functions as these: https://bitbucket.org/robertmassaioli/hackathon/src/2badb4f29792ff3aaba45fc3523f14d6345fbe0c/src/PostgresqlHelpers.hs

The main change here is that returning a Left will result in a rollback of the transaction; which I think is excellent behaviour when you think of all lefts as errors.

Do you think that they would make a good addition to this codebase? Or maybe an equivalent for ErrorT might be cool; since ErrorT is a better monad transformer to use for this use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions