-
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) -
When targeting JavaScript the compiler now generates faster and smaller code for
Int
values in bit array expressions and patterns by evaluating them at compile time where possible. (Richard Viney)
-
Improved the error message you get when trying to add a package that doesn't exist with
gleam add
. (Giacomo Cavalieri) -
FFI files (such as
.mjs
and.erl
) are now permitted in subdirectories ofsrc/
andtest/
. (PgBiel)
-
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 Language Server now suggests a code action to turn a function call into the equivalent use expression. For example, this snippet of code:
pub fn main() { result.try(fetch_profile(user) fn(profile) { render_welcome(user, profile) }) }
Will be turned into:
pub fn main() { use profile <- result.try(fetch_profile(user)) render_welcome(user, profile) }
-
The language server now provides correct information when hovering over patterns in use expressions. (Surya Rose)
- 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 crash with ENOTEMPTY (os error 39) when building on NTFS partitions (Ivan Ermakov)
-
Fixed a bug where the compiler would crash when pattern matching on multiple subjects and one of them being a constant record. (Surya Rose)
-
Variant inference on prelude types now works correctly if the variant is constant. (Surya Rose)
-
Fixed a bug where patterns in
use
expressions would not be checked to ensure that they were exhaustive. (Surya Rose) -
Fixed a bug where a
module.mjs
file would be overwritten by amodule.gleam
file of same name without warning. It now produces an error. (PgBiel)
- Fixed a bug where
gleam update
would fail to update versions. (Jason Sipula)