Gren 26.03: Parser improvements

https://lobste.rs/rss Hits: 23
Summary

Gren 26.03: Parser improvementsPublished: 2026-03-23Gren 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 packageIn 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 modulegren-lang/parser is now d...

First seen: 2026-03-23 12:04

Last seen: 2026-03-24 10:25