Gleam v1.15.0 released

59 points by w0nder1ng 21 hours ago on lobsters | 6 comments

steinuil | 19 hours ago

The language server now performs best-effort zero value generation for decode.failure and has support for Nil when using the generate dynamic decoder code action.

Wow, I've been working on a Gleam project and writing tons of decoders by hand and somehow I never noticed that there are "generate dynamic decoder" and "generate to-JSON" code actions when selecting a type name. Very nice!

Gleam's LS is the best I've ever used and I'm glad the Gleam team is working on it as a first-class citizen.

giacomo_cavalieri | 19 hours ago

It’s well nice! Also there’s a full list of aaall the code actions and features it supports here https://gleam.run/language-server/#Code-actions

On the pattern matching with a guard. Seems like it complicates pattern exhaustivity checks?

steinuil | 6 hours ago

Do you mean in general or just Gleam's implementation? In general a pattern with a clause is simply ignored when checking for exhaustivity because the type checker cannot prove anything meaningful about the clause expression.

giacomo_cavalieri | 5 hours ago

Yeah just in general exhaustiveness checking! Gleam does the same of just ignoring branches with a guard

giacomo_cavalieri | 7 hours ago

Luckily it doesn’t! It’s still a very complex piece of code, checking for exhaustivity