Skip to content

Discussion / feature-request: allow using a monad other than Aff with HTTPure.serve #134

Description

@Dretch

I have just converted my app to use monad-logger and as a result I have replaced Aff a with LoggerT Aff a in many places in the codebase.

HTTPure.serve is a bit awkward here because it requires that the request handling function return Aff a. This means that the LoggerT Aff a to Aff a transformation has to be done inside the request handling function by using runLoggerT. It might be neater if serve could work with any monads that implement MonadAff - then the logging context could be automatically passed through from the caller.

Is this a good idea?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions