Gren 26.03: Parser improvements

Published: 2026-03-23

Gren is a pure functional programming language that aims to be easy to learn and to reason about, while remaining powerful and portable enough for real-world use. Gren has its roots in Elm and shares its goals while continuing to evolve in the browser, server, and command line.

A new version of the Gren programming language is now available for download. This release is backwards compatible, and brings improvements in parsing Gren code as well as parsers you define on your own.

What do we mean by 26.03?

We aim to do two releases per year. 26.03 is a marketing term. It refers to the releases of the compiler and core packages made in March 2026.

This release consists of:

As you can infer from the semantic versions, this release retains backward-compatibility at the language level.

Gren parser as a package

In the new gren-lang/compiler-common package, you’ll find a lot of the implementation of the Gren compiler. Perhaps the most interesting thing in this package is the language parser.

This is a common package, so you can write Node.js- or browser-applications that parse Gren code. Like this:

module Test exposing (simpleModule)

import Compiler.Parse.Module as Module
import Compiler.Parse.Context as Context
import String.Parser.Advanced as Parser

simpleModule =
  Parser.run Module.parser Context.empty
    """
    module Test exposing (value)

    value : Int
    value = 42
    """

The compiler itself still makes use of the Haskell-based parser. We thought it’d be best to wait on swapping out the parser until we have removed any unknown bugs and taken another pass on the error messages it creates.

Gilbert Ramirez is currently working on a formatter that takes the result of this parser and turns it into pretty-printed text. In combination, this will allow you to generate code as well as format the code you already have.

The formatter didn’t make it in as part of this release, but will be released when it’s ready.

New parser module

gren-lang/parser is now deprecated. To replace it, we’ve added two new modules to gren-lang/core: String.Parser and String.Parser.Advanced.

These modules improve on the original parser package in the following ways:

Misc changes

What’s next

Our eyes now turn toward the future.

As already mentioned, Gilbert Ramirez keeps working on the formatter. People have been asking for formatting for a long time, and it’ll be interesting to see what people will do once they’re able to generate Gren code.

Justin Blake is still working on the new package registry, which will let us and the community host projects somewhere other than Github.

Robin Heggelund Hansen will start working on parametric modules and swapping out the Haskell-based parser with this new Gren-based one. It might just be easier to do the canonicalization re-write simultaneously, but we’ll cross that bridge once we get there.

Thank you, contributors!

This release was made possible through contributions from the following people:

Support the project

You can support Gren financially by sponsoring us at ko-fi or by buying merch from the shop. The profits allow members of the core team to take a day off from their day job and spend it developing Gren instead.

Being an open-source project, there are also other ways to contribute. Spread the word. Report bugs. Contribute new features. In any case, you likely want to join our Discord first.

If you want to keep tabs on the development of Gren, follow us on Mastodon or subscribe to the language creator's Youtube channel.