How to avoid right intendation?

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
  • mtl_issue

  • I created an example repository. I'm aware of tricks such as this one. But I find it really hard to avoid the increasing right indentation without making the code hard to understand because of runExceptT and the likes everywhere. To give you a bit more info before clicking the repository link: in the actual app, m would be the application monad (think ReaderT pattern), and so you might often see m (Maybe String) or m (Either String) being returned. It's then hard to compose two functions like that. I'm aware that you can do MonadPlus m and MonadError String m but I can't get this to work while still preserving the error messages depending on where I got a Nothing value.

  • Idris2

    A purely functional programming language with first class types

  • Idris2 has a great syntax for this, see e.g. node018:

  • 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
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