How do you typecheck a macro?

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • hackett

    WIP implementation of a Haskell-like Lisp in Racket

  • Extremely difficult, but you can do some cool stuff with macros if you do it. Have a look at Alexis King's "Hackett" language for a cool example: https://lexi-lambda.github.io/hackett/

  • coalton

    Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp.

  • See also https://github.com/coalton-lang/coalton which takes a slightly different approach.

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

    [Early Stages] Low level functional programming language with linear types, first class inline functions, levity polymorphism and regions.

  • It depends on how powerful you want your macros to be. In aith, my macros are just a compile time lambda calculus. My macros can only generate values or other macros, this limits them to being no more powerful then what you can normally do with functions but it (will when my language is usable) let me write code that I know will be inlined and edsls that compile into fast code. With these limitations I can completely type check macros ahead of time (because they are just like funcitons) and I can also use my kind system to prevent macro types from leaking out into normal ones.

  • unseemly

    Macros have types!

  • You could look at how https://github.com/paulstansifer/unseemly/ does it

  • rakudo

    🦋 Rakudo – Raku on MoarVM, JVM, and JS

  • Once the RakuAST project is completed, and the ongoing implementation work in the Raku directory of the rakuast branch of Rakudo is merged (maybe this year, but I suspect next year), the scheme will aiui be something like:

  • klister

    an implementation of stuck macros

  • You might be interested in Klister: https://github.com/gelisam/klister

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