Type inference of letrec in Algorithm W

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
  • Algorithm-W-Step-By-Step

    Classic Algorithm W for type inference.

  • While trying out the excellent tutorial on HM type inference https://github.com/wh5a/Algorithm-W-Step-By-Step I noticed that this implementation does not support recursive let bindings ("letrec"), which are necessary for example for implementing "fix".

  • write-you-a-haskell

    Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)

  • This is the best resource I know of: http://dev.stephendiehl.com/fun/006\_hindley\_milner.html https://github.com/sdiehl/write-you-a-haskell/blob/master/chapter7/poly_constraints/src/Infer.hs

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

    A miniature Prolog interpreter + compiler so I can write about it

  • If you’re interested, you can find the code that does this somewhere in GHC. (I couldn’t tell you where to look off the top of my head, but I distinctly remember successfully looking for it a couple of years ago. I wanted to add a HM type system to my toy Prolog interpreter and I had this exact question!)

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