The "Services" design pattern

This page summarizes the projects mentioned and recommended in the original post on /r/haskell

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • That being said, I famously recommend against this approach (see why mocking is a bad idea and my rules for sustainable Haskell), so I think it's too bad that what I consider the sustainable alternative is not mentioned in the comparison section: not using all this indirection in the first place. I.e. you don't need a record containing saveNewUser if you only have one saveNewUser and just call it. You don't need to mock out the code that you run in production if you write an integration test that uses the same code that you run in production.

  • hpqtypes-effectful

    Effectful bindings for hpqtypes

  • That depends on the API of the library in question. For example, there's hpqtypes-effectful that gives you a DB effect and functions that make use it can perform queries that will by default run in a single database transaction.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • effectful

    An easy to use, fast extensible effects library with seamless integration with the existing Haskell ecosystem.

  • effectful got rid of all issues I listed (I expanded a little on it here).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts