-
Optimised code generated for record updates. (yoshi)
-
The compiler now allows for record updates to change the generic type parameters of the record:
type Box(value) { Box(password: String, value: value) } fn insert(box: Box(a), value: b) -> Box(b) { Box(..box, value:) }
(yoshi)
-
It is now allowed to write a block with no expressions. Like an empty function body, an empty block is considered incomplete as if it contained a
todo
expression. (Giacomo Cavalieri) -
The shorthand names for the two targets,
erl
andjs
are now deprecated in code such as@target
. (Surya Rose)
- Improved the error message you get when trying to add a package that doesn't
exist with
gleam add
. (Giacomo Cavalieri)
-
The language server now provides type information when hovering over argument labels. (Surya Rose)
-
The Language Server now suggests a code action to desugar a use expression into the equivalent function call. For example, this snippet of code:
pub fn main() { use profile <- result.try(fetch_profile(user)) render_welcome(user, profile) }
Will be turned into:
pub fn main() { result.try(fetch_profile(user), fn(profile) { render_welcome(user, profile) }) }
- The formatter now adds a
todo
inside empty blocks. (Giacomo Cavalieri)
-
The compiler now throws an error when a float literal ends with an
e
and is missing an exponent. (Surya Rose) -
Fixed a bug where the compiler would crash when pattern matching on multiple subjects and one of them being a constant record. (Surya Rose)
- Fixed a bug where
gleam update
would fail to update versions.