···4455### Compiler
6677-- Empty case expressions are no longer parse errors and will instead be
88- exhaustiveness errors, resulting in a better error message that shows what the
99- missing patterns are.
77+Empty case expressions are no longer parse errors and will instead be
88+exhaustiveness errors, resulting in a better error message that shows what the
99+missing patterns are. ([Race Williams](https://github.com/raquentin))
10101111#### Bug Fixes
12121313-- Fixed [RUSTSEC-2021-0145](https://rustsec.org/advisories/RUSTSEC-2021-0145) by
1414- using Rust's `std::io::IsTerminal` instead of the `atty` library.
1515-- Fixed the generated `mod` property in the Erlang application file when using
1616- the `application_start_module` property in `gleam.toml`
1717-1818-## v1.1.0 - 2024-04-16
1919-2020-### Formatter
2121-2222-- Fixed a bug where the first subject of a case expression clause would be
2323- indented more than necessary.
2424-2525-## v1.1.0-rc3 - 2024-04-12
2626-2727-### Formatter
2828-2929-- Fixed a bug where the `@internal` annotation wouldn't be displayed.
3030-- Fixed a bug where a record update's arguments would be incorrectly split on
3131- multiple lines.
3232-3333-## v1.1.0-rc2 - 2024-04-10
3434-3535-### Compiler
3636-3737-- Fixed a bug on the JavaScript target where variables named `debugger`, which
3838- is a JavaScript keyword, were not being renamed, leading to runtime errors.
3939-4040-### Formatter
4141-4242-- Fixed a bug where comments would be moved out of an empty bit array.
4343-- Fixed a bug where the formatter could add a trailing comma inside empty
4444- bit arrays, generating invalid syntax.
4545-- Revert the warning about internal types being exposed in a package's public
4646- API.
4747-4848-### Build tool
4949-5050-- Revert the change that would make the build tool refuse to publish a package
5151- that exposes an internal type in its public API.
5252-5353-## v1.1.0-rc1 - 2024-04-08
5454-5555-### Compiler
5656-5757-- The `@internal` attribute can now be used to annotate definitions.
5858- This will hide those definitions from the generated documentation,
5959- autocompletions and the exported module interface.
6060-- Prepending to lists in JavaScript (`[x, ..xs]` syntax) has been optimised.
6161-- Function stubs are no longer generated for functions that do not have an
6262- implementation for the current targeting being compiled for.
6363-- Fixed a bug where some functions would not result in a compile error when
6464- compiled for a target that they do not support.
6565-- Fixed a bug where sometimes a warning would not be emitted when a result is
6666- discarded.
6767-- Fixed a bug with JavaScript code generation of pattern matching guards.
6868-- URLs in error messages have been updated for the new language tour.
6969-- Improved error message when erroneously trying to append items to a list using
7070- the spread syntax (like `[..rest, last]`).
7171-- Generate [type references](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types-)
7272- when compiling to JavaScript with TypeScript definitions enabled.
7373-- Fix a bug where JavaScript code generation would not properly return the
7474- result of nested blocks.
7575-- Fix a bug where JavaScript code generation would not properly handle functions
7676- returned by blocks.
7777-- Fix a bug where Erlang code generation would not properly handle list case
7878- patterns with no head and a spread tail.
7979-- The compiler will now raise a warning if you're pattern matching on tuple
8080- literals and suggest you use multiple subjects instead.
8181-- Fixed a bug where JavaScript code generation would incorrectly parenthesise a
8282- return statement.
8383-- Nested tuple access (`tuple.0.1`) now parses successfully.
8484-- Error messages are more clear about expecting values instead of types.
8585-- Fixed a bug where pattern matching on a string would cause the program to
8686- crash on the JavaScript target.
8787-- A warning is now emitted when defining an opaque external type.
8888-- Improve error message when using incorrect quotes (`'`) to define a string
8989-- Fixed a bug where Erlang string prefix patterns could generate invalid Erlang.
9090-- Fixed string prefix matching producing wrong results on the JavaScript target
9191- when the prefix had a Unicode codepoint escape sequence (`\u{...}`).
9292-- Improved error message for wrong patterns using constructors from other
9393- modules.
9494-- Fixed a bug on the JavaScript target where variables bound by patterns, if
9595- used within a bit array literal inside a `case` clause's guard, would be used
9696- before they were defined, leading to a runtime error when evaluating the
9797- `case` expression.
9898-- Improved error messages when failing to parse a series of things.
9999-- A warning is now raised for unused binary operations, records, record access
100100- and record updates.
101101-- Fixed a bug when using constant as the size option parameter
102102- for `BitArray` caused unknown variable exception.
103103-- Improved recommendations on error messages.
104104-- Improved error message for `BitArray` segment sizes.
105105-- A warning is now raised when an internal type is accidentally exposed in a
106106- package's public API.
107107-- Fixed the error message when using `panic` on the JavaScript target: it now
108108- correctly identifies the error variant as a `panic` instead of a `todo`.
109109-- Fixed a bug on the JavaScript target where empty lists with little space
110110- available could compile to a conversion from the array `[ , ]`, causing them
111111- to wrongly have a length of one (the array has a single `undefined` element).
112112-113113-### Formatter
114114-115115-- The formatting of case expressions with multiple subjects has been improved.
116116-- Fixed a bug where the formatter would move comments from the end of bounded
117117- expressions like lists, tuples, case expressions or function calls.
118118-- Fixed a bug where a record update's arguments would not be indented correctly.
119119-- Fixed a bug where function call arguments, tuple items and list items would be
120120- needlessly indented if preceded by a comment.
121121-- Line endings other than `\n` are now handled by the formatter, preserving
122122- blank lines and converting them to `\n`.
123123-- The formatter can now format groups of imports alphabetically.
124124-- Fixed a bug where comments would be moved out of an empty list.
125125-- Fixed a bug where pipes and binary operations in function calls would be
126126- nested more than necessary.
127127-- Improved formatting of comments in binary operation chains.
128128-129129-### Build tool
130130-131131-- Added support for the [Bun](https://bun.sh/) runtime when compiling to
132132- JavaScript by using `gleam run --target javascript --runtime bun`
133133-- Allow compilation of packages that require `"rebar"` using the rebar3
134134- compiler.
135135-- A warning is now emitted if there is a `.gleam` file with a path that would be
136136- invalid as a module name.
137137-- The `~> x.y` version constraint syntax has been dropped in favour of
138138- `> x.y.z and <= xx.0.0` syntax in `gleam add` and `gleam new`, for clarity.
139139-- New projects are created with the GitHub `actions/checkout` v4 action.
140140-- Fixed a bug where bit arrays would break syntax highlighting in the generated
141141- HTML documentation.
142142-- Dependencies that use Erlang-only bit options can now compile on JavaScript,
143143- though the functions that use them will not be available for use in the root
144144- package.
145145-- The output format of the command line help messages have been changed
146146- slightly.
147147-- The command line help text now lists valid targets and runtimes.
148148-- Generated documentation no longer exposes the constructors of opaque types,
149149- no longer exposes the values of constants, and indicates which types are
150150- opaque.
151151-- Generated HTML documentation now includes a link to the package on Hex.
152152-- Terminal colors can now be forced by setting the `FORCE_COLOR` environment
153153- variable to any non-empty value.
154154-- Rust's Reqwest's `webpki-roots` are now used for TLS verification.
155155-- Update Deno config to allow passing `--location` runtime flag.
156156-- Fixed a bug with dependency resolution of exact versions of RC releases.
157157-- Fixed a bug where the documentation of a labelled record constructor could be
158158- assigned to the wrong definition in the doc site.
159159-- Fixed a bug where the code blocks in the generated documentation's site would
160160- have a wrong indentation.
161161-- Fixed a bug where the compiler would panic when it cannot get current
162162- directory.
163163-- Improved error message for non-UTF-8 paths encountered during Gleam commands.
164164- Now includes the path that caused the error for better diagnostics.
165165-- Fixed a bug where on windows local packages had absolute paths in the manifest
166166- instead of relative.
167167-- The `gleam publish` command now asks for confirmation if the package
168168- repository URL doesn't return a successful status code.
169169-- `gleam publish` can now optionally use a Hex API key to authorise publishing
170170- and retiring packages, set via the environment variable `HEXPM_API_KEY`.
171171-- `gleam publish` will now refuse to publish placeholder packages, to prevent
172172- name squatting which is against the Hex terms of service.
173173-- If a package leaks an internal type in its public API, then the build tool
174174- will now refuse to publish it to Hex.
175175-- Monospaced links in the generated documentation now have the same color as
176176- common links.
177177-- Fixed a bug where the `export package interface` command would always
178178- recompile the project ignoring the cache.
179179-180180-### Language Server
181181-182182-- Update messages from the client are now batched to avoid doing excess
183183- compilation work in the language server, improving performance. This makes a
184184- large difference in low power machines where the language server could
185185- struggle to keep up with the edits from the client.
186186-- The `Compiling Gleam` message is no longer emitted each time code is compiled.
187187- This is to reduce noise in editors that show this message prominently such as
188188- Neovim.
189189-- Fixed a bug where hovering over an expression in the middle of a pipe would
190190- give the wrong node.
191191-- Go to definition now works for values in dependency Gleam modules.
192192-- Completions are now provided for module imports.
193193-194194-## v1.0.0 - 2024-03-04
195195-196196-### Language changes
197197-198198-- Comments have been added to the JavaScript prelude to indicate which members
199199- are in the public API and which are internal.
200200-201201-### Build tool
202202-203203-- Fixed a bug where the exported package interface would not have a module's
204204- documentation.
205205-206206-## v1.0.0-rc2 - 2024-02-14
207207-208208-### Bug fixes
209209-210210-- Fixed a bug where the exhaustiveness checker could crash for some generic
211211- types.
212212-213213-### Formatter
214214-215215-- The format used by the formatter has been improved in some niche cases.
216216-- Improved the formatting of long case guards.
217217-218218-## v1.0.0-rc1 - 2024-02-10
219219-220220-### Language changes
221221-222222-- Using a reserved word is now a compile error, not a warning.
223223-- Inexhaustive matches are now compile errors, not warnings.
224224-- The warning for an unused module alias now shows how to not assign a name to
225225- the module.
226226-- Type aliases with unused type parameters now emit an error.
227227-- Type definitions with duplicate type parameters now emit an error.
228228-229229-### Formatter
230230-231231-- Now the formatter will nest pipelines and binary operators that are used as
232232- function arguments, list items or as tuple items.
233233-- The format function literals used as the last argument in a function call
234234- on long lines has been improved.
235235-236236-### Build tool
237237-238238-- If a package contains a `todo` expression then the build tool will now refuse
239239- to publish it to Hex.
240240-- `gleam export` now takes a `package-interface` option to export a json file
241241- containing metadata about the root package.
242242-- `gleam docs build` now creates a json file containing metadata about the root
243243- package.
244244-- The order of dependencies in `manifest.toml` is now in alphabetical order.
245245-- The search bar in generated docs now has a darker background color.
246246-- The generated docs no longer shows whether an argument is discarded or
247247- not in a function signature.
248248-- It is now possible to use `gleam run -m` to run a dependency module even if
249249- that dependency uses a compile target that your project does not support.
250250-251251-### Bug fixes
252252-253253-- Fixed a bug the build tool could be make to attempt to run a main function
254254- that does not support the current target in some circumstances.
255255-- Fixed a bug where the exhaustiveness checker could crash when checking nested
256256- values inserted into the parent type using type parameters.
257257-- Fixed a bug where `functionname(_name)` would incorrectly parse as a function
258258- capture instead of a syntax error.
259259-- Fixed a bug where external only functions would "successfully" compile for a
260260- target they do not support, leading to a runtime error.
261261-262262-## v0.34.1 - 2023-01-17
263263-264264-### Build tool changes
265265-266266-- Support has been added for using SourceHut as a repository.
267267-268268-### Bug fixes
269269-270270-- Fixed a bug where long function headers with external implementations could
271271- format incorrectly.
272272-- The `@deprecated` attribute can now be used to annotate module constants.
273273- This will cause a warning to be emitted when the constant is used.
274274-275275-## v0.34.0 - 2023-01-16
276276-277277-## v0.34.0-rc3 - 2023-01-12
278278-279279-### Language changes
280280-281281-- "echo" is now a reserved word.
282282-- A warning is no longer emitted when a function has a Gleam implementation as
283283- well as external implementations for both targets. This is because having a
284284- default Gleam implementation means the code is future-proof and continues to
285285- be cross platform even if a new target is added.
286286-287287-### Bug fixes
288288-289289-- Fixed a bug where function heads would go over the line limit in the
290290- formatter.
1313+Fixed [RUSTSEC-2021-0145](https://rustsec.org/advisories/RUSTSEC-2021-0145) by
1414+using Rust's `std::io::IsTerminal` instead of the `atty` library.
1515+([Pi-Cla](https://github.com/Pi-Cla))
29116292292-## v0.34.0-rc2 - 2023-01-11
293293-294294-### Bug fixes
295295-296296-- Fixed a bug where `gleam run` would fail when the current directory is not
297297- the root of the project and using the JavaScript target.
298298-- Fixed a bug where the compiler would in some cases fail to error when an
299299- application uses functions that do not support the current compilation
300300- target.
301301-302302-## v0.34.0-rc1 - 2024-01-07
303303-304304-### Language changes
305305-306306-- Warn about function body not being used, because it already has external
307307- implementations for all targets.
308308-- It's now possible to compile a project with external functions in dependency
309309- packages that are not supported by the compilation target so long as they are
310310- not used on the current target.
311311-- The error message for when one imports a constructor instead of an homonymous
312312- type has been improved.
313313-314314-### Language Server Changes
315315-316316-- Added a `View on HexDocs` link on function hover.
317317-318318-### Formatter
319319-320320-- Fixed some quirk with the formatting of binary operators.
321321-- Fixed a bug where the formatter would move a function call's closed
322322- parentheses on a new line instead of splitting the function's arguments.
323323-- Now the formatter will format tuples as if they were functions, trying to
324324- first split just the last element before splitting the whole tuple.
325325-- Improved the formatting of multiline strings in string concatenation.
326326-327327-### Build tool changes
328328-329329-- The `gleam new` command now accepts any existing path, as long as there are
330330- no conflicts with already existing files. Examples: `gleam new .`, `gleam new
331331-..`, `gleam new ~/projects/test`.
332332-- The format for the README created by `gleam new` has been altered.
333333-- The `gleam.toml` created by `gleam new` now has a link to the full reference
334334- for its available options.
335335-- The `gleam` binary is now statically linked on Windows.
336336-- New projects are created requiring between versions of v0.34.0 inclusive and
337337- exclusive v2.0.0.
338338-- The `repository` section now supports additional VCS types in the form of
339339- codeberg, forgejo and gitea allowing a `user`, `repo` and additionally a
340340- `host` url.
341341-- TypeScript declaration for the prelude exports previously missing functions
342342- and classes. Additionally, swaps interfaces for classes and adds missing
343343- attributes to classes.
344344-- `gleam` commands now look in parent directories for a `gleam.toml` file.
345345-346346-### Bug fixes
347347-348348-- Fixed a bug where `gleam add` would not update `manifest.toml` correctly.
349349-- Fixed a bug where `fn() { Nil }()` could generate invalid JavaScript code.
350350-- Fixed a bug where the build tool would make unnecessary calls to the Hex API
351351- when path dependencies are used.
352352-- Fixed a bug where `gleam new` would generate a gitignore with `build` rather
353353- than `/build`.
354354-- Fixed where the types of generic constants could be incorrecly inferred.
355355-- `Utf8Codepoint` has been renamed to `UtfCodepoint` in `prelude.d.mts`.
356356-- Fixed a bug where `gleam deps list` would look in filesystem root instead of
357357- the current directory.
358358-- Fixed a bug with the `isEqual` function in `prelude.js` where RegExps were
359359- being incorrectly structurally compared and being falsely reported as being
360360- equal.
361361-- JavaScript: export from `prelude.d.mts` in `gleam.d.mts` to fix the error:
362362- "Type 'Result' is not generic".
363363-- Not providing a definition after some attributes is now a parse error.
364364-365365-## v0.33.0 - 2023-12-18
366366-367367-## v0.33.0-rc4 - 2023-12-17
368368-369369-- The deprecated bit array options `binary` and `bit_string` have been removed.
370370-- The deprecated ambiguous type import syntax has been removed.
371371-- The deprecated `BitString` type has been removed.
372372-- The deprecated `inspect` functions and `BitString` type has been removed from
373373- the JavaScript prelude.
374374-375375-## v0.33.0-rc3 - 2023-12-17
376376-377377-### Formatter
378378-379379-- The formatter now tries to split long chains of binary operations around the
380380- operator itself, rather than around other elements like lists or function
381381- calls.
382382-383383-### Bug fixes
384384-385385-- Fixed a bug where string prefix aliases defined in alternative case branches
386386- would all be bound to the same constant.
387387-388388-## v0.33.0-rc2 - 2023-12-07
389389-390390-### Language changes
391391-392392-- The `\e` string escape sequence has been removed. Use `\u{001b}` instead.
393393-- Generated Erlang now disabled redundant case clause warnings as these are now
394394- redundant due to exhaustiveness checking.
395395-396396-### Bug fixes
397397-398398-- Fixed a bug where the `\u` string escape sequence would not work with
399399- on Erlang on the right hand side of a string concatenation.
400400-401401-## v0.33.0-rc1 - 2023-12-06
402402-403403-### Formatter
404404-405405-- The formatter now tries to keep a function body and its arguments on a single
406406- line by first trying to split only its last argument on multiple lines.
407407-- Fixed a bug where the formatter would move comments out of blocks.
408408-- `gleam format` now ignores the Gleam build directory by default, even when not
409409- in a git repository.
410410-411411-### Language changes
412412-413413-- Gleam now has full exhaustiveness checking. Exhaustiveness issues have been
414414- downgraded from errors to warnings so that existing Gleam code can be
415415- upgraded to be exhaustive without breaking existing code. In a future version
416416- they will be upgraded to errors.
417417-- The `!` operator can now be used in clause guards.
418418-- The words `auto`, `delegate`, `derive`, `else`, `implement`, `macro`, and
419419- `test` are now reserved for future use. If used they will emit a warning. In
420420- a future version this may be upgraded to an error.
421421-- The `\u{...}` syntax can be used in strings to specify unicode codepoints via a
422422- hexadecimal number with 1 to 6 digits.
423423-- The `todo as` and `panic as` syntaxes now accept an expression that evaluates
424424- to a string rather than just a string literal.
425425-426426-### Build tool changes
427427-428428-- The `gleam run` and `gleam test` commands gain the `-t` flag, which is an
429429- alias of the `--target` flag.
430430-- The `gleam build`, `gleam check`, `gleam run` and `gleam test` commands now
431431- also accept `js` and `erl` as values for the `--target` flag.
432432-- The `gleam new` command now creates packages at version 1.0.0.
433433-- The `gleam publish` command now asks for confirmation if the package being
434434- published is not yet version 1.0.0.
435435-- The `gleam publish` command now asks for confirmation if the package name is
436436- one that implies the package is maintained by the Gleam core team.
437437-- The error messages shown when dependency resolution fails have been improved.
438438-439439-### Compiler WASM API
440440-441441-- The WASM API for the compiler has been rewritten to be simpler.
442442-- The WASM API for the compiler now exposes warnings.
443443-444444-### HTML documentation generator
445445-446446-- Searching in rendered HTML documentation now also matches words that do not
447447- start with the input but do contain it.
448448-449449-### Bug fixes
450450-451451-- Fixed a bug where the JavaScript code generator could generate invalid code
452452- when pretty printing a zero arity function call when the line is over 80
453453- columns wide.
454454-- Fixed a bug where the build directory could be left in an invalid state if
455455- there is Elixir code to compile and running on Windows without permission to
456456- create symlinks.
457457-- Fixed a bug where numbers with preceeding zeros could generate incorrect
458458- JavaScript.
459459-- The Erlang code generated by the `/.` operator no longer generates a warning
460460- for the upcoming negative zero float change in Erlang OTP 27.
461461-- Fixed a bug where using only types from an aliased import, wouldn't stop the
462462- compiler from emitting an unused alias warning for that import.
463463-- Fixed a bug where the formatter would remove the ` as name` from string prefix
464464- patterns.
465465-- Fixed a bug where the formatter would misplace comments at the start of a
466466- block.
467467-- Fixed a bug where using a string prefix pattern in `let assert` would generate
468468- incorrect JavaScript.
469469-470470-## v0.32.4 - 2023-11-09
471471-472472-### Build tool changes
473473-474474-- The build tool now supports rebar3 and mix hex packages where the package name
475475- differs from the otp application name.
476476-477477-### bug fixes
478478-479479-- Fixed a bug where invalid javascript code could be generated when a module
480480- function calls another function that was passed as an argument and the
481481- argument has the same name as the module function.
482482-- Fixed the `target` property of `gleam.toml` being ignored for local path
483483- dependencies by `gleam run -m module/name`
484484-485485-## v0.32.3 - 2023-11-07
486486-487487-### Language changes
488488-489489-- Imported modules can now be discarded by giving them an alias starting with `_`.
490490-491491-### Build tool changes
492492-493493-- New projects are now generated with the call to `gleam format` coming last in
494494- the GitHub Actions workflow. This is so that feedback from tests is presented
495495- even if formatting is incorrect.
496496-- Added Windows support for the `gleam export erlang-shipment` command.
497497-498498-### Bug fixes
499499-500500-- Fixed a bug where some nested pipelines could fail to type check.
501501-502502-## v0.32.2 - 2023-11-03
503503-504504-### Build tool changes
505505-506506-- New Gleam projects are created with `gleam_stdlib` v0.32 and `gleeunit` v1.0.
507507-508508-### Bug fixes
509509-510510-- Fixed a bug where `gleam fix` would not produce correct results for code that
511511- shadowed a prelude name with an import of the same name but a different kind.
512512-- Fixed a bug where documentation would not publish to Hexdocs for packages with
513513- a number in the name.
514514-- Fixed a bug where aliased unqualified types and values of the same name could
515515- produce an incorrect error.
516516-517517-## v0.32.1 - 2023-11-02
518518-519519-### Bug fixes
520520-521521-- Fixed a bug where `gleam fix` would not produce correct results for code that
522522- shadowed a prelude name with an import of the same name but a different kind.
523523-- Fixed a bug where incorrect JavaScript could be generated due to backwards
524524- compatibility with the deprecated import syntax.
525525-526526-## v0.32.0 - 2023-11-01
527527-528528-### Bug fixes
529529-530530-- Fixed a bug where running `gleam fix` multiple times could produce incorrect
531531- results.
532532-533533-## v0.32.0-rc3 - 2023-10-26
534534-535535-### Bug fixes
536536-537537-- Fixed a bug where `gleam fix` would fail to update the deprecated type import
538538- syntax for aliased unqualified types.
539539-540540-## v0.32.0-rc2 - 2023-10-26
541541-542542-### Bug fixes
543543-544544-- Fixed a bug where the backward compatibility for the deprecated import syntax
545545- could result in an import error with some valid imports.
546546-547547-## v0.32.0-rc1 - 2023-10-25
548548-549549-### Language changes
550550-551551-- Using `import module.{TypeName}` to import a type has been deprecated,
552552- replaced by `import module.{type TypeName}`. In a future version of Gleam the
553553- old syntax will only import the value of the same name. Run `gleam fix` to
554554- update your code.
555555-- The `BitString` type has been renamed to `BitArray`. Run `gleam fix` to update
556556- your code.
557557-- The `binary` and `bit_string` bit array modifier have been deprecated in favour
558558- of `bytes` and `bits`.
559559-- The error message for when one element in a list doesn't match the others has
560560- been improved.
561561-- The error message for when the elements of a list's tail don't match the
562562- previous ones has been improved.
563563-- The error message for when one tries to access an unknown field has been
564564- improved.
565565-- The `__gleam_prelude_variant__` property has been removed from the classes
566566- defined in the JavaScript prelude.
567567-- The deprecated `todo("...")` syntax has been removed.
568568-- Module access can now be used in case clause guards.
569569-- The JS target now supports bit syntax for module constants.
570570-- The Erlang compiler will no longer emit a duplicate warning for unused
571571- functions.
572572-- The `@deprecated` attribute can now be used with type definitions.
573573-- A warning is now emitted if a module alias is unused.
574574-575575-### Language server changes
576576-577577-- The language server now has a code action for removing unused items.
578578-- The language server now shows the type of variables defined using `use` on
579579- hover.
580580-581581-### Build tool changes
582582-583583-- The `gleam check` command supports the `target` flag.
584584-- The `gleam fix` command updates code to use `BitArray` rather than `BitString`.
585585-- The `gleam fix` command updates code to use the new import type syntax.
586586-- `gleam fix` sets the `gleam` version constraint in `gleam.toml` to `>= 0.32.0`.
587587-- The `gleam` version constraint field in `gleam.toml` now disregards pre and
588588- build components when checking for compatibility.
589589-- The prelude is no longer rendered once per package when compiling to
590590- JavaScript, instead one copy is rendered for the entire project. If you are
591591- using the `gleam compile-package` API you now need to give a path to the
592592- prelude using the `--javascript-prelude` flag.
593593-- The `gleam export javascript-prelude` and `gleam export typescript-prelude`
594594- commands have been added to export a copy of the prelude. This command may be
595595- useful for build tools that use the compiler via the `gleam compile-package`
596596- API.
597597-- Fixed a bug where some deprecation messages would not be printed.
598598-- The content has been made wider in rendered HTML documentation.
599599-- Dependencies that can be built with both `mix` and `rebar3` are now built
600600- with `mix` if it exists on the system, and with `rebar3` if it doesn't.
601601-602602-### Bug fixes
603603-604604-- "Compiling $package" is now only printed when a package has new changes to
605605- compile.
606606-- The main process started with `gleam run` no longer traps exits on Erlang.
607607-- The formatting of code in rendered HTML documentation has been improved.
608608-- The formatter no longer moves trailing comments out of custom type definitions.
609609-- Fixed a bug where some hexidecimal numbers would generate incorrect Erlang.
610610-- Fixed a bug where markdown tables would not render correctly in HTML
611611- documentation.
612612-- The float 0.0 is now rendered in Erlang as `+0.0` to silence warnings in
613613- Erlang/OTP 27.
614614-615615-## v0.31.0 - 2023-09-25
616616-617617-- New Gleam projects are created with `gleam_stdlib` v0.31, `actions/checkout`
618618- v3.\*, and `erlef/setup-beam` v1.\*.
619619-- A note is included in the generated HTML documentation if a function is
620620- deprecated.
621621-622622-## v0.31.0-rc1 - 2023-09-18
623623-624624-- The `@deprecated("...")` attribute can be used to mark a function as
625625- deprecated. This will cause a warning to be emitted when the function is used.
626626-- A warning is now emitted if a module from a transitive dependency is imported.
627627-- Record access can now be used in case clause guards.
628628-- Fixed a bug where `manifest.toml` could contain absolute paths for path
629629- dependencies.
630630-- The `as` keyword can now be used to assign the literal prefix to a variable
631631- when pattern matching on a string.
632632-- The `if` conditional compilation, `external fn`, and `external type` syntaxes
633633- have been removed.
634634-- The `description` flag for the `gleam new` command has been removed.
635635-- The highlight.js grammar included with generated HTML documentation has been
636636- updated for the latest syntax.
637637-- Packages are no longer precompiled to Erlang when publishing to Hex if the
638638- package target is set to JavaScript.
639639-- An exception is now raised if JavaScript code uses the `BitString` class
640640- constructor and passes in the incorrect argument type.
641641-- Fixed a bug where mutually recursive functions could be incorrectly inferred
642642- as having an overly general type.
643643-- Fixed a bug where recursive type constructors could incorrectly infer a type
644644- error.
645645-- Fixed a bug where some mutually recursive functions would be inferred as
646646- having too general a type.
647647-- Fixed a bug where constants where not being correctly inlined when used in the
648648- size option of a bit string pattern match.
649649-- Fixed a bug where anonymous functions could parse successfully when missing a
650650- body.
651651-- Fixed a bug where incorrect unused variable warnings could be emitted for code
652652- that doesn't type check.
653653-- Fixed a bug where packages defaulting to the JavaScript target could have
654654- modules missing from their HTML documentation when published.
655655-- Corrected some outdated links in error messages.
656656-- Hovering over a function definition will now display the function signature,
657657- or the type of the hovered argument.
658658-- Use `import type` for importing types from typescript declarations.
659659-- Use `.d.mts` extension for typescript declarations to match `.mjs`.
660660-- Prefix module names with dollar sign in typescript to avoid name collisions.
661661-662662-## v0.30.4 - 2023-07-26
663663-664664-- External implementations are always referenced directly in generated code, to
665665- avoid the overhead of an extra function call.
666666-- Fixed a bug where the compiler could infer incorrect generic type parameters
667667- when analysing a module without type annotations with self recursive
668668- functions that reference themselves multiple times.
669669-670670-## v0.30.3 - 2023-07-23
671671-672672-- Fixed a bug where JavaScript module path such as `node:fs` would be rejected.
673673-- New Gleam projects are created with `gleam_stdlib` v0.30, Erlang OTP v26.0.2,
674674- Elixir v1.15.4, actions/checkout v3.5.1, and erlef/setup-beam v1.16.0.
675675-676676-## v0.30.2 - 2023-07-20
677677-678678-- Fixed a bug where the compiler could infer incorrect generic type parameters
679679- when analysing a module without type annotations with self recursive
680680- functions.
681681-- Fixed a bug where the formatter would incorrectly format external functions
682682- by breaking the return annotation instead of the function arguments.
683683-684684-## v0.30.1 - 2023-07-13
685685-686686-- Fixed a bug where the language server could fail to import path dependencies
687687- in monorepos.
688688-689689-## v0.30.0 - 2023-07-12
690690-691691-- A warning is now emitted for the deprecated external fn syntax.
692692-693693-## v0.30.0-rc4 - 2023-07-10
694694-695695-- An error is now emitted for invalid JavaScript external implementations.
696696-- Fixed a bug where Erlang external implementations could generate invalid code.
697697-698698-## v0.30.0-rc3 - 2023-07-05
699699-700700-- Fixed a bug where `gleam fix` would fail to parse command line flags.
701701-702702-## v0.30.0-rc2 - 2023-07-03
703703-704704-- Fixed a bug where `gleam fix` would merge external functions of the same name
705705- but incompatible types.
706706-- Fixed a bug where external function arguments would incorrectly be marked as
707707- unused.
708708-709709-## v0.30.0-rc1 - 2023-06-29
710710-711711-- The new `@target(erlang)` and `@target(javascript)` attribute syntax has been
712712- added for conditional compilation. The existing `if` conditional compilation
713713- syntax has been deprecated. Run `gleam fix` to update your code.
714714-- The new `type TypeName` syntax syntax replaces the `external type TypeName`
715715- syntax. The existing external type syntax has been deprecated. Run `gleam format`
716716- to update your code.
717717-- Adding a new dependency now unlocks the target package. This helps avoid
718718- failing to find a suitable version for the package due to already being
719719- locked.
720720-- A custom message can now be specified for `panic` with `panic as "..."`.
721721-- The syntax for specifying a custom message for `todo` is now `todo as "..."`.
722722-- The Erlang error raised by `let assert` is now tagged `let_assert`.
723723-- Types named `Dynamic` are now called `dynamic_` in Erlang to avoid a clash
724724- with the new Erlang `dynamic` type introduced in OTP26.
725725-- Dependencies can now be loaded from paths using the
726726- `packagename = { path = "..." }` syntax in `gleam.toml`.
727727-- The `javascript.deno.unstable` field in `gleam.toml` can now be used to
728728- enable Deno's unstable APIs when targeting JavaScript.
729729-- Blockquotes are now styled in rendered HTML documentation.
730730-- The `gleam` property can be set in `gleam.toml` can be set to a version
731731- requirement to specify the version of Gleam required to build the project.
732732-- Type aliases can now refer to type aliases defined later in the same module.
733733-- Fixed a bug where unapplied record constructors in constant expressions would
734734- generate invalid Erlang.
735735-- Fixed a bug where the prescedence of `<>` and `|>` would clash.
736736-- Fixed a bug where `gleam docs build` would print an incorrect path upon
737737- completion.
738738-- Warnings from dependency packages are no longer surfaced in the language
739739- server.
740740-- A warning is now emitted when a Gleam file is found with an invalid name.
741741-- A warning is now emitted when using `list.length` to check for the empty list,
742742- which is slow compared to checking for equality or pattern matching (#2180).
743743-- The new `gleam remove <package_name>` can be used to remove dependencies
744744- from a Gleam project.
745745-- Fixed a bug where the formatter could crash.
746746-- Fixed a bug where invalid Erlang would be generated when piping into `panic`.
747747-- The `gleam docs build` command gains the `--open` flag to open the docs after
748748- they are generated (#2188).
749749-- Fixed a bug where type annotations for constants could not be written with
750750- type annotations.
751751-- Updated font loading in generated HTML documentation to fix an issue with
752752- fonts not loading properly in some browsers (#2209).
753753-754754-## v0.29.0 - 2023-05-23
755755-756756-- New projects now require `gleam_stdlib` v0.29.
757757-758758-## v0.29.0-rc2 - 2023-05-22
759759-760760-- The `gleam lsp` command is no longer hidden from the help output.
761761-- Fixed a bug where some language server clients would show autocompletion
762762- suggestions too eagerly.
763763-764764-## v0.29.0-rc1 - 2023-05-16
765765-766766-- The language server will now provide autocomplete suggestions for types and
767767- values either imported or defined at the top level of the current module.
768768-- Fixed a bug where record patterns using the spread operator (`..`) to discard
769769- unwanted arguments would not type check correctly when the record had no
770770- labelled fields.
771771-- Add support for using sized binary segments in pattern matches when targeting
772772- JavaScript.
773773-- A warning is now emitted for double unary negation on ints (`--`) and bools
774774- (`!!`) as this does nothing but return the original value.
775775-- Previously the build tool would discard the entire build directory when dependencies
776776- were changed. Now it will only discard the build artefacts for removed
777777- dependencies.
778778-- The errors emitted when a name is reused in a module have been made clearer.
779779-- Fixed an incorrect URL in the error message for failing to parse a let binding
780780- with a type annotation.
781781-- Fixed a bug where shadowing a prelude type name could result in incorrect
782782- errors in exhaustiveness checking.
783783-- Fixed a bug where the language server would in some scenarios not remove an
784784- error diagnostic after it becomes outdated.
785785-- Fixed a bug where the formatter would incorrectly format blocks with a comment
786786- before them that were the only argument to a function call.
787787-- Fixed a bug where the language server would not reset the build directory when
788788- it was created by a different version of Gleam.
789789-- New Gleam projects are created with `erlef/setup-beam@v1.15.4` in their GitHub
790790- actions CI configuration.
791791-- Running a module now uses the dependency's target and runtime in its `gleam.toml`.
792792-793793-## v0.28.3 - 2023-04-17
794794-795795-- Fixed a bug where the language server would show outdated error diagnostics
796796- when a new one was emitted in a different module.
797797-- Fixed a bug where the language server would attempt to analyse Gleam modules
798798- that were outside of the `src` or `test` directories.
799799-- New Gleam projects are created with `actions/checkout@v3.5.1` and
800800- `erlef/setup-beam@1.15.3` in their GitHub actions CI configuration.
801801-802802-## v0.28.2 - 2023-04-10
803803-804804-- Fixed a bug where comments above a `use` expression would be formatted
805805- incorrectly.
806806-- Fixed a bug where the formatter would fail to preserve empty lines after a
807807- block.
808808-- Fixed a bug where the formatter would fail to preserve empty lines after an
809809- anonymous function with a return annotation.
810810-811811-## v0.28.1 - 2023-04-05
812812-813813-- Fixed a bug where the language server would unset too many error diagnostics
814814- when multiple projects are open, more than one have errors, and one of them is
815815- successfully compiled.
816816-- Fixed a bug where the language server would unset error diagnostics when
817817- displaying information on hover.
818818-- Added support for type annotations in use statements.
819819-820820-## v0.28.0 - 2023-04-03
821821-822822-- New projects now require `gleam_stdlib` v0.28.
823823-824824-## v0.28.0-rc3 - 2023-03-31
825825-826826-- Fixed a bug where source links would be incorrect in HTML documentation.
827827-828828-## v0.28.0-rc2 - 2023-03-27
829829-830830-- Fixed a bug where single statement blocks inside binary operators could
831831- generate invalid JavaScript.
832832-- Fixed a bug where the formatter could incorrectly place comments.
833833-- Fixed a bug where the language server would show outdated diagnostics when a
834834- file with an error reverts to the previous valid version, causing the compiler
835835- to use the cached version of the file.
836836-837837-## v0.28.0-rc1 - 2023-03-26
838838-839839-- The language server now analyzes files on edit rather than on save, providing
840840- feedback faster.
841841-- The language server now supports editor sessions that span multiple projects.
842842- This is useful for mono-repos and projects with both a frontend and backend in
843843- Gleam.
844844-- The language server now also shows documentation on hover for expressions.
845845-- The language server now shows types and documentation on hover for patterns.
846846-- Added support for negation of integers with the new `-` unary operator.
847847-- Variable assignments are now only permitted within a function or a block, not
848848- anywhere that an expression is permitted.
849849-- The deprecated `try` expression has been removed.
850850-- The deprecated `assert ... = ...` syntax has been removed.
851851-- Semicolons are no longer whitespace. An error will be emitted if one is
852852- encountered.
853853-- Warnings are now immediately emitted rather than being buffered until the end
854854- of the compilation.
855855-- The `--warnings-as-errors` flag is now supported by `gleam build`.
856856-- Blocks are now preserved by the formatter when they only have a single
857857- expression within them.
858858-- Generated docs now export more meta data to improve the developer experience,
859859- accessibility and search engine discoverability.
860860-- Files are now only recompiled if they have changed since the last compilation,
861861- detected by file hash and modification time. Previously only the modification
862862- time was used.
863863-- Autocompletion of module imports was removed due to a buggy implementation.
864864-- Fixed a bug where the formatter would incorrectly remove `{ ... }` from bit
865865- string segment value expressions.
866866-- Fixed a bug where TypeScript type definitions files could include incorrect
867867- type names.
868868-- Fixed a bug where the compiler used VSCode specific behaviour in the language
869869- server which was incompatible with Helix.
870870-- Fixed a bug where string concatenation patterns on strings with escape
871871- characters would generate javascript code with wrong slice index.
872872-- Fixed a bug where blocks could parse incorrectly.
873873-- Allow modules to be run with the `gleam run --module` command.
874874-875875-## v0.27.0 - 2023-03-01
876876-877877-- Fixed a bug where `panic` could generate incorrect JavaScript code.
878878-- New projects now require `gleam_stdlib` v0.27.
879879-880880-## v0.27.0-rc1 - 2023-02-26
881881-882882-- The new `panic` keyword can be used to crash the program. This may be useful
883883- for situations in which a program has got into an unrecoverable invalid state.
884884-- `try` expressions are now deprecated and will be removed in a future version.
885885-- The new `gleam fix` command can be used to automatically convert `try`
886886- expressions to `use` expressions.
887887-- `let assert ... = ...` is now the syntax for assertion assignments. The
888888- `assert ... = ...` syntax is deprecated and will be removed in a future
889889- version. Run `gleam format` to automatically update your code.
890890-- `gleam export hex-tarball` can be used to create a tarball suitable for
891891- uploading to a Hex compatible package repository.
892892-- The unused private type and constructor detection has been improved.
893893-- The argument `--runtime` now accepts `nodejs` as the name for that runtime.
894894- The previous name `node` is still accepted.
895895-- Patterns can now be used in `use` expressions.
896896-- Fixed a bug where string concatenation patterns could generate javascript
897897- code with wrong slice index due to ut8/ut16 length mismatch.
898898-- The Erlang compiler will no longer emit a duplicate warning for unused
899899- variables.
900900-- Fixed a bug where typescript type definitions for types with unlabelled
901901- arguments where generated with an invalid identifier and unlabelled fields
902902- were generated with a name that didn't match the javascript implementation.
903903-- Fixed a bug in the type inferrer were unannotated functions that were
904904- used before they were defined in a module could in rare cased be inferred
905905- with a more general type than is correct.
906906-- Fixed a bug where the LSP would fail to show type information on hover for
907907- expressions after a use expression.
908908-- Fixed a bug where imported constants could generated incorrect JavaScript
909909- code.
910910-- Fixed a bug where the LSP would perform codegen for dependencies.
911911-- Fixed a bug where the LSP would compile native dependencies needlessly.
912912-- Fixed a bug where integer division with large numbers on JavaScript could
913913- produce incorrect results.
914914-- Fixed a bug where pattern matches on custom types with mixed labelled and
915915- unlabelled arguments could not be compiled when targeting JavaScript.
916916-- Fixed a bug where local variables in case guard constant expressions caused
917917- the compiler to panic.
918918-- The formatter now truncates meaningless zeroes of floats' fractional parts.
919919-- Anonymous functions may now have an empty body. The compiler will emit a
920920- warning for functions without a body, and these functions will crash at
921921- runtime if executed.
922922-- Fixed bug where raised errors on JS would have an extra stack frame recorded
923923- in them.
924924-925925-## v0.26.2 - 2023-02-03
926926-927927-- The formatter now wraps long `|` patterns in case clauses over multiple lines.
928928-- Fixed a bug where unlabelled function arguments could be declared after
929929- labelled ones.
930930-- A broken link was removed from the error messages.
931931-- Fixed a bug where using a qualified imported record constructor function as a
932932- value would produce invalid Erlang code if the name of the record variant was
933933- an Erlang reserved word.
934934-935935-## v0.26.1 - 2023-01-22
936936-937937-- New projects now require `gleeunit` v0.10.
938938-- Rebar3 dependency projects are now compiled in-place. This fixes an issue
939939- where some NIF using projects would fail to boot due to some paths not being
940940- copied to the `build` directory.
941941-- An error is now emitted if a list spread expression is written without a tail
942942- value.
943943-- An error is now emitted when a function is defined with multiple arguments
944944- with the same name.
945945-- The error message emitted when a `let` does not match all possible values has
946946- been improved.
947947-- Fixed a bug where the language server wouldn't analyse test code.
948948-- Fixed a bug where `assert` expressions can generate invalid Erlang.
949949- warning.
950950-- Fixed a bug where arguments would be passed incorrectly to Deno.
951951-- Fixed a bug where defining variables that shadow external functions could
952952- generate invalid JavaScript.
953953-954954-## v0.26.0 - 2023-01-19
955955-956956-[Release blog post](https://gleam.run/news/v0.26-incremental-compilation-and-deno/)
957957-958958-- New projects require `gleam_stdlib` v0.26 and `gleeunit` v0.9.
959959-- Fixed a bug where JavaScript default projects would fail to publish to Hex.
960960-961961-## v0.26.0-rc1 - 2023-01-12
962962-963963-- Added support for Deno runtime for JavaScript target.
964964-- Scientific notation is now available for float literals.
965965-- The compiler now supports incremental compilation at the module level. If a
966966- module or its dependencies have not been changed then it will not be
967967- recompiled.
968968-- The format used by the formatter has been improved.
969969-- 4 digit integers are now always formatted without underscores.
970970-- Running `gleam new` will skip `git init` if the new project directory is
971971- already part of a git work tree.
972972-- Generated HTML documentation now includes all static assets, including web
973973- fonts, so that it can be accessed offline and in future once CDNs would 404.
974974-- Generated HTML documentation now supports TypeScript syntax highlighting.
975975-- New Gleam projects are created using GitHub actions erlef/setup-beam@v1.15.2.
976976-- Some modules can now be hidden from the docs by specifying a list of glob
977977- patterns in `internal_modules` in `gleam.toml`. The default value for this
978978- list is `["$package_name/internal", "$package_name/internal/*"]`.
979979-- The `gleam new` command gains the `--skip-git` flag to skip creation of
980980- `.git/*`, `.gitignore` and `.github/*` files.
981981-- The `gleam new` command gains the `--skip-github` flag to skip creation of
982982- `.github/*` files.
983983-- Fixed a bug where no error would be emitted if a `src` module imported a
984984- `test` module.
985985-- Fixed a bug where comments in list prepending expressions could be formatted
986986- incorrectly.
987987-- Fixed a bug where comments in record update expressions could be formatted
988988- incorrectly.
989989-- Fixed a bug where long `use` expressions could be formatted incorrectly.
990990-- Fixed a bug integer multiplication would overflow large integers when
991991- compiling to JavaScript.
992992-- Fixed `int` and `float` formatting in `const`s and patterns.
993993-- Fixed a bug where piping into a function capture expression with a pipe as one
994994- of the arguments would produce invalid Erlang code.
995995-- Formatter no longer removes new lines in expression blocks within case branches
996996-997997-## v0.25.3 - 2022-12-16
998998-999999-- 4 digit integers are no longer automatically formatted with underscores.
10001000-10011001-## v0.25.2 - 2022-12-16
10021002-10031003-- Updated `actions/checkout` from `actions/checkout@v3.0.0` to `@v3.2.0` for
10041004- projects created via `gleam new`.
10051005-- Fixed a bug where `gleam new` would set a `Rebar3` version to `25.1`
10061006- instead of the latest stable `3`.
10071007-- Updated following runtime versions set via `gleam new`: `Erlang/OTP`
10081008- to `25.2`, and `Elixir` to `1.14.2`.
10091009-- The formatter now inserts underscores into larger `Int`s and the larger
10101010- integer parts of `Float`s.
10111011-- Added support for top level TypeScript file inclusion in builds.
10121012-- The build tool will now favour using rebar3 over Mix for packages that support
10131013- both. This fixes an issue where some packages could not be compiled without
10141014- Elixir installed even though it is not strictly required.
10151015-10161016-## v0.25.1 - 2022-12-11
10171017-10181018-- New Gleam projects are now configured to explicitly install rebar3 using
10191019- GitHub actions erlef/setup-beam.
10201020-- A better error message is now shown when attempting to use a function within a
10211021- constant expression.
10221022-- Changed float size limit in bit string expressions to 16, 32 or 64, when static.
10231023- Also allowed dynamic size.
10241024-- New Gleam projects are created using GitHub actions erlef/setup-beam@v1.15.0.
10251025-- Fixed a bug where returning an anonymous function from a pipeline and calling
10261026- it immediately without assigning it to a variable would produce invalid Erlang
10271027- code.
10281028-- Fixed a bug where the formatter would remove the braces from negating boolean
10291029- expressions.
10301030-10311031-## v0.25.0 - 2022-11-24
10321032-10331033-[Release blog post](https://gleam.run/news/v0.25-introducing-use-expressions/)
10341034-10351035-## v0.25.0-rc2 - 2022-11-23
10361036-10371037-- Fixed a bug where Gleam dependency packages with a `priv` directory could fail
10381038- to build.
10391039-- Fixed a regression where Elixir and Erlang Markdown code blocks in generated
10401040- documentation would not be highlighted.
10411041-10421042-## v0.25.0-rc1 - 2022-11-19
10431043-10441044-- Generated HTML documentation now includes the `theme-color` HTML meta tag.
10451045-- The `use` expression has been introduced. This is a new syntactic sugar that
10461046- permits callback using code to be written without indentation.
10471047-- Nightly builds are now also published as OCI container images hosted on
10481048- GitHub.
10491049-- Fixed a bug where the build tool would not hook up stdin for Gleam programs it
10501050- starts.
10511051-- Fixed a bug where using a record constructor as a value could generate a
10521052- warning in Erlang.
10531053-- Fixed a bug where the build tool would use precompiled code from Hex packages
10541054- rather than the latest version, which could result in incorrect external
10551055- function usage in some cases.
10561056-- Fixed a bug where the warning for `todo` would not print the type of the code
10571057- to complete.
10581058-- Fixed a bug where `try` expressions inside blocks could generate incorrect
10591059- JavaScript.
10601060-- Generated HTML documentation now includes all static assets (but the web
10611061- fonts), so that it can be accessed offline or in far future once CDNs would 404.
10621062-- New Gleam projects are created using GitHub actions erlef/setup-beam@v1.14.0
10631063-- The `javascript.typescript_declarations` field in `gleam.toml` now applies to
10641064- the entire project rather than just the top level package.
10651065-- The formatter now adds a `0` to floats ending with `.` (ie `1.` => `1.0`).
10661066-- New projects require `gleam_stdlib` v0.25.
10671067-10681068-## 0.24.0 - 2022-10-25
10691069-10701070-[Release blog post](https://gleam.run/news/gleam-v0.24-released/)
10711071-10721072-## 0.24.0-rc4 - 2022-10-23
10731073-10741074-- Fixed a bug where the string concatenate operator could produce invalid Erlang
10751075- code when working with pipe expressions.
10761076-10771077-## 0.24.0-rc3 - 2022-10-20
10781078-10791079-- Fixed a bug where the OOP method call error hint would be shown on too many
10801080- errors.
10811081-- Fixed a bug where the string concatenate operator could produce invalid Erlang
10821082- code when working with constant values.
10831083-10841084-## 0.24.0-rc2 - 2022-10-18
10851085-10861086-- Fixed a bug where imported and qualified record constructors used in constant
10871087- expressions could fail to resolve.
10881088-10891089-## 0.24.0-rc1 - 2022-10-15
10901090-10911091-- Gleam can now compile Elixir files within a project's `src` directory.
10921092-- The `<>` operator can now be used for string concatenation and for string
10931093- prefix pattern matching.
10941094-- Fixed a bug where TypeScript definitions may have incorrect type parameters.
10951095-- New projects depend on `gleam_stdlib` v0.24.
10961096-- New projects' GitHub Actions config specifies Erlang/OTP 25.1 and suggest
10971097- Elixir 1.14.1.
10981098-- If you attempt to use the method call syntax (`thing.method()`) on a value
10991099- without that field the error message will now include a hint explaining that
11001100- Gleam is not object oriented and does not have methods.
11011101-- Fixed a bug in the formatter where multiple line documentation comments for
11021102- custom type constructor fields could be formatted incorrectly.
11031103-- Fixed a bug where tail call optimisation could be incorrectly applied when
11041104- compiling to JavaScript in some situations.
11051105-- Fixed a bug where the remainder operator would return NaN results when the
11061106- right hand side was zero when compiling to JavaScript.
11071107-- Fixed a bug where Elixir dependencies would fail to compile on Windows.
11081108-- Fixed a bug where images added to HTML documentation via documentation
11091109- comments would not have a max width.
11101110-11111111-## v0.23.0 - 2022-09-15
11121112-11131113-[Release Blog Post](https://gleam.run/news/gleam-v0.23-released/)
11141114-11151115-## v0.23.0-rc2 - 2022-09-15
11161116-11171117-- New Gleam projects are created using GitHub actions erlef/setup-beam@v1.13.0
11181118- and actions/checkout@v3.0.0.
11191119-- New Gleam projects are created using version v0.23.0 of the stdlib.
11201120-- Fixed a bug where LSP hovering would fail to locate the expression.
11211121-11221122-## v0.23.0-rc1 - 2022-09-01
11231123-11241124-- Gleam can now build dependency packages that are managed using Mix.
11251125-- Compiler performance has been improved by buffering disc writing and by lazily
11261126- loading TLS certs. In testing this doubles performance when compiling the
11271127- standard library.
11281128-- The `gleam publish` command now adds the `priv` directory and any `NOTICE`
11291129- file to the tarball.
11301130-- The `gleam update` command can now be used to update dependency packages to
11311131- their latest versions.
11321132-- Module functions with empty bodies are no longer syntax errors.
11331133-- The format used by the formatter has been improved.
11341134-- OpenSSL swapped out for RustTLS.
11351135-- Generated HTML documentation now includes a search bar.
11361136-- The LSP will now provide autocompletion for imports.
11371137-- A helpful error message is now returned when assignments are missing either a
11381138- keyword or a value.
11391139-- Qualifiers are now used when multiple types have the same name in an error
11401140- message.
11411141-- In JavaScript, if an object has defined an `equals` method in its prototype,
11421142- Gleam will now use this method when checking for equality.
11431143-- Functions can now be defined and referenced in constant expressions.
11441144-- An error is now raised if the record update syntax is used with a custom type
11451145- that has multiple constructors.
11461146-- An error is now raised if a module is imported multiple times.
11471147-- Fixed a bug where defining a type named `CustomeType` would product invalid
11481148- JavaScript.
11491149-- Fixed a bug where defining a variable with the same name as an unqualified
11501150- import would produce invalid JavaScript.
11511151-- Fixed a bug where piping to `todo` would generate invalid Erlang code.
11521152-- Fixed a bug where inspecting a JavaScript object with a null prototype would
11531153- crash.
11541154-- Fixed a bug where the formatter could crash if source code contained 3 or more
11551155- empty lines in a row.
11561156-- Fixed a bug where the formatter would remove braces from blocks used as the
11571157- subject of a case expression.
11581158-- Fixed a bug alternative patterns with a clause containing a pipe with a pipe
11591159- after the case expresson could render incorrect Erlang.
11601160-- Fixed a bug where formatter would strip curly braces around case guards even
11611161- when they are required to specify boolean precedence.
11621162-- Fixed a bug where `gleam new` would in some situations not validate the
11631163- target directory correctly.
11641164-- Fixed a bug where pipes inside record update subjects could generate invalid
11651165- Erlang.
11661166-- Fixed a bug where pipes inside record access could generate invalid Erlang.
11671167-11681168-## v0.22.1 - 2022-06-27
11691169-11701170-- The `gleam publish` confirmation prompt now accepts both "Y" and "y".
11711171-- Fixed a bug where `todo` would not emit the correct line number to the LSP while.
11721172-11731173-## v0.22.0 - 2022-06-12
11741174-11751175-[Release Blog Post](https://gleam.run/news/gleam-v0.22-released/)
11761176-11771177-- New projects are created with `gleam_stdlib` v0.22.
11781178-11791179-## v0.22.0-rc1 - 2022-06-12
11801180-11811181-- Fixed a bug where doc comments would dissociate from their statements when
11821182- generating html documentation.
11831183-- You are now allowed to use named accessors on types with multiple constructors if the
11841184- accessor's name, position and type match (among the constructors) (#1610).
11851185-- Added the ability to replace a release up to one hour after it is published
11861186- using `gleam publish --replace`.
11871187-- `gleam publish`, `gleam docs publish`, `gleam docs remove`, `gleam hex retire`,
11881188- and `gleam hex unretire` now have access to environment variables for
11891189- username (default key `HEXPM_USER`) and password (default key `HEXPM_PASS`)
11901190-- The `gleam publish` command gains the `-y/--yes` flag to disable the "are you
11911191- sure" prompt.
11921192-- Clear outdated files from the build directory after compilation.
11931193-- Fixed a bug where immediately calling the value that a case expression
11941194- evaluates to could generate invalid JavaScript.
11951195-- Fixed a bug where the default project target is set to JavaScript,
11961196- but the project would run on target Erlang instead.
11971197-- The compiler is now able to generate TypeScript declaration files on target
11981198- JavaScript (#1563). To enable this edit `gleam.toml` like so:
11991199-12001200- ```toml
12011201- [javascript]
12021202- typescript_declarations = true
12031203- ```
12041204-12051205-- Fixed a bug where argument labels were allowed for anonymous functions.
12061206-- Fixed a bug where JavaScript code could be invalid if a variable is defined
12071207- inside an anonymous function with a parameter with the same name as the
12081208- variable.
12091209-- Fixed a bug where importing a JavaScript function named "then" could produce
12101210- invalid code.
12111211-- Fixed a bug where constants that reference locally defined custom types could
12121212- render invalid JavaScript.
12131213-- The project generator will no longer permit use of the reserved `gleam_`
12141214- prefix.
12151215-- Generated HTML docs easter egg updated.
12161216-- `gleam export erlang-shipment` can be used to create a directory of compiled
12171217- Erlang bytecode that can be used as a deployment artefact to get your
12181218- application live.
12191219-- `gleam format` will now preserve (up to one) empty lines between consecutive
12201220- comments, as well as between comments and any following expression
12211221-- The deprecated rebar3 integration has been removed.
12221222-- Fixed a bug where `gleam format` would output an unwanted newline at the top
12231223- of documents that only contain simple `//` comments.
12241224-- No longer add `dev-dependencies` to generated `.app` Erlang files unless
12251225- we're compiling the root project (#1569).
12261226-- Fixed a bug where the formatter could render a syntax error with lists on long
12271227- unbreakable lines.
12281228-- Fixed a bug where JavaScript variable names could be incorrectly reused.
12291229-- Fixed a bug where `gleam format` would remove the braces around a tuple index
12301230- access when accessing a field of the returned element.
12311231-- Fixed a bug case clause guards could render incorrect JavaScript if a variable
12321232- name was rebinded in the clause body.
12331233-- The `gleam compile-package` command no longer generates a `.app` file. This
12341234- should now be done by the build tool that calls this command as it is
12351235- responsible for handling dependencies.
12361236-- Fixed a bug where piping a list tail would create invalid Erlang code (#1656).
12371237-12381238-## v0.21.0 - 2022-04-24
12391239-12401240-[Release Blog Post](https://gleam.run/news/v0.21-introducing-the-gleam-language-server/)
12411241-12421242-- New projects are created with `gleam_stdlib` v0.21.
12431243-12441244-## v0.21.0-rc2 - 2022-04-20
12451245-12461246-- Added the ability to replace a release up to one hour after it is published
12471247- using `gleam publish --replace`.
12481248-- The language server will now enter a degraded mode that only performs
12491249- formatting if running in a directory that is not a Gleam project with a
12501250- `gleam.toml`.
12511251-12521252-## v0.21.0-rc1 - 2022-04-16
12531253-12541254-- The Gleam language server is here! This will provide IDE like features for
12551255- code editors that support LSP, including but not limited to VSCode, Neovim,
12561256- Emacs, Eclipse, Visual Studio, and Atom. This first version includes these
12571257- features:
12581258- - Project compilation.
12591259- - Inline errors and warnings.
12601260- - Type information on hover.
12611261- - Go-to definition.
12621262- - Code formatting.
12631263-- Fixed a bug in generated JavaScript code where functions named `then` would
12641264- cause errors when dynamically imported.
12651265-- Initialize `git` repo when creating a new project.
12661266-- Log messages controlled with `GLEAM_LOG` now print to standard error.
12671267-- Log message colours can be disabled by setting the `GLEAM_LOG_NOCOLOUR`
12681268- environment variable.
12691269-- You can now specify multiple packages when using `gleam add`.
12701270-- Bools can now be negated with the `!` unary operator.
12711271-- If the compiler version changes we now rebuild the project from scratch on
12721272- next build command to avoid issues arising from reading metadata in an old
12731273- format (#1547).
12741274-- Updated the "Unknown label" error message to match other error messages
12751275- (#1548).
12761276-- Type holes are now permitted in function arguments and return annotations
12771277- (#1519).
12781278-- Unused module imports now emit a warning (#1553).
12791279-- The error message for failing to parse a multiline clauses without curly
12801280- braces has been improved with a hint on how to fix the issue (#1555).
12811281-- The error messages for when rebar3 or Erlang are missing from the machine has
12821282- been improved with a tip on how to install them (#1567).
12831283-- Corrected the hint given with certain int and float binary operator type
12841284- errors.
12851285-- Add support for `int` and `float` bit string type when compiling to JavaScript.
12861286-- Add support for specifying size of integers in a bit string. Supports only exact binaries,
12871287- i.e. length is a multiple of 8.
12881288-- Fixed compilation of rebar3 based dependencies on Windows.
12891289-12901290-## v0.20.1 - 2022-02-24
12911291-12921292-- The type checker has been improved to enable use of the record access syntax
12931293- (`record.field`) in anonymous functions passed into higher order functions
12941294- without additional annotations.
12951295-12961296-## v0.20.0 - 2022-02-23
12971297-12981298-[Release Blog Post](https://gleam.run/news/gleam-v0.20-released/)
12991299-13001300-- New projects are created with `gleam_stdlib` v0.20.
13011301-13021302-## v0.20.0-rc1 - 2022-02-20
13031303-13041304-- Type unification errors involving user annotated types now refer to the names
13051305- specified by the user instead of internal rigid-type ids.
13061306-- The build tool now validates that listed licenses are valid SPDX expressions.
13071307-- A WebAssembly version of the compile is now available for use in JavaScript
13081308- and other WebAssembly environments.
13091309-- New projects include Hex badges and a link to Hexdocs.
13101310-- Enhance type mismatch errors in the presence of try.
13111311-- Enhance type mismatch error for an inconsistent try.
13121312-- Enhance type mismatch error for pipe expressions to show the whole pipeline
13131313- and not only its first line.
13141314-- Fixed a bug where sometimes type variable could be reused result in incorrect
13151315- non-deterministic type errors.
13161316-- Built in support for the Mix build tool has been removed. The `mix_gleam`
13171317- plugin is to be used instead.
13181318-- Introduce a limited form of exhaustiveness checking for pattern matching
13191319- of custom types, which only checks that all constructor tags are covered
13201320- at the top level of patterns.
13211321-- The `ebin` directory is now copied to the build directory for rebar3 managed
13221322- dependencies if present before compilation.
13231323-- The format used by the formatter has been improved.
13241324-- Package names in `gleam.toml` are validated when the config is read.
13251325-- The `priv` directory is linked into the build directory for Gleam projects
13261326- managed by the build tool.
13271327-- Fixed a bug where type errors from pipes could show incorrect information.
13281328-- Fixed a bug where types could not be imported if they had the same name as a
13291329- value in the prelude.
13301330-13311331-## v0.19.0 - 2022-01-12
13321332-13331333-Dedicated to the memory of Muhammad Shaheer, a good and caring man.
13341334-13351335-[Release Blog Post](https://gleam.run/news/gleam-v0.19-released/)
13361336-13371337-## v0.19.0-rc4 - 2022-01-10
13381338-13391339-- New projects are created with `gleam_stdlib` v0.19 and `gleeunit` v0.6.
13401340-- Fixed a bug where external functions could be specified with the wrong module
13411341- name in generated Erlang when imported from a nested module in another
13421342- package.
13431343-- Fixed a bug where warnings wouldn't get printed.
13441344-13451345-## v0.19.0-rc3 - 2022-01-07
13461346-13471347-- Fixed a bug where precompiled packages would fail to compile due to Erlang
13481348- files being compiled twice concurrently.
13491349-13501350-## v0.19.0-rc2 - 2022-01-06
13511351-13521352-- Erlang modules are now compiled in a multi-core fashion.
13531353-- New projects are created with `erlef/setup-beam` v1.9.0 instead of
13541354- `gleam-lang/setup-erlang` and `gleam-lang/setup-gleam`.
13551355-- Fixed a bug where tail call optimisation could generate incorrect code when
13561356- the function has argument names that are JavaScript keywords.
13571357-- Fixed a bug where the build would continue when dependency packages failed to
13581358- compile.
13591359-- Fixed a bug where `include` directories would not be accessible by the Erlang
13601360- compiler during Gleam compilation.
13611361-13621362-## v0.19.0-rc1 - 2022-01-03
13631363-13641364-- The build tool now supports the JavaScript target. The target can be specified
13651365- in either `gleam.toml` or using the `--target` flag.
13661366-- The `gleam check` command has been introduced for rapidly verifying the types
13671367- of Gleam code without performing codegen.
13681368-- `true` and `false` can no longer be used as pattern matching variables, to
13691369- avoid accidental uses of incorrect syntax that is popular in other languages.
13701370- An error will hint about using Gleam's `True` and `False` values instead.
13711371-- You can now remove build artifacts using the new `gleam clean` command.
13721372-- The `compile-package` can now generate `package.app` files and compile source
13731373- modules to `.beam` bytecode files.
13741374-- The flags that `compile-package` accepts have changed.
13751375-- Published Hex packages now include precompiled Erlang files.
13761376-- Erlang record headers are now written to the `include` directory within the
13771377- package build directory.
13781378-- The format used by the formatter has been improved.
13791379-- Fixed a bug where tail recursion could sometimes generated incorrect
13801380- JavaScript code.
13811381-- Performance of code generators has been slightly improved.
13821382-- Allow the record in a record expansion to be an expression that returns a
13831383- record.
13841384-- Fixed a bug where external function module names would not be escaped
13851385- correctly if they contained special characters and were assigned to a
13861386- variable.
13871387-- A helpful error message is shown if Erlang is not installed.
13881388-13891389-## v0.18.2 - 2021-12-12
13901390-13911391-- Erlang applications are now automatically started when the VM is started by
13921392- `gleam run` and `gleam test`.
13931393-13941394-## v0.18.1 - 2021-12-12
13951395-13961396-- Fixed a bug where pipe expressions in record updates and operator expressions
13971397- could generate incorrect Erlang code.
13981398-- The `priv` directory is now copied to the output directory for rebar3 packages
13991399- prior to compilation. This is required for some packages to compile.
14001400-- Fixed a bug where deps that fail to compile would be skipped when compilation
14011401- would next be attempted, resulting the project being in an invalid state.
14021402-14031403-## v0.18.0 - 2021-12-06
14041404-14051405-[Release Blog Post](https://gleam.run/news/gleam-v0.18-released/)
14061406-14071407-- New projects now include `gleeunit`.
14081408-14091409-## v0.18.0-rc3 - 2021-12-05
14101410-14111411-- URL format in gleam.toml is now validated.
14121412-- The `gleam deps list` command has been added.
14131413-- Fixed a bug where changing requirements in `gleam.toml` would not cause deps
14141414- to be re-resolved.
14151415-- Fixed a bug where locked deps would cause incompatible package requirements to
14161416- be discarded.
14171417-- Development dependencies are now included in the applications listed in the
14181418- generated OTP `.app` file.
14191419-- `gleam.toml` now includes an `erlang.extra_applications` key to specify extra
14201420- OTP applications that need to be started.
14211421-14221422-## v0.18.0-rc2 - 2021-11-26
14231423-14241424-- Fixed a bug where OTP .app files would be generated with invalid syntax.
14251425-- Removed extra whitespace from newly generated projects.
14261426-14271427-## v0.18.0-rc1 - 2021-11-25
14281428-14291429-- Gleam can now compile Gleam projects.
14301430-- Gleam can now run tests with the `gleam eunit` command.
14311431-- Gleam can now run programs with the `gleam run` command.
14321432-- Gleam can now run an Erlang shell with the `gleam shell` command.
14331433-- Gleam can now resolve package versions for a Gleam project's dependency tree.
14341434-- Gleam can now download Hex packages.
14351435-- Gleam can now build dependency packages that are managed using Gleam or
14361436- rebar3.
14371437-- Gleam is now the default build tool for new projects.
14381438-- The template names for `gleam new` have been changed.
14391439-- Fixed a bug where the error message for a record update with an unknown field
14401440- would point to all the fields rather than the unknown one.
14411441-- Improved styling for inline code in generated documentation.
14421442-- New projects use v0.18 of the stdlib.
14431443-14441444-## v0.17.0 - 2021-09-20
14451445-14461446-[Release Blog Post](https://gleam.run/news/gleam-v0.17-released/)
14471447-14481448-- Functions now get special handling when being printed from JavaScript.
14491449-14501450-## v0.17.0-rc2 - 2021-09-19
14511451-14521452-- Errors thrown when no case clause or assignment pattern matches the subject
14531453- value now include more debugging information when targeting JavaScript.
14541454-- New projects are generated using `gleam_stdlib` v0.17.1.
14551455-14561456-## v0.17.0-rc1 - 2021-09-11
14571457-14581458-- Redesigned the Gleam prelude to be a module of core classes when compiling to
14591459- JavaScript. This improves the resulting generated code and makes debugging and
14601460- interop easier.
14611461-- Projects without rebar3 can be generated using the `gleam-lib` template.
14621462-- JavaScript modules are imported using a camel case variable name to avoid name
14631463- collisions with variables.
14641464-- Pipelines now use assignments in the generated code in order to preserve the
14651465- order of any side effects.
14661466-- Fixed a bug where the compiler would crash rather than raise an error if a
14671467- project contained a single module and attempted to import another.
14681468-- Special variable naming has been made more consistent in rendered Erlang and
14691469- JavaScript.
14701470-- Conditional compilation can now be used to have different code within a module
14711471- when compiling to a specific target.
14721472-- Fixed a bug where `todo` caused values not to be returned in JavaScript.
14731473-- Fixed a bug where multiple discarded function arguments generated invalid
14741474- JavaScript.
14751475-- Fixed a bug where using JavaScript reserved words as function argument names
14761476- caused generated invalid JavaScript.
14771477-- Fixed a bug where a case expression of just a catch-all pattern generated
14781478- invalid JavaScript.
14791479-- Fixed a bug where the formatter would incorrectly render extra newlines below
14801480- try expressions.
14811481-- Fixed a bug where tail recursive functions with arguments with the same name
14821482- as JavaScript reserved words generated the wrong JavaScript.
14831483-- Fixed a bug where list equality would be incorrectly reported in JavaScript.
14841484-- Multiple subjects are now supported for case expressions in JavaScript.
14851485-- Fixed a bug where matching using a Bool or Nil literal as the subject for a
14861486- case expression would produce invalid code when compiling to JavaScript.
14871487-- Unsupported feature error messages now include file path and line numbers for
14881488- debugging.
14891489-- Bit string literals with no segment options or just the `bit_string`, `utf8`
14901490- or `utf8_codepoint` options can be constructed when compiling to JavaScript.
14911491-- The format of generated JavaScript has been improved.
14921492-- Fixed a bug where rendered JavaScript incorrectly incremented variables when
14931493- reassigned in patterns.
14941494-- Added `eval` and `arguments` to JavaScript reserved words.
14951495-- Support for the deprecated `tuple(x, y, ...)` syntax has been removed in favor
14961496- of the more concise (`#(x, y, ...)`). Use `gleam format` with the previous
14971497- version of the compiler to auto-migrate.
14981498-- New OTP projects are generated using `gleam_otp` v0.1.6.
14991499-- Fixed a bug where the equality operators could return the incorrect value for
15001500- records when compiling to JavaScript.
15011501-- Fixed a bug where `todo` could sometimes render invalid JavaScript when used
15021502- as an expression in the generated code.
15031503-- An error is now emitted if the list spread syntax is used with no prepended
15041504- elements `[..xs]`.
15051505-- Fixed a bug where type errors inside piped expressions would be incorrectly be
15061506- reported as being an incorrect usage of the pipe operator.
15071507-- Gleam modules with no public exports no longer render private members in
15081508- Erlang.
15091509-- Fixed a bug where discard variables used in assert assignments would generate
15101510- invalid Erlang code.
15111511-- Fixed a bug where some expressions as case subjects would generate invalid
15121512- JavaScript code.
15131513-- Fixed a bug where some assignments as the final expression in a function would
15141514- not return the correct value in JavaScript.
15151515-- Gleam packages imported in JavaScript now have the path prefix
15161516- `gleam-packages`. This can be served from your web server or aliased in your
15171517- `package.json` for NodeJS projects.
15181518-- Fixed a bug where the type checker would fail to generalise some type
15191519- variables, causing module metadata writing to fail.
15201520-- Fixed a bug where tail call optimisation when compiling to JavaScript could
15211521- result in incorrect code.
15221522-- Fixed a bug where variable names could be rendered incorrectly in closures.
15231523-- An error is now emitted if alternative patterns fail to define all the
15241524- variables defined by the first pattern.
15251525-- New projects are generated using `gleam_stdlib` v0.17.0.
15261526-- New projects are generated using `gleam_otp` v0.2.0.
15271527-15281528-## v0.16.1 - 2021-06-21
15291529-15301530-- Values which are being imported more than once in an unqualified fashion now
15311531- cause an error to be reported.
15321532-- Argument docs for custom type constructors are now rendered in the HTML
15331533- documentation.
15341534-- Patterns can be used with `try` expressions when compiling to JavaScript.
15351535-- Types and record constructors can now be aliased with an uppercase name when
15361536- imported. Aliasing them with a lowercase name is no longer permitted.
15371537-- Fixed a bug where nested import paths could be rendered incorrectly in
15381538- JavaScript.
15391539-15401540-## v0.16.0 - 2021-06-17
15411541-15421542-[Release Blog Post](https://gleam.run/news/gleam-v0.16-released/)
15431543-15441544-## v0.16.0-rc4 - 2021-06-17
15451545-15461546-- Fixed a bug where if a JavaScript global function was imported as an external
15471547- function with the same name the generated code would diverge.
15481548-15491549-## v0.16.0-rc3 - 2021-06-17
15501550-15511551-- New projects are generated using `gleam_stdlib` v0.16.0.
15521552-15531553-## v0.16.0-rc2 - 2021-06-08
15541554-15551555-- Gleam now supports alternative patterns in case expressions for the JavaScript target.
15561556-- The `gleam` prelude module can now be imported when compiling to JavaScript.
15571557-- Fixed a bug where the prelude module could not be imported when using the old
15581558- build compiler API.
15591559-- Fixed a bug where if a JavaScript global function was imported as an external
15601560- function with the same name the generated code would diverge.
15611561-- Type error messages coming from pipe usage have been improved.
15621562-15631563-## v0.16.0-rc1 - 2021-06-04
15641564-15651565-- Gleam can now compile to JavaScript! Specify the `--target javascript` flag to
15661566- `gleam compile-package` to use it today.
15671567-- A compile time error is now raised when multiple module level constants with
15681568- the same name are defined.
15691569-- Fixed a bug where declaring a type constructor using reserved erlang keyword
15701570- in its fields results in invalid erlang code being generated.
15711571-- Fixed a bug where calling a function with discarded labelled arguments
15721572- incorrectly results in a compile error.
15731573-- Fixed a bug where assert statements return the wrong value.
15741574-- The `gleam new` command requires a root folder param, project name is
15751575- optional and if not provided the project name will be inferred from
15761576- the folder name.
15771577-- Generated Erlang record header files now contain Erlang type information.
15781578-- New OTP application projects depend on `gleam_otp` v0.1.5.
15791579-- The output of the formatter has been improved.
15801580-15811581-## v0.15.1 - 2021-05-07
15821582-15831583-- Fixed a bug where blocks that contained try expressions could be formatted
15841584- incorrectly.
15851585-15861586-## v0.15.0 - 2021-05-06
15871587-15881588-[Release Blog Post](https://gleam.run/news/gleam-v0.15-released/)
15891589-15901590-## v0.15.0-rc1 - 2021-05-05
15911591-15921592-- Syntax highlighting of Gleam code in generated HTML documentation has been
15931593- improved.
15941594-- Fixed a bug where markdown tables in rendered HTML documentation would have
15951595- the incorrect background colour on every other row.
15961596-- Tuples now have a new, concise syntax variant: `#(x, y, ...)`. Existing code
15971597- can be auto-migrated to the new syntax by running `gleam format`.
15981598-- Fixed a bug where customt type constructors with Erlang keywords as names
15991599- would generate invalid Erlang code.
16001600-- Gleam now supports `\e` string escapes.
16011601-- Values and types from the prelude can now be used in a qualified fashion by
16021602- importing the `gleam` module.
16031603-- Empty lists can now be used in constants.
16041604-- Compiler performance has been improved when working with lists.
16051605-- Compiler performance has been improved when working with sequences of
16061606- expressions.
16071607-- Assignments using `let` and `assert` are now expressions and no longer require
16081608- a following expression in their containing block. They are now themselves
16091609- expressions.
16101610-- Fixed a bug where tuple indexing could incorrectly claim a tuple is not of
16111611- type tuple in some circumstances.
16121612-- Glean `new` command now checks if target folder exists, if so it returns
16131613- an error.
16141614-- A compile time error is now raised if a module is defined with the name `gleam`.
16151615-- A compile time error is now raised if a module is defined with the a keyword
16161616- in the name.
16171617-- New projects are generated using `gleam_stdlib` v0.15.0.
16181618-- New projects are generated at v0.1.0.
16191619-16201620-## v0.14.4 - 2021-03-27
16211621-16221622-- The Gleam compiler has been updated to compile with the new Rust v1.51.0.
16231623-- New project's `gleam.toml` has a comment that shows how to add a
16241624- `repository` field.
16251625-- New projects no longer include a licence field in `src/$APP.app.src` by
16261626- default.
16271627-16281628-## v0.14.3 - 2021-03-20
16291629-16301630-- Added an error hint when joining string using the `+` or `+.` operator.
16311631-- New projects are created with `setup-erlang` v1.1.2 and Erlang/OTP v23.2.
16321632-- Fixed a bug where the compiler would be unable to locate an imported module
16331633- if a value from a nested module is used in a qualified fashion.
16341634-16351635-## v0.14.2 - 2021-03-02
16361636-16371637-- Project names can now contain numbers.
16381638-16391639-## v0.14.1 - 2021-02-27
16401640-16411641-- The error message for binary operators has been given more detail and
16421642- hints.
16431643-- Fixed a bug where alternative patterns would incorrectly report unused
16441644- variables.
16451645-- Fixed a bug where private types shadowed shadowed by values would
16461646- incorrectly report unused variables.
16471647-16481648-## v0.14.0 - 2021-02-18
16491649-16501650-[Release Blog Post](https://gleam.run/news/gleam-v0.14-released/)
16511651-16521652-## v0.14.0-rc2 - 2021-02-18
16531653-16541654-- New projects are created with `gleam_stdlib` v0.14.0.
16551655-16561656-## v0.14.0-rc1 - 2021-02-14
16571657-16581658-- Gleam now generates Erlang typespecs.
16591659-- New projects no longer include a licence file by default.
16601660-- New projects can be created using the new `escript` template to generate a
16611661- command line tool style program.
16621662-- A warning is emitted when a literal value is constructed but not used.
16631663-- Automatically generate a link to repository in docs if available.
16641664-- Code in HTML documentation is has highlighted syntax.
16651665-- Gleam now only supports `\r`, `\n`, `\t`, `\"`, and `\\` string escapes.
16661666-- A set of OCI container images are built automatically for each release.
16671667-- New compile time checks for invalid bit string literals and patterns have
16681668- been added.
16691669-- The error messages for syntax errors in names have been improved.
16701670-- Fixed a bug where the repo URL would render incorrectly in HTML docs.
16711671-- Fixed a bug where piping a block can render invalid Erlang.
16721672-- New compile time warnings on unused types, functions and variables.
16731673-- The runtime error emitted by the `todo` keyword now carries additional
16741674- information.
16751675-- The runtime error emitted by the `assert` keyword now carries additional
16761676- information.
16771677-- Fixed a bug where bit string patterns would not correctly unify with the
16781678- subject being pattern matches on.
16791679-- Documentation dark mode.
16801680-- Fixed a bug where some app.src properties were incorrectly named.
16811681-- `--warnings-as-errors` flag added to `gleam build` command.
16821682-16831683-## v0.13.2 - 2021-01-14
16841684-16851685-- `ring` dep upgraded to enable compilation on Apple M1 ARM processors.
16861686-16871687-## v0.13.1 - 2021-01-13
16881688-16891689-- Fix off-by-one error in message messages.
16901690-16911691-## v0.13.0 - 2021-01-13
16921692-16931693-[Release Blog Post](https://gleam.run/news/gleam-v0.13-released/)
16941694-16951695-- New Gleam projects use stdlib v0.13.0.
16961696-16971697-## v0.13.0-rc2 - 2021-01-12
16981698-16991699-- The `version` property in `gleam.toml` is now optional again.
17001700-17011701-## v0.13.0-rc1 - 2021-01-09
17021702-17031703-- Variable names now only have 1st letter capitalized when converted to erlang.
17041704-- Records defined in other modules can now be used in module constants.
17051705-- Documentation can link from functions, types & constants to their source
17061706- code definitions on popular project hosting sites.
17071707-- Documentation hosted on HexDocs now has a version selector.
17081708-- Fixed a bug where the `app` project template rendered invalid code.
17091709-- Newly generated projects use stdlib v0.12.0.
17101710-- Named subexpressions in patterns now render correct Erlang.
17111711-- The anonymous function syntax now successfully parses with whitespace
17121712- between `fn` and `(`.
17131713-- Fixed a bug where the formatter would incorrectly remove blocks around some
17141714- binary operators.
17151715-- Constants can now be defined after they are used in functions
17161716-- The parser has been rewritten from scratch, dramatically improving error
17171717- messages and compilation times.
17181718-- `1-1` and `a-1` are now parsed as `1 - 1` and `a - 1`
17191719-- Further information has been added to the error messages when a function
17201720- returns the wrong type.
17211721-- Further information has been added to the error messages when case clauses
17221722- return different types.
17231723-- Fixed a bug where imported record constructors without labels used as an
17241724- anonymous function generates incorrect Erlang.
17251725-17261726-## v0.12.1 - 2020-11-15
17271727-17281728-- The compiler can now discriminate between record access and module access
17291729- for shadowed names
17301730-- The `new` command will no longer permit projects to be made with names that
17311731- clash with Erlang standard library modules.
17321732-- The formatter now correctly treats lines of only whitespace as empty.
17331733-- The styling of tables in rendered HTML documentation has been improved.
17341734-- Rendered HTML documentation has regained its max-width styling.
17351735-17361736-## v0.12.0 - 2020-10-31
17371737-17381738-[Release Blog Post](https://gleam.run/news/gleam-v0.12-and-gleam-otp-v0.1-released/)
17391739-17401740-## v0.12.0-rc4 - 2020-10-31
17411741-17421742-- The rendered module documentation sidebar can now scroll independently to
17431743- the page.
17441744-- Application projects now have the correct `mod` value in the generated
17451745- `.app.src`.
17461746-- Records without fields can now be used in module constants.
17471747-- New application projects are now created used Gleam's type safe OTP pulled
17481748- from Hex.
17491749-17501750-## v0.12.0-rc3 - 2020-10-24
17511751-17521752-## v0.12.0-rc2 - 2020-10-24
17531753-17541754-## v0.12.0-rc1 - 2020-10-24
17551755-17561756-- The utf8, utf16, and utf32 type specifiers are now only available in bit
17571757- string construction, matching must be done with the codepoint versions.
17581758-- Functions may now be called before they are defined in a module. This
17591759- enabled mutually recursive functions!
17601760-- Discarded variable names may now include numbers.
17611761-- Fixed a bug where discarded variables might generate incorrect Erlang.
17621762-- Added support tuple access in clause guards.
17631763-- New projects are created with version 1.0.2 of the setup-gleam GitHub
17641764- action.
17651765-- New application projects are now created used Gleam's type safe OTP.
17661766-- Comments are now correctly handled on platforms that use \r\n line endings,
17671767- such as Windows.
17681768-17691769-## v0.11.2 - 2020-09-01
17701770-17711771-- Fixed a bug where an imported constructor would emit an unused constructor
17721772- warning when only used in pattern matching.
17731773-17741774-## v0.11.1 - 2020-08-31
17751775-17761776-- The formatter style has been improved to render function type arguments on
17771777- a single line when possible, even if the return type will not fit on a
17781778- single line.
17791779-- The format for printed types in error messages has been improved.
17801780-- Fixed a bug where the formatter would strip a constructor pattern spread
17811781- when no fields are given.
17821782-- Fixed a bug where assigning the result of a block to a variable would
17831783- generate incorrect Erlang.
17841784-- The formatter style has been improved for function calls that take a single
17851785- block as an argument.
17861786-- Reserved words are no longer incorrectly permitted as project names.
17871787-17881788-## v0.11.0 - 2020-08-28
17891789-17901790-[Release Blog Post](https://lpil.uk/blog/gleam-v0.11-released/)
17911791-17921792-## v0.11.0-rc3 - 2020-08-27
17931793-17941794-- Bit strings now support non-literal strings as segment values.
17951795-- Fixed a bug where Erlang variables could be generated with incorrect names
17961796- when defining an anonymous function.
17971797-17981798-## v0.11.0-rc2 - 2020-08-24
17991799-18001800-- The formatter style has been improved to render some single argument calls
18011801- in a more compact style.
18021802-18031803-## v0.11.0-rc1 - 2020-08-22
18041804-18051805-- Field access now works before the custom type is defined.
18061806-- The error message returned by the compiler when the user tries to use unknown
18071807- labelled arguments now handles multiple labels at once, and does not suggest
18081808- labels they have already supplied.
18091809-- The formatter style has been improved to use a trailing comma on imports
18101810- broken over multiple lines.
18111811-- The formatter style has been improved to wrap lists and bit strings over as
18121812- few lines as possible if the elements are Ints, Floats, or Strings.
18131813-- The formatter style has been improved to preserve comments on labelled
18141814- call arguments.
18151815-- The formatter style has been improved to preserve empty lines in assignments.
18161816-- The performance of the formatter has been improved.
18171817-- Records can be updated using the spread syntax. A warning is emitted if no
18181818- fields are updated when using this syntax.
18191819-- Fixed a bug where type parameters can leak between different type
18201820- definitions in a module.
18211821-- Markdown tables, footnotes, strikethroughs, and tasklists are now supported
18221822- in documentation.
18231823-- Fixed a bug where generic types may be incorrectly unified.
18241824-- Ints and floats can now be written with underscores for clarity.
18251825-- The warning for a `todo` now includes the required type of the
18261826- not-yet-implemented expression.
18271827-- Holes can be used in type annotations to specify part of a type, leaving the
18281828- rest for inference.
18291829-- The incorrect arity error now prints any missing labelled arguments.
18301830-- Fixed a bug where Erlang variables could be generated with incorrect names
18311831- when directly calling an anonymous function.
18321832-- A warning is emitted when a type is imported or created but not used.
18331833-- Fixed a bug where Erlang variables names could clash when rebinding
18341834- variables while similarly named variables ending in a number are in scope.
18351835-- Fixed a bug in the pretty printer which prevented the formatter from
18361836- rendering sub-expressions in a single line when later code would not fit on
18371837- the same line.
18381838-- The formatter style has been improved to render some single argument calls
18391839- in a more compact style.
18401840-- Gleam now supports hex, octal, and binary literals.
18411841-- Rebar3 hex packages now include `gleam.toml` and `gen`.
18421842-- Newly generated projects use stdlib v0.11.0.
18431843-18441844-## v0.10.1 - 2020-07-15
18451845-18461846-- Fixed a bug where the compiler failed to return an error when type checking
18471847- a tuple with the wrong arity in a pattern.
18481848-- The error message for a duplicate module member now shows the location of
18491849- both definitions.
18501850-- Fix compiler bug where labelled arguments were being reordered incorrectly.
18511851-18521852-## v0.10.0 - 2020-07-01
18531853-18541854-[Release Blog Post](https://lpil.uk/blog/gleam-v0.10-released/)
18551855-18561856-- Newly generated projects use stdlib v0.10.1.
18571857-- Fixed a bug where discards inside bit string patterns generated invalid
18581858- code.
18591859-18601860-## v0.10.0-rc2 - 2020-06-30
18611861-18621862-- Fixed a bug where variables names would be incorrectly generated when using
18631863- alternative patterns.
18641864-18651865-## v0.10.0-rc1 - 2020-06-29
18661866-18671867-- Single letter module names are now permitted.
18681868-- Added support for bit string syntax.
18691869-- Support for the deprecated list prepend syntax has been removed.
18701870-- Added module level constants that are inlined at compile time.
18711871-- Public module level constants generate documentation.
18721872-- The formatter style has been improved to wrap and sort imports.
18731873-- The formatter now permits comments at the end of module function bodies.
18741874-- The formatter now skips files that match patterns defined in ignore files
18751875- such as .gitignore and .ignore.
18761876-- Error message diagnostic code previews for type errors when using the the
18771877- pipe operator have been made more accurate.
18781878-- Added support for list literals in clause guards.
18791879-- Fixed bug when reassigning a variable inside a case clause with alternative
18801880- patterns.
18811881-- Todos can now take an optional label.
18821882-18831883-## v0.9.1 - 2020-06-12
18841884-18851885-- Fixed a bug where binary operators may lose required `{ }`s when formatted.
18861886-18871887-## v0.9.0 - 2020-06-01
18881888-18891889-[Release Blog Post](https://lpil.uk/blog/gleam-v0.9-released/)
18901890-18911891-- Newly generated projects use stdlib v0.9.0.
18921892-- Additional information is printed to the console when generating HTML
18931893- documentation from Gleam code.
18941894-- Fixed a bug where blocks on either side of a binary operator would be
18951895- rendered without `{ }`.
18961896-18971897-## v0.9.0-rc1 - 2020-05-26
18981898-18991899-- The formatter style has been improved.
19001900-- Numbers are now permitted in module names.
19011901-- Emitted Erlang code correctly adds parentheses around binary subexpressions
19021902- to preserve precedence.
19031903-- Record names and fields are now escaped in `.hrl` files if they conflict
19041904- with Erlang reserved words
19051905-- Annotations are now supported on `let` and `assert` expressions
19061906-- Formatter now accepts comments for the fields of a custom type's constructors
19071907-- Added opaque custom types, which have constructors that cannot be accessed
19081908- from outside their own modules.
19091909-- Additional (arbitrary) markdown documentation pages can now be added and
19101910- built with `docs build`.
19111911-- Fix code generation when calling functions returned through either record
19121912- or tuple access
19131913-- Add lookup for Gleam source code in Mix's `deps` directory.
19141914-- Newly generated Gleam projects use the GitHub action
19151915- `gleam-lang/setup-erlang` v1.1.0.
19161916-- Added support for custom type record literals in guards.
19171917-- Type variables are now correctly preserved within nested scopes.
19181918-19191919-## v0.8.1 - 2020-05-19
19201920-19211921-- The formatter now correctly handles unicode comments.
19221922-19231923-## v0.8.0 - 2020-05-07
19241924-19251925-[Release Blog Post](https://lpil.uk/blog/gleam-v0.8-released/)
19261926-19271927-- The `docs build`, `docs publish`, and `docs remove` commands can be used to
19281928- compile HTML documentation locally, publish them to HexDocs, and remove them
19291929- from HexDocs respectively.
19301930-- Type error reporting has been improved when using the pipe operator.
19311931-- Newly generated projects use stdlib v0.8.0.
19321932-- The compiler can now emit warnings. Currently there are warnings for using
19331933- the old '|' syntax in lists and for todos.
19341934-- Will give a clearer error when a function given as an argument to another
19351935- function doesn't match the type of the parameter.
19361936-- Fixed bug where imported type constructors had the incorrect arity.
19371937-- Fixed bug where a doing an unqualified import of a type constructor and
19381938- giving it an alias would use the wrong name if it contained any values.
19391939-- Fixed a bug trying to access an imported constructor which contained values.
19401940-- Fixed a compiler crash that occurred when trying to unify a tuple with something
19411941- other than another tuple or a variable.
19421942-- Added support for tuple literals in guards.
19431943-19441944-## v0.8.0-rc1 - 2020-04-28
19451945-19461946-- Strings are now encoded as utf8 binaries in the generated Erlang.
19471947-- HTML documentation can now be generated from Gleam code by running `gleam build --doc`.
19481948-- Gleam code can be formatted using the `gleam format` command.
19491949-- The pipe operator `|>` will now attempt to insert the left hand side as the
19501950- first argument to the right hand side if the right hand side is a call,
19511951- removing the need for function capture boilerplate.
19521952-- A `record.label` syntax can now be used to access the fields of a custom
19531953- type that have a single record variant.
19541954-- Anonymous functions can now have return type annotations.
19551955-- There is a `todo` keyword for type checking functions that have not yet been
19561956- implemented.
19571957-- Tuples can be indexed into using the `var.1` syntax.
19581958-- `>`, `>=`, `<`, and `<=` operators are now supported in case clause guards
19591959- and can be used to check the ordering of integers.
19601960-- `>.`, `>=.`, `<.`, and `<=.` operators are now supported in case clause
19611961- guards and can be used to check the ordering of floats.
19621962-- The list prepend syntax is now `[x, ..y]`. The old `[x | y]` syntax is
19631963- deprecated but will continue to work for now. The formatter will rewrite the
19641964- old syntax to the new.
19651965-- Add new assert syntax for binding variables `assert Ok(x) = result`. In the
19661966- future this will allow you to use a pattern that does not match all values.
19671967-- Added support for int and float literals in guards.
19681968-- Color codes are now only emitted in error output for interactive terminal
19691969- sessions.
19701970-- Added a new `..` syntax for discarding the remaining fields of a record.
19711971-- Using the same variable name multiple times in the same pattern will now
19721972- raise an error.
19731973-- Discard can now be omitted in list tails in patterns, ie `[x, ..]` is the
19741974- same as `[x, .._]`. The former is the preferred version and is emitted by the
19751975- formatter.
19761976-19771977-## v0.7.1 - 2020-03-03
19781978-19791979-- Projects generated with `gleam new` use `stdlib` version 0.7.0.
19801980-19811981-## v0.7.0 - 2020-03-01
19821982-19831983-[Release Blog Post](https://lpil.uk/blog/gleam-v0.7-released/)
19841984-19851985-## v0.7.0-rc1 - 2020-02-28
19861986-19871987-- Type aliases can be defined to give concise names to frequently used types.
19881988-- Case expression clauses may have guards which can be used to require
19891989- equality between specified variables in order for the clause to match.
19901990-- Case expression clauses may have alternative patterns, enabling one clause
19911991- to match for multiple different possible patterns.
19921992-- Types may now be used before they are defined within their defining module.
19931993-- Fixed a bug where import paths would not be correctly resolved on Windows.
19941994-- Added job to create precompiled binary for 64-bit Windows when releasing.
19951995-- `gleam new` now creates a project that uses `actions/checkout@v2.0.0` in its
19961996- GitHub actions workflow.
19971997-- Labelled argument in functions may now be discarded by prefixing the name
19981998- with an underscore, like unlabelled arguments.
19991999-- Sub-patterns can have names assigned to them within a pattern using the `as`
20002000- keyword.
20012001-- The format of compiler error messages printed to the console has been
20022002- improved by upgrading to a newer version of the codespan-reporting library.
20032003-- Type variables in the given and expected types will now be printed with the
20042004- same name in type error messages if they are equivalent.
20052005-- A friendly error message is rendered when a case expression clause has the
20062006- incorrect number of patterns for the subjects.
20072007-- A friendly error message is rendered when a .gleam file cannot be read.
20082008-- A friendly error message is rendered when the `gleam new` command fails to
20092009- write the new project to the file system.
20102010-- A friendly error message is rendered when there is a cycle formed by module
20112011- imports.
20122012-- Top level types are now printed in error messages for type parameter mismatches.
20132013-- The `gen` directory is now deleted before each compilation.
20142014-- `gleam new` now includes installation instructions for Hex packages in the
20152015- generated README.
20162016-- `gleam new` now accepts a `--description` flag for including a description of
20172017- the project in the README and `.app.src` file.
20182018-- Fixed a bug where variable names would be incorrectly generated in some
20192019- situations when variable names are reused during and after a case
20202020- expression.
20212021-- Performance of the Erlang code generator has been improved by removing some
20222022- vector allocations.
20232023-- An error is emitted when multiple types with the same name are defined in or
20242024- imported into a module.
20252025-20262026-## v0.6.0 - 2019-12-25 🎄
20272027-20282028-[Release Blog Post](https://lpil.uk/blog/gleam-v0.6-released/)
20292029-20302030-- Function capture syntax now supports labelled arguments.
20312031-20322032-## v0.6.0-rc1 - 2019-12-23
20332033-20342034-- Syntax for defining structs and enums have been unified into a singular
20352035- custom type definition statement. Instances of these custom types are called
20362036- records.
20372037-- Anonymous structs have been renamed tuples.
20382038-- Values and types can be given a new name when imported in the unqualified
20392039- fashion using the `import mod.{value as name}` syntax.
20402040-- An error will be emitted if multiple values constructors are defined with
20412041- the same name in a module.
20422042-20432043-## v0.5.1 - 2019-12-23
20442044-20452045-- Fixed a bug where invalid Erlang would be generated when using a local
20462046- private function as a value.
20472047-20482048-## v0.5.0 - 2019-12-16
20492049-20502050-[Release Blog Post](https://lpil.uk/blog/gleam-v0.5-released/)
20512051-20522052-- Enum constructor arguments can now be labelled, allowing arguments to be
20532053- given by name at the call site.
20542054-- An Erlang header file with a record definition is generated for each Gleam
20552055- struct defined.
20562056-- `gleam new` creates a project at v1.0.0.
20572057-- Function calls are now properly escaped when the function name conflicts
20582058- with an Erlang keyword.
20592059-- References to unqualified imported functions now generate correct Erlang
20602060- code.
20612061-- Fixed a bug where variable rebinding would generate incorrect code in some
20622062- case expressions.
20632063-- Fixed a bug where variable rebinding of function arguments would generate
20642064- incorrect code.
20652065-20662066-## v0.5.0-rc1 - 2019-11-26
20672067-20682068-- Function arguments can be labelled, allowing arguments to be given by name
20692069- at the call site.
20702070-- `case` expressions now accept multiple subjects, enabling pattern matching
20712071- on multiple values simultaneously.
20722072-- Values and types can be imported from modules and references in an
20732073- unqualified fashion.
20742074-- Named structs now have their name as the first element in the generated
20752075- Erlang code. This enabled easier use from Erlang by defining records for
20762076- them, as well as slightly clearer printf debugging.
20772077-- Anonymous structs have been introduced, serving as a quick and generic
20782078- alternative to declared structs and as a format for interop with Erlang
20792079- tuples.
20802080-- `gleam new` now accepts a `--template` flag to generate different styles of
20812081- project. An OTP application template has been added alongside the existing
20822082- OTP library template.
20832083-- `gleam new` now creates configuration for GitHub Actions, making Gleam
20842084- projects ready for continuous integration out of the box.
20852085-- The syntax for defining enums, case expressions, and blocks has been changed
20862086- to a syntax closer to that found in the C family of languages.
20872087-- The source code preview for functions that return a type incompatible with
20882088- the functions annotations has been improved to be more precise.
20892089-- A helpful error message is rendered if an enum field contains a generic type
20902090- that has not been declared.
20912091-- A bug has been fixed in which type mismatch errors originating from pattern
20922092- matching would sometimes display the incorrect expected type.
20932093-20942094-## v0.4.2 - 2019-10-22
20952095-20962096-- Fixed a crash when an incorrect number of labelled struct arguments are
20972097- given.
20982098-- Fixed a struct labelled argument being incorrect reported as already given.
20992099-21002100-## v0.4.1 - 2019-09-29
21012101-21022102-- Struct types with parameterised fields are now registered with the correct
21032103- number of type parameters.
21042104-21052105-## v0.4.0 - 2019-09-19
21062106-21072107-[Release Blog Post](https://lpil.uk/blog/gleam-v0.4-released/)
21082108-21092109-- The struct data type has be introduced. Structs are pre-declared user
21102110- defined data types with named fields and constant access time.
21112111-- The map and tuple data types has been removed, replaced by the struct data
21122112- type.
21132113-- The generated code no longer contains export statements if no functions are
21142114- exported from a module.
21152115-- Comparison operators have been specialised to operate only on Ints.
21162116-- The `>.` `>=.` `<.` and `<=.` comparison operators have been added for
21172117- comparing Floats.
21182118-- It is now an error to export an enum which has a constructor that takes a
21192119- private type as an argument.
21202120-- The error messages for defining multiple modules with the same name and for
21212121- importing test modules into application code have been improved.
21222122-- Numbers are now permitted in type names and constructors.
21232123-- The `Nil` constructor will no longer erroneously be of type `Int`.
21242124-21252125-## v0.3.0 - 2019-08-08
21262126-21272127-[Release Blog Post](https://lpil.uk/blog/gleam-v0.3-released/)
21282128-21292129-- New project structure can be generated with the `gleam new` command.
21302130-- Functions can be annotated with their argument and return types. This may be
21312131- used to restrict the function to a less general type than inferred by the
21322132- compiler, or purely for documentation purposes.
21332133-- External function names and their target functions are now escaped in the
21342134- generated code if they collide with Erlang keywords such as `catch` or `or`.
21352135-- Type error arising from the arguments of function calls have more accurate
21362136- error diagnostics.
21372137-- Precompiled Gleam binaries are now available on the GitHub release page.
21382138-- Precompiled Docker images containing the Gleam binary are now available on
21392139- DockerHub.
21402140-- The formatting of the Erlang code rendered by the compiler has been altered
21412141- to improve legibility.
21422142-- A helpful error message is now rendered if the shorthand anonymous function
21432143- syntax is used with too many underscores.
21442144-- A helpful error message is now rendered when attempting to import an unknown
21452145- module.
21462146-21472147-## v0.2.0 - 2019-06-25
21482148-21492149-- Modules can now live within namespaces such as `my_app/user/profile`.
21502150-- The name of the variable created can be specified when importing a module
21512151- using the `import my_mod as name` syntax.
21522152-- Function names and atoms are now escaped in the generated code if they
21532153- collide with Erlang keywords such as `catch` or `or`.
21542154-- There is a shorthand syntax for prepending multiple elements to a list.
21552155- `[1, 2, 3 | my_list]`
21562156-21572157-## v0.1.2 - 2019-05-12
21582158-21592159-- Types containing more than 26 type variables will no longer render with
21602160- invalid type variable names.
21612161-- Types in error messages no longer have extra indentation that increases as
21622162- the type gets larger.
21632163-- There is a new type `Nil` which is occupied by a single value (`Nil`). This
21642164- type is used to represent the absence of a value and is commonly used with
21652165- `Result` to model a value that is either present (`Ok(value)`) or absent
21662166- (`Error(Nil)`).
21672167-- Zero arity enum constructors now generate the correct Erlang when used in
21682168- modules other than the one they are defined in.
21692169-21702170-## v0.1.1 - 2019-04-28
21712171-21722172-- Error messages now display the path of the file containing the problem.
21732173-- Maps and modules with erroneous extra fields now have a custom error
21742174- message.
21752175-- Rows with tails that are unbound type variables are now correctly unified in
21762176- the type system. This fixes a bug in which maps and modules may sometimes
21772177- fail to type check when there is no error.
21782178-21792179-## v0.1.0 - 2019-04-15
21802180-21812181-[Release Blog Post](https://lpil.uk/blog/hello-gleam/)
21822182-21832183-- Initial release!
1717+Fixed the generated `mod` property in the Erlang application file when using the
1818+`application_start_module` property in `gleam.toml`. ([Alex Manning](https://github.com/rawhat))
+5-6
RELEASE.md
···331. Update the version in each `Cargo.toml`.
442. Update versions in `src/new.rs` for stdlib etc if required.
553. Run `make test build`.
66-4. Update `CHANGELOG.md` with new version and link to blog post (if present)
77-5. Git commit, tag, push, push tags.
88-6. Wait for CI release build to finish.
99-7. Publish release on GitHub from draft made by CI.
1010-8. Update version in `Cargo.toml` to next-dev.
1111-9. Update clone target version in `getting-started.md` in `website`.
66+4. Git commit, tag, push, push tags.
77+5. Wait for CI release build to finish.
88+6. Publish release on GitHub from draft made by CI.
99+7. Update version in `Cargo.toml` to next-dev.
1010+8. Update clone target version in `getting-started.md` in `website`.
+2168
changelog/v1.0.md
···11+# Changelog
22+33+## v1.1.0 - 2024-04-16
44+55+### Formatter
66+77+- Fixed a bug where the first subject of a case expression clause would be
88+ indented more than necessary.
99+1010+## v1.1.0-rc3 - 2024-04-12
1111+1212+### Formatter
1313+1414+- Fixed a bug where the `@internal` annotation wouldn't be displayed.
1515+- Fixed a bug where a record update's arguments would be incorrectly split on
1616+ multiple lines.
1717+1818+## v1.1.0-rc2 - 2024-04-10
1919+2020+### Compiler
2121+2222+- Fixed a bug on the JavaScript target where variables named `debugger`, which
2323+ is a JavaScript keyword, were not being renamed, leading to runtime errors.
2424+2525+### Formatter
2626+2727+- Fixed a bug where comments would be moved out of an empty bit array.
2828+- Fixed a bug where the formatter could add a trailing comma inside empty
2929+ bit arrays, generating invalid syntax.
3030+- Revert the warning about internal types being exposed in a package's public
3131+ API.
3232+3333+### Build tool
3434+3535+- Revert the change that would make the build tool refuse to publish a package
3636+ that exposes an internal type in its public API.
3737+3838+## v1.1.0-rc1 - 2024-04-08
3939+4040+### Compiler
4141+4242+- The `@internal` attribute can now be used to annotate definitions.
4343+ This will hide those definitions from the generated documentation,
4444+ autocompletions and the exported module interface.
4545+- Prepending to lists in JavaScript (`[x, ..xs]` syntax) has been optimised.
4646+- Function stubs are no longer generated for functions that do not have an
4747+ implementation for the current targeting being compiled for.
4848+- Fixed a bug where some functions would not result in a compile error when
4949+ compiled for a target that they do not support.
5050+- Fixed a bug where sometimes a warning would not be emitted when a result is
5151+ discarded.
5252+- Fixed a bug with JavaScript code generation of pattern matching guards.
5353+- URLs in error messages have been updated for the new language tour.
5454+- Improved error message when erroneously trying to append items to a list using
5555+ the spread syntax (like `[..rest, last]`).
5656+- Generate [type references](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types-)
5757+ when compiling to JavaScript with TypeScript definitions enabled.
5858+- Fix a bug where JavaScript code generation would not properly return the
5959+ result of nested blocks.
6060+- Fix a bug where JavaScript code generation would not properly handle functions
6161+ returned by blocks.
6262+- Fix a bug where Erlang code generation would not properly handle list case
6363+ patterns with no head and a spread tail.
6464+- The compiler will now raise a warning if you're pattern matching on tuple
6565+ literals and suggest you use multiple subjects instead.
6666+- Fixed a bug where JavaScript code generation would incorrectly parenthesise a
6767+ return statement.
6868+- Nested tuple access (`tuple.0.1`) now parses successfully.
6969+- Error messages are more clear about expecting values instead of types.
7070+- Fixed a bug where pattern matching on a string would cause the program to
7171+ crash on the JavaScript target.
7272+- A warning is now emitted when defining an opaque external type.
7373+- Improve error message when using incorrect quotes (`'`) to define a string
7474+- Fixed a bug where Erlang string prefix patterns could generate invalid Erlang.
7575+- Fixed string prefix matching producing wrong results on the JavaScript target
7676+ when the prefix had a Unicode codepoint escape sequence (`\u{...}`).
7777+- Improved error message for wrong patterns using constructors from other
7878+ modules.
7979+- Fixed a bug on the JavaScript target where variables bound by patterns, if
8080+ used within a bit array literal inside a `case` clause's guard, would be used
8181+ before they were defined, leading to a runtime error when evaluating the
8282+ `case` expression.
8383+- Improved error messages when failing to parse a series of things.
8484+- A warning is now raised for unused binary operations, records, record access
8585+ and record updates.
8686+- Fixed a bug when using constant as the size option parameter
8787+ for `BitArray` caused unknown variable exception.
8888+- Improved recommendations on error messages.
8989+- Improved error message for `BitArray` segment sizes.
9090+- A warning is now raised when an internal type is accidentally exposed in a
9191+ package's public API.
9292+- Fixed the error message when using `panic` on the JavaScript target: it now
9393+ correctly identifies the error variant as a `panic` instead of a `todo`.
9494+- Fixed a bug on the JavaScript target where empty lists with little space
9595+ available could compile to a conversion from the array `[ , ]`, causing them
9696+ to wrongly have a length of one (the array has a single `undefined` element).
9797+9898+### Formatter
9999+100100+- The formatting of case expressions with multiple subjects has been improved.
101101+- Fixed a bug where the formatter would move comments from the end of bounded
102102+ expressions like lists, tuples, case expressions or function calls.
103103+- Fixed a bug where a record update's arguments would not be indented correctly.
104104+- Fixed a bug where function call arguments, tuple items and list items would be
105105+ needlessly indented if preceded by a comment.
106106+- Line endings other than `\n` are now handled by the formatter, preserving
107107+ blank lines and converting them to `\n`.
108108+- The formatter can now format groups of imports alphabetically.
109109+- Fixed a bug where comments would be moved out of an empty list.
110110+- Fixed a bug where pipes and binary operations in function calls would be
111111+ nested more than necessary.
112112+- Improved formatting of comments in binary operation chains.
113113+114114+### Build tool
115115+116116+- Added support for the [Bun](https://bun.sh/) runtime when compiling to
117117+ JavaScript by using `gleam run --target javascript --runtime bun`
118118+- Allow compilation of packages that require `"rebar"` using the rebar3
119119+ compiler.
120120+- A warning is now emitted if there is a `.gleam` file with a path that would be
121121+ invalid as a module name.
122122+- The `~> x.y` version constraint syntax has been dropped in favour of
123123+ `> x.y.z and <= xx.0.0` syntax in `gleam add` and `gleam new`, for clarity.
124124+- New projects are created with the GitHub `actions/checkout` v4 action.
125125+- Fixed a bug where bit arrays would break syntax highlighting in the generated
126126+ HTML documentation.
127127+- Dependencies that use Erlang-only bit options can now compile on JavaScript,
128128+ though the functions that use them will not be available for use in the root
129129+ package.
130130+- The output format of the command line help messages have been changed
131131+ slightly.
132132+- The command line help text now lists valid targets and runtimes.
133133+- Generated documentation no longer exposes the constructors of opaque types,
134134+ no longer exposes the values of constants, and indicates which types are
135135+ opaque.
136136+- Generated HTML documentation now includes a link to the package on Hex.
137137+- Terminal colors can now be forced by setting the `FORCE_COLOR` environment
138138+ variable to any non-empty value.
139139+- Rust's Reqwest's `webpki-roots` are now used for TLS verification.
140140+- Update Deno config to allow passing `--location` runtime flag.
141141+- Fixed a bug with dependency resolution of exact versions of RC releases.
142142+- Fixed a bug where the documentation of a labelled record constructor could be
143143+ assigned to the wrong definition in the doc site.
144144+- Fixed a bug where the code blocks in the generated documentation's site would
145145+ have a wrong indentation.
146146+- Fixed a bug where the compiler would panic when it cannot get current
147147+ directory.
148148+- Improved error message for non-UTF-8 paths encountered during Gleam commands.
149149+ Now includes the path that caused the error for better diagnostics.
150150+- Fixed a bug where on windows local packages had absolute paths in the manifest
151151+ instead of relative.
152152+- The `gleam publish` command now asks for confirmation if the package
153153+ repository URL doesn't return a successful status code.
154154+- `gleam publish` can now optionally use a Hex API key to authorise publishing
155155+ and retiring packages, set via the environment variable `HEXPM_API_KEY`.
156156+- `gleam publish` will now refuse to publish placeholder packages, to prevent
157157+ name squatting which is against the Hex terms of service.
158158+- If a package leaks an internal type in its public API, then the build tool
159159+ will now refuse to publish it to Hex.
160160+- Monospaced links in the generated documentation now have the same color as
161161+ common links.
162162+- Fixed a bug where the `export package interface` command would always
163163+ recompile the project ignoring the cache.
164164+165165+### Language Server
166166+167167+- Update messages from the client are now batched to avoid doing excess
168168+ compilation work in the language server, improving performance. This makes a
169169+ large difference in low power machines where the language server could
170170+ struggle to keep up with the edits from the client.
171171+- The `Compiling Gleam` message is no longer emitted each time code is compiled.
172172+ This is to reduce noise in editors that show this message prominently such as
173173+ Neovim.
174174+- Fixed a bug where hovering over an expression in the middle of a pipe would
175175+ give the wrong node.
176176+- Go to definition now works for values in dependency Gleam modules.
177177+- Completions are now provided for module imports.
178178+179179+## v1.0.0 - 2024-03-04
180180+181181+### Language changes
182182+183183+- Comments have been added to the JavaScript prelude to indicate which members
184184+ are in the public API and which are internal.
185185+186186+### Build tool
187187+188188+- Fixed a bug where the exported package interface would not have a module's
189189+ documentation.
190190+191191+## v1.0.0-rc2 - 2024-02-14
192192+193193+### Bug fixes
194194+195195+- Fixed a bug where the exhaustiveness checker could crash for some generic
196196+ types.
197197+198198+### Formatter
199199+200200+- The format used by the formatter has been improved in some niche cases.
201201+- Improved the formatting of long case guards.
202202+203203+## v1.0.0-rc1 - 2024-02-10
204204+205205+### Language changes
206206+207207+- Using a reserved word is now a compile error, not a warning.
208208+- Inexhaustive matches are now compile errors, not warnings.
209209+- The warning for an unused module alias now shows how to not assign a name to
210210+ the module.
211211+- Type aliases with unused type parameters now emit an error.
212212+- Type definitions with duplicate type parameters now emit an error.
213213+214214+### Formatter
215215+216216+- Now the formatter will nest pipelines and binary operators that are used as
217217+ function arguments, list items or as tuple items.
218218+- The format function literals used as the last argument in a function call
219219+ on long lines has been improved.
220220+221221+### Build tool
222222+223223+- If a package contains a `todo` expression then the build tool will now refuse
224224+ to publish it to Hex.
225225+- `gleam export` now takes a `package-interface` option to export a json file
226226+ containing metadata about the root package.
227227+- `gleam docs build` now creates a json file containing metadata about the root
228228+ package.
229229+- The order of dependencies in `manifest.toml` is now in alphabetical order.
230230+- The search bar in generated docs now has a darker background color.
231231+- The generated docs no longer shows whether an argument is discarded or
232232+ not in a function signature.
233233+- It is now possible to use `gleam run -m` to run a dependency module even if
234234+ that dependency uses a compile target that your project does not support.
235235+236236+### Bug fixes
237237+238238+- Fixed a bug the build tool could be make to attempt to run a main function
239239+ that does not support the current target in some circumstances.
240240+- Fixed a bug where the exhaustiveness checker could crash when checking nested
241241+ values inserted into the parent type using type parameters.
242242+- Fixed a bug where `functionname(_name)` would incorrectly parse as a function
243243+ capture instead of a syntax error.
244244+- Fixed a bug where external only functions would "successfully" compile for a
245245+ target they do not support, leading to a runtime error.
246246+247247+## v0.34.1 - 2023-01-17
248248+249249+### Build tool changes
250250+251251+- Support has been added for using SourceHut as a repository.
252252+253253+### Bug fixes
254254+255255+- Fixed a bug where long function headers with external implementations could
256256+ format incorrectly.
257257+- The `@deprecated` attribute can now be used to annotate module constants.
258258+ This will cause a warning to be emitted when the constant is used.
259259+260260+## v0.34.0 - 2023-01-16
261261+262262+## v0.34.0-rc3 - 2023-01-12
263263+264264+### Language changes
265265+266266+- "echo" is now a reserved word.
267267+- A warning is no longer emitted when a function has a Gleam implementation as
268268+ well as external implementations for both targets. This is because having a
269269+ default Gleam implementation means the code is future-proof and continues to
270270+ be cross platform even if a new target is added.
271271+272272+### Bug fixes
273273+274274+- Fixed a bug where function heads would go over the line limit in the
275275+ formatter.
276276+277277+## v0.34.0-rc2 - 2023-01-11
278278+279279+### Bug fixes
280280+281281+- Fixed a bug where `gleam run` would fail when the current directory is not
282282+ the root of the project and using the JavaScript target.
283283+- Fixed a bug where the compiler would in some cases fail to error when an
284284+ application uses functions that do not support the current compilation
285285+ target.
286286+287287+## v0.34.0-rc1 - 2024-01-07
288288+289289+### Language changes
290290+291291+- Warn about function body not being used, because it already has external
292292+ implementations for all targets.
293293+- It's now possible to compile a project with external functions in dependency
294294+ packages that are not supported by the compilation target so long as they are
295295+ not used on the current target.
296296+- The error message for when one imports a constructor instead of an homonymous
297297+ type has been improved.
298298+299299+### Language Server Changes
300300+301301+- Added a `View on HexDocs` link on function hover.
302302+303303+### Formatter
304304+305305+- Fixed some quirk with the formatting of binary operators.
306306+- Fixed a bug where the formatter would move a function call's closed
307307+ parentheses on a new line instead of splitting the function's arguments.
308308+- Now the formatter will format tuples as if they were functions, trying to
309309+ first split just the last element before splitting the whole tuple.
310310+- Improved the formatting of multiline strings in string concatenation.
311311+312312+### Build tool changes
313313+314314+- The `gleam new` command now accepts any existing path, as long as there are
315315+ no conflicts with already existing files. Examples: `gleam new .`, `gleam new
316316+..`, `gleam new ~/projects/test`.
317317+- The format for the README created by `gleam new` has been altered.
318318+- The `gleam.toml` created by `gleam new` now has a link to the full reference
319319+ for its available options.
320320+- The `gleam` binary is now statically linked on Windows.
321321+- New projects are created requiring between versions of v0.34.0 inclusive and
322322+ exclusive v2.0.0.
323323+- The `repository` section now supports additional VCS types in the form of
324324+ codeberg, forgejo and gitea allowing a `user`, `repo` and additionally a
325325+ `host` url.
326326+- TypeScript declaration for the prelude exports previously missing functions
327327+ and classes. Additionally, swaps interfaces for classes and adds missing
328328+ attributes to classes.
329329+- `gleam` commands now look in parent directories for a `gleam.toml` file.
330330+331331+### Bug fixes
332332+333333+- Fixed a bug where `gleam add` would not update `manifest.toml` correctly.
334334+- Fixed a bug where `fn() { Nil }()` could generate invalid JavaScript code.
335335+- Fixed a bug where the build tool would make unnecessary calls to the Hex API
336336+ when path dependencies are used.
337337+- Fixed a bug where `gleam new` would generate a gitignore with `build` rather
338338+ than `/build`.
339339+- Fixed where the types of generic constants could be incorrecly inferred.
340340+- `Utf8Codepoint` has been renamed to `UtfCodepoint` in `prelude.d.mts`.
341341+- Fixed a bug where `gleam deps list` would look in filesystem root instead of
342342+ the current directory.
343343+- Fixed a bug with the `isEqual` function in `prelude.js` where RegExps were
344344+ being incorrectly structurally compared and being falsely reported as being
345345+ equal.
346346+- JavaScript: export from `prelude.d.mts` in `gleam.d.mts` to fix the error:
347347+ "Type 'Result' is not generic".
348348+- Not providing a definition after some attributes is now a parse error.
349349+350350+## v0.33.0 - 2023-12-18
351351+352352+## v0.33.0-rc4 - 2023-12-17
353353+354354+- The deprecated bit array options `binary` and `bit_string` have been removed.
355355+- The deprecated ambiguous type import syntax has been removed.
356356+- The deprecated `BitString` type has been removed.
357357+- The deprecated `inspect` functions and `BitString` type has been removed from
358358+ the JavaScript prelude.
359359+360360+## v0.33.0-rc3 - 2023-12-17
361361+362362+### Formatter
363363+364364+- The formatter now tries to split long chains of binary operations around the
365365+ operator itself, rather than around other elements like lists or function
366366+ calls.
367367+368368+### Bug fixes
369369+370370+- Fixed a bug where string prefix aliases defined in alternative case branches
371371+ would all be bound to the same constant.
372372+373373+## v0.33.0-rc2 - 2023-12-07
374374+375375+### Language changes
376376+377377+- The `\e` string escape sequence has been removed. Use `\u{001b}` instead.
378378+- Generated Erlang now disabled redundant case clause warnings as these are now
379379+ redundant due to exhaustiveness checking.
380380+381381+### Bug fixes
382382+383383+- Fixed a bug where the `\u` string escape sequence would not work with
384384+ on Erlang on the right hand side of a string concatenation.
385385+386386+## v0.33.0-rc1 - 2023-12-06
387387+388388+### Formatter
389389+390390+- The formatter now tries to keep a function body and its arguments on a single
391391+ line by first trying to split only its last argument on multiple lines.
392392+- Fixed a bug where the formatter would move comments out of blocks.
393393+- `gleam format` now ignores the Gleam build directory by default, even when not
394394+ in a git repository.
395395+396396+### Language changes
397397+398398+- Gleam now has full exhaustiveness checking. Exhaustiveness issues have been
399399+ downgraded from errors to warnings so that existing Gleam code can be
400400+ upgraded to be exhaustive without breaking existing code. In a future version
401401+ they will be upgraded to errors.
402402+- The `!` operator can now be used in clause guards.
403403+- The words `auto`, `delegate`, `derive`, `else`, `implement`, `macro`, and
404404+ `test` are now reserved for future use. If used they will emit a warning. In
405405+ a future version this may be upgraded to an error.
406406+- The `\u{...}` syntax can be used in strings to specify unicode codepoints via a
407407+ hexadecimal number with 1 to 6 digits.
408408+- The `todo as` and `panic as` syntaxes now accept an expression that evaluates
409409+ to a string rather than just a string literal.
410410+411411+### Build tool changes
412412+413413+- The `gleam run` and `gleam test` commands gain the `-t` flag, which is an
414414+ alias of the `--target` flag.
415415+- The `gleam build`, `gleam check`, `gleam run` and `gleam test` commands now
416416+ also accept `js` and `erl` as values for the `--target` flag.
417417+- The `gleam new` command now creates packages at version 1.0.0.
418418+- The `gleam publish` command now asks for confirmation if the package being
419419+ published is not yet version 1.0.0.
420420+- The `gleam publish` command now asks for confirmation if the package name is
421421+ one that implies the package is maintained by the Gleam core team.
422422+- The error messages shown when dependency resolution fails have been improved.
423423+424424+### Compiler WASM API
425425+426426+- The WASM API for the compiler has been rewritten to be simpler.
427427+- The WASM API for the compiler now exposes warnings.
428428+429429+### HTML documentation generator
430430+431431+- Searching in rendered HTML documentation now also matches words that do not
432432+ start with the input but do contain it.
433433+434434+### Bug fixes
435435+436436+- Fixed a bug where the JavaScript code generator could generate invalid code
437437+ when pretty printing a zero arity function call when the line is over 80
438438+ columns wide.
439439+- Fixed a bug where the build directory could be left in an invalid state if
440440+ there is Elixir code to compile and running on Windows without permission to
441441+ create symlinks.
442442+- Fixed a bug where numbers with preceeding zeros could generate incorrect
443443+ JavaScript.
444444+- The Erlang code generated by the `/.` operator no longer generates a warning
445445+ for the upcoming negative zero float change in Erlang OTP 27.
446446+- Fixed a bug where using only types from an aliased import, wouldn't stop the
447447+ compiler from emitting an unused alias warning for that import.
448448+- Fixed a bug where the formatter would remove the ` as name` from string prefix
449449+ patterns.
450450+- Fixed a bug where the formatter would misplace comments at the start of a
451451+ block.
452452+- Fixed a bug where using a string prefix pattern in `let assert` would generate
453453+ incorrect JavaScript.
454454+455455+## v0.32.4 - 2023-11-09
456456+457457+### Build tool changes
458458+459459+- The build tool now supports rebar3 and mix hex packages where the package name
460460+ differs from the otp application name.
461461+462462+### bug fixes
463463+464464+- Fixed a bug where invalid javascript code could be generated when a module
465465+ function calls another function that was passed as an argument and the
466466+ argument has the same name as the module function.
467467+- Fixed the `target` property of `gleam.toml` being ignored for local path
468468+ dependencies by `gleam run -m module/name`
469469+470470+## v0.32.3 - 2023-11-07
471471+472472+### Language changes
473473+474474+- Imported modules can now be discarded by giving them an alias starting with `_`.
475475+476476+### Build tool changes
477477+478478+- New projects are now generated with the call to `gleam format` coming last in
479479+ the GitHub Actions workflow. This is so that feedback from tests is presented
480480+ even if formatting is incorrect.
481481+- Added Windows support for the `gleam export erlang-shipment` command.
482482+483483+### Bug fixes
484484+485485+- Fixed a bug where some nested pipelines could fail to type check.
486486+487487+## v0.32.2 - 2023-11-03
488488+489489+### Build tool changes
490490+491491+- New Gleam projects are created with `gleam_stdlib` v0.32 and `gleeunit` v1.0.
492492+493493+### Bug fixes
494494+495495+- Fixed a bug where `gleam fix` would not produce correct results for code that
496496+ shadowed a prelude name with an import of the same name but a different kind.
497497+- Fixed a bug where documentation would not publish to Hexdocs for packages with
498498+ a number in the name.
499499+- Fixed a bug where aliased unqualified types and values of the same name could
500500+ produce an incorrect error.
501501+502502+## v0.32.1 - 2023-11-02
503503+504504+### Bug fixes
505505+506506+- Fixed a bug where `gleam fix` would not produce correct results for code that
507507+ shadowed a prelude name with an import of the same name but a different kind.
508508+- Fixed a bug where incorrect JavaScript could be generated due to backwards
509509+ compatibility with the deprecated import syntax.
510510+511511+## v0.32.0 - 2023-11-01
512512+513513+### Bug fixes
514514+515515+- Fixed a bug where running `gleam fix` multiple times could produce incorrect
516516+ results.
517517+518518+## v0.32.0-rc3 - 2023-10-26
519519+520520+### Bug fixes
521521+522522+- Fixed a bug where `gleam fix` would fail to update the deprecated type import
523523+ syntax for aliased unqualified types.
524524+525525+## v0.32.0-rc2 - 2023-10-26
526526+527527+### Bug fixes
528528+529529+- Fixed a bug where the backward compatibility for the deprecated import syntax
530530+ could result in an import error with some valid imports.
531531+532532+## v0.32.0-rc1 - 2023-10-25
533533+534534+### Language changes
535535+536536+- Using `import module.{TypeName}` to import a type has been deprecated,
537537+ replaced by `import module.{type TypeName}`. In a future version of Gleam the
538538+ old syntax will only import the value of the same name. Run `gleam fix` to
539539+ update your code.
540540+- The `BitString` type has been renamed to `BitArray`. Run `gleam fix` to update
541541+ your code.
542542+- The `binary` and `bit_string` bit array modifier have been deprecated in favour
543543+ of `bytes` and `bits`.
544544+- The error message for when one element in a list doesn't match the others has
545545+ been improved.
546546+- The error message for when the elements of a list's tail don't match the
547547+ previous ones has been improved.
548548+- The error message for when one tries to access an unknown field has been
549549+ improved.
550550+- The `__gleam_prelude_variant__` property has been removed from the classes
551551+ defined in the JavaScript prelude.
552552+- The deprecated `todo("...")` syntax has been removed.
553553+- Module access can now be used in case clause guards.
554554+- The JS target now supports bit syntax for module constants.
555555+- The Erlang compiler will no longer emit a duplicate warning for unused
556556+ functions.
557557+- The `@deprecated` attribute can now be used with type definitions.
558558+- A warning is now emitted if a module alias is unused.
559559+560560+### Language server changes
561561+562562+- The language server now has a code action for removing unused items.
563563+- The language server now shows the type of variables defined using `use` on
564564+ hover.
565565+566566+### Build tool changes
567567+568568+- The `gleam check` command supports the `target` flag.
569569+- The `gleam fix` command updates code to use `BitArray` rather than `BitString`.
570570+- The `gleam fix` command updates code to use the new import type syntax.
571571+- `gleam fix` sets the `gleam` version constraint in `gleam.toml` to `>= 0.32.0`.
572572+- The `gleam` version constraint field in `gleam.toml` now disregards pre and
573573+ build components when checking for compatibility.
574574+- The prelude is no longer rendered once per package when compiling to
575575+ JavaScript, instead one copy is rendered for the entire project. If you are
576576+ using the `gleam compile-package` API you now need to give a path to the
577577+ prelude using the `--javascript-prelude` flag.
578578+- The `gleam export javascript-prelude` and `gleam export typescript-prelude`
579579+ commands have been added to export a copy of the prelude. This command may be
580580+ useful for build tools that use the compiler via the `gleam compile-package`
581581+ API.
582582+- Fixed a bug where some deprecation messages would not be printed.
583583+- The content has been made wider in rendered HTML documentation.
584584+- Dependencies that can be built with both `mix` and `rebar3` are now built
585585+ with `mix` if it exists on the system, and with `rebar3` if it doesn't.
586586+587587+### Bug fixes
588588+589589+- "Compiling $package" is now only printed when a package has new changes to
590590+ compile.
591591+- The main process started with `gleam run` no longer traps exits on Erlang.
592592+- The formatting of code in rendered HTML documentation has been improved.
593593+- The formatter no longer moves trailing comments out of custom type definitions.
594594+- Fixed a bug where some hexidecimal numbers would generate incorrect Erlang.
595595+- Fixed a bug where markdown tables would not render correctly in HTML
596596+ documentation.
597597+- The float 0.0 is now rendered in Erlang as `+0.0` to silence warnings in
598598+ Erlang/OTP 27.
599599+600600+## v0.31.0 - 2023-09-25
601601+602602+- New Gleam projects are created with `gleam_stdlib` v0.31, `actions/checkout`
603603+ v3.\*, and `erlef/setup-beam` v1.\*.
604604+- A note is included in the generated HTML documentation if a function is
605605+ deprecated.
606606+607607+## v0.31.0-rc1 - 2023-09-18
608608+609609+- The `@deprecated("...")` attribute can be used to mark a function as
610610+ deprecated. This will cause a warning to be emitted when the function is used.
611611+- A warning is now emitted if a module from a transitive dependency is imported.
612612+- Record access can now be used in case clause guards.
613613+- Fixed a bug where `manifest.toml` could contain absolute paths for path
614614+ dependencies.
615615+- The `as` keyword can now be used to assign the literal prefix to a variable
616616+ when pattern matching on a string.
617617+- The `if` conditional compilation, `external fn`, and `external type` syntaxes
618618+ have been removed.
619619+- The `description` flag for the `gleam new` command has been removed.
620620+- The highlight.js grammar included with generated HTML documentation has been
621621+ updated for the latest syntax.
622622+- Packages are no longer precompiled to Erlang when publishing to Hex if the
623623+ package target is set to JavaScript.
624624+- An exception is now raised if JavaScript code uses the `BitString` class
625625+ constructor and passes in the incorrect argument type.
626626+- Fixed a bug where mutually recursive functions could be incorrectly inferred
627627+ as having an overly general type.
628628+- Fixed a bug where recursive type constructors could incorrectly infer a type
629629+ error.
630630+- Fixed a bug where some mutually recursive functions would be inferred as
631631+ having too general a type.
632632+- Fixed a bug where constants where not being correctly inlined when used in the
633633+ size option of a bit string pattern match.
634634+- Fixed a bug where anonymous functions could parse successfully when missing a
635635+ body.
636636+- Fixed a bug where incorrect unused variable warnings could be emitted for code
637637+ that doesn't type check.
638638+- Fixed a bug where packages defaulting to the JavaScript target could have
639639+ modules missing from their HTML documentation when published.
640640+- Corrected some outdated links in error messages.
641641+- Hovering over a function definition will now display the function signature,
642642+ or the type of the hovered argument.
643643+- Use `import type` for importing types from typescript declarations.
644644+- Use `.d.mts` extension for typescript declarations to match `.mjs`.
645645+- Prefix module names with dollar sign in typescript to avoid name collisions.
646646+647647+## v0.30.4 - 2023-07-26
648648+649649+- External implementations are always referenced directly in generated code, to
650650+ avoid the overhead of an extra function call.
651651+- Fixed a bug where the compiler could infer incorrect generic type parameters
652652+ when analysing a module without type annotations with self recursive
653653+ functions that reference themselves multiple times.
654654+655655+## v0.30.3 - 2023-07-23
656656+657657+- Fixed a bug where JavaScript module path such as `node:fs` would be rejected.
658658+- New Gleam projects are created with `gleam_stdlib` v0.30, Erlang OTP v26.0.2,
659659+ Elixir v1.15.4, actions/checkout v3.5.1, and erlef/setup-beam v1.16.0.
660660+661661+## v0.30.2 - 2023-07-20
662662+663663+- Fixed a bug where the compiler could infer incorrect generic type parameters
664664+ when analysing a module without type annotations with self recursive
665665+ functions.
666666+- Fixed a bug where the formatter would incorrectly format external functions
667667+ by breaking the return annotation instead of the function arguments.
668668+669669+## v0.30.1 - 2023-07-13
670670+671671+- Fixed a bug where the language server could fail to import path dependencies
672672+ in monorepos.
673673+674674+## v0.30.0 - 2023-07-12
675675+676676+- A warning is now emitted for the deprecated external fn syntax.
677677+678678+## v0.30.0-rc4 - 2023-07-10
679679+680680+- An error is now emitted for invalid JavaScript external implementations.
681681+- Fixed a bug where Erlang external implementations could generate invalid code.
682682+683683+## v0.30.0-rc3 - 2023-07-05
684684+685685+- Fixed a bug where `gleam fix` would fail to parse command line flags.
686686+687687+## v0.30.0-rc2 - 2023-07-03
688688+689689+- Fixed a bug where `gleam fix` would merge external functions of the same name
690690+ but incompatible types.
691691+- Fixed a bug where external function arguments would incorrectly be marked as
692692+ unused.
693693+694694+## v0.30.0-rc1 - 2023-06-29
695695+696696+- The new `@target(erlang)` and `@target(javascript)` attribute syntax has been
697697+ added for conditional compilation. The existing `if` conditional compilation
698698+ syntax has been deprecated. Run `gleam fix` to update your code.
699699+- The new `type TypeName` syntax syntax replaces the `external type TypeName`
700700+ syntax. The existing external type syntax has been deprecated. Run `gleam format`
701701+ to update your code.
702702+- Adding a new dependency now unlocks the target package. This helps avoid
703703+ failing to find a suitable version for the package due to already being
704704+ locked.
705705+- A custom message can now be specified for `panic` with `panic as "..."`.
706706+- The syntax for specifying a custom message for `todo` is now `todo as "..."`.
707707+- The Erlang error raised by `let assert` is now tagged `let_assert`.
708708+- Types named `Dynamic` are now called `dynamic_` in Erlang to avoid a clash
709709+ with the new Erlang `dynamic` type introduced in OTP26.
710710+- Dependencies can now be loaded from paths using the
711711+ `packagename = { path = "..." }` syntax in `gleam.toml`.
712712+- The `javascript.deno.unstable` field in `gleam.toml` can now be used to
713713+ enable Deno's unstable APIs when targeting JavaScript.
714714+- Blockquotes are now styled in rendered HTML documentation.
715715+- The `gleam` property can be set in `gleam.toml` can be set to a version
716716+ requirement to specify the version of Gleam required to build the project.
717717+- Type aliases can now refer to type aliases defined later in the same module.
718718+- Fixed a bug where unapplied record constructors in constant expressions would
719719+ generate invalid Erlang.
720720+- Fixed a bug where the prescedence of `<>` and `|>` would clash.
721721+- Fixed a bug where `gleam docs build` would print an incorrect path upon
722722+ completion.
723723+- Warnings from dependency packages are no longer surfaced in the language
724724+ server.
725725+- A warning is now emitted when a Gleam file is found with an invalid name.
726726+- A warning is now emitted when using `list.length` to check for the empty list,
727727+ which is slow compared to checking for equality or pattern matching (#2180).
728728+- The new `gleam remove <package_name>` can be used to remove dependencies
729729+ from a Gleam project.
730730+- Fixed a bug where the formatter could crash.
731731+- Fixed a bug where invalid Erlang would be generated when piping into `panic`.
732732+- The `gleam docs build` command gains the `--open` flag to open the docs after
733733+ they are generated (#2188).
734734+- Fixed a bug where type annotations for constants could not be written with
735735+ type annotations.
736736+- Updated font loading in generated HTML documentation to fix an issue with
737737+ fonts not loading properly in some browsers (#2209).
738738+739739+## v0.29.0 - 2023-05-23
740740+741741+- New projects now require `gleam_stdlib` v0.29.
742742+743743+## v0.29.0-rc2 - 2023-05-22
744744+745745+- The `gleam lsp` command is no longer hidden from the help output.
746746+- Fixed a bug where some language server clients would show autocompletion
747747+ suggestions too eagerly.
748748+749749+## v0.29.0-rc1 - 2023-05-16
750750+751751+- The language server will now provide autocomplete suggestions for types and
752752+ values either imported or defined at the top level of the current module.
753753+- Fixed a bug where record patterns using the spread operator (`..`) to discard
754754+ unwanted arguments would not type check correctly when the record had no
755755+ labelled fields.
756756+- Add support for using sized binary segments in pattern matches when targeting
757757+ JavaScript.
758758+- A warning is now emitted for double unary negation on ints (`--`) and bools
759759+ (`!!`) as this does nothing but return the original value.
760760+- Previously the build tool would discard the entire build directory when dependencies
761761+ were changed. Now it will only discard the build artefacts for removed
762762+ dependencies.
763763+- The errors emitted when a name is reused in a module have been made clearer.
764764+- Fixed an incorrect URL in the error message for failing to parse a let binding
765765+ with a type annotation.
766766+- Fixed a bug where shadowing a prelude type name could result in incorrect
767767+ errors in exhaustiveness checking.
768768+- Fixed a bug where the language server would in some scenarios not remove an
769769+ error diagnostic after it becomes outdated.
770770+- Fixed a bug where the formatter would incorrectly format blocks with a comment
771771+ before them that were the only argument to a function call.
772772+- Fixed a bug where the language server would not reset the build directory when
773773+ it was created by a different version of Gleam.
774774+- New Gleam projects are created with `erlef/setup-beam@v1.15.4` in their GitHub
775775+ actions CI configuration.
776776+- Running a module now uses the dependency's target and runtime in its `gleam.toml`.
777777+778778+## v0.28.3 - 2023-04-17
779779+780780+- Fixed a bug where the language server would show outdated error diagnostics
781781+ when a new one was emitted in a different module.
782782+- Fixed a bug where the language server would attempt to analyse Gleam modules
783783+ that were outside of the `src` or `test` directories.
784784+- New Gleam projects are created with `actions/checkout@v3.5.1` and
785785+ `erlef/setup-beam@1.15.3` in their GitHub actions CI configuration.
786786+787787+## v0.28.2 - 2023-04-10
788788+789789+- Fixed a bug where comments above a `use` expression would be formatted
790790+ incorrectly.
791791+- Fixed a bug where the formatter would fail to preserve empty lines after a
792792+ block.
793793+- Fixed a bug where the formatter would fail to preserve empty lines after an
794794+ anonymous function with a return annotation.
795795+796796+## v0.28.1 - 2023-04-05
797797+798798+- Fixed a bug where the language server would unset too many error diagnostics
799799+ when multiple projects are open, more than one have errors, and one of them is
800800+ successfully compiled.
801801+- Fixed a bug where the language server would unset error diagnostics when
802802+ displaying information on hover.
803803+- Added support for type annotations in use statements.
804804+805805+## v0.28.0 - 2023-04-03
806806+807807+- New projects now require `gleam_stdlib` v0.28.
808808+809809+## v0.28.0-rc3 - 2023-03-31
810810+811811+- Fixed a bug where source links would be incorrect in HTML documentation.
812812+813813+## v0.28.0-rc2 - 2023-03-27
814814+815815+- Fixed a bug where single statement blocks inside binary operators could
816816+ generate invalid JavaScript.
817817+- Fixed a bug where the formatter could incorrectly place comments.
818818+- Fixed a bug where the language server would show outdated diagnostics when a
819819+ file with an error reverts to the previous valid version, causing the compiler
820820+ to use the cached version of the file.
821821+822822+## v0.28.0-rc1 - 2023-03-26
823823+824824+- The language server now analyzes files on edit rather than on save, providing
825825+ feedback faster.
826826+- The language server now supports editor sessions that span multiple projects.
827827+ This is useful for mono-repos and projects with both a frontend and backend in
828828+ Gleam.
829829+- The language server now also shows documentation on hover for expressions.
830830+- The language server now shows types and documentation on hover for patterns.
831831+- Added support for negation of integers with the new `-` unary operator.
832832+- Variable assignments are now only permitted within a function or a block, not
833833+ anywhere that an expression is permitted.
834834+- The deprecated `try` expression has been removed.
835835+- The deprecated `assert ... = ...` syntax has been removed.
836836+- Semicolons are no longer whitespace. An error will be emitted if one is
837837+ encountered.
838838+- Warnings are now immediately emitted rather than being buffered until the end
839839+ of the compilation.
840840+- The `--warnings-as-errors` flag is now supported by `gleam build`.
841841+- Blocks are now preserved by the formatter when they only have a single
842842+ expression within them.
843843+- Generated docs now export more meta data to improve the developer experience,
844844+ accessibility and search engine discoverability.
845845+- Files are now only recompiled if they have changed since the last compilation,
846846+ detected by file hash and modification time. Previously only the modification
847847+ time was used.
848848+- Autocompletion of module imports was removed due to a buggy implementation.
849849+- Fixed a bug where the formatter would incorrectly remove `{ ... }` from bit
850850+ string segment value expressions.
851851+- Fixed a bug where TypeScript type definitions files could include incorrect
852852+ type names.
853853+- Fixed a bug where the compiler used VSCode specific behaviour in the language
854854+ server which was incompatible with Helix.
855855+- Fixed a bug where string concatenation patterns on strings with escape
856856+ characters would generate javascript code with wrong slice index.
857857+- Fixed a bug where blocks could parse incorrectly.
858858+- Allow modules to be run with the `gleam run --module` command.
859859+860860+## v0.27.0 - 2023-03-01
861861+862862+- Fixed a bug where `panic` could generate incorrect JavaScript code.
863863+- New projects now require `gleam_stdlib` v0.27.
864864+865865+## v0.27.0-rc1 - 2023-02-26
866866+867867+- The new `panic` keyword can be used to crash the program. This may be useful
868868+ for situations in which a program has got into an unrecoverable invalid state.
869869+- `try` expressions are now deprecated and will be removed in a future version.
870870+- The new `gleam fix` command can be used to automatically convert `try`
871871+ expressions to `use` expressions.
872872+- `let assert ... = ...` is now the syntax for assertion assignments. The
873873+ `assert ... = ...` syntax is deprecated and will be removed in a future
874874+ version. Run `gleam format` to automatically update your code.
875875+- `gleam export hex-tarball` can be used to create a tarball suitable for
876876+ uploading to a Hex compatible package repository.
877877+- The unused private type and constructor detection has been improved.
878878+- The argument `--runtime` now accepts `nodejs` as the name for that runtime.
879879+ The previous name `node` is still accepted.
880880+- Patterns can now be used in `use` expressions.
881881+- Fixed a bug where string concatenation patterns could generate javascript
882882+ code with wrong slice index due to ut8/ut16 length mismatch.
883883+- The Erlang compiler will no longer emit a duplicate warning for unused
884884+ variables.
885885+- Fixed a bug where typescript type definitions for types with unlabelled
886886+ arguments where generated with an invalid identifier and unlabelled fields
887887+ were generated with a name that didn't match the javascript implementation.
888888+- Fixed a bug in the type inferrer were unannotated functions that were
889889+ used before they were defined in a module could in rare cased be inferred
890890+ with a more general type than is correct.
891891+- Fixed a bug where the LSP would fail to show type information on hover for
892892+ expressions after a use expression.
893893+- Fixed a bug where imported constants could generated incorrect JavaScript
894894+ code.
895895+- Fixed a bug where the LSP would perform codegen for dependencies.
896896+- Fixed a bug where the LSP would compile native dependencies needlessly.
897897+- Fixed a bug where integer division with large numbers on JavaScript could
898898+ produce incorrect results.
899899+- Fixed a bug where pattern matches on custom types with mixed labelled and
900900+ unlabelled arguments could not be compiled when targeting JavaScript.
901901+- Fixed a bug where local variables in case guard constant expressions caused
902902+ the compiler to panic.
903903+- The formatter now truncates meaningless zeroes of floats' fractional parts.
904904+- Anonymous functions may now have an empty body. The compiler will emit a
905905+ warning for functions without a body, and these functions will crash at
906906+ runtime if executed.
907907+- Fixed bug where raised errors on JS would have an extra stack frame recorded
908908+ in them.
909909+910910+## v0.26.2 - 2023-02-03
911911+912912+- The formatter now wraps long `|` patterns in case clauses over multiple lines.
913913+- Fixed a bug where unlabelled function arguments could be declared after
914914+ labelled ones.
915915+- A broken link was removed from the error messages.
916916+- Fixed a bug where using a qualified imported record constructor function as a
917917+ value would produce invalid Erlang code if the name of the record variant was
918918+ an Erlang reserved word.
919919+920920+## v0.26.1 - 2023-01-22
921921+922922+- New projects now require `gleeunit` v0.10.
923923+- Rebar3 dependency projects are now compiled in-place. This fixes an issue
924924+ where some NIF using projects would fail to boot due to some paths not being
925925+ copied to the `build` directory.
926926+- An error is now emitted if a list spread expression is written without a tail
927927+ value.
928928+- An error is now emitted when a function is defined with multiple arguments
929929+ with the same name.
930930+- The error message emitted when a `let` does not match all possible values has
931931+ been improved.
932932+- Fixed a bug where the language server wouldn't analyse test code.
933933+- Fixed a bug where `assert` expressions can generate invalid Erlang.
934934+ warning.
935935+- Fixed a bug where arguments would be passed incorrectly to Deno.
936936+- Fixed a bug where defining variables that shadow external functions could
937937+ generate invalid JavaScript.
938938+939939+## v0.26.0 - 2023-01-19
940940+941941+[Release blog post](https://gleam.run/news/v0.26-incremental-compilation-and-deno/)
942942+943943+- New projects require `gleam_stdlib` v0.26 and `gleeunit` v0.9.
944944+- Fixed a bug where JavaScript default projects would fail to publish to Hex.
945945+946946+## v0.26.0-rc1 - 2023-01-12
947947+948948+- Added support for Deno runtime for JavaScript target.
949949+- Scientific notation is now available for float literals.
950950+- The compiler now supports incremental compilation at the module level. If a
951951+ module or its dependencies have not been changed then it will not be
952952+ recompiled.
953953+- The format used by the formatter has been improved.
954954+- 4 digit integers are now always formatted without underscores.
955955+- Running `gleam new` will skip `git init` if the new project directory is
956956+ already part of a git work tree.
957957+- Generated HTML documentation now includes all static assets, including web
958958+ fonts, so that it can be accessed offline and in future once CDNs would 404.
959959+- Generated HTML documentation now supports TypeScript syntax highlighting.
960960+- New Gleam projects are created using GitHub actions erlef/setup-beam@v1.15.2.
961961+- Some modules can now be hidden from the docs by specifying a list of glob
962962+ patterns in `internal_modules` in `gleam.toml`. The default value for this
963963+ list is `["$package_name/internal", "$package_name/internal/*"]`.
964964+- The `gleam new` command gains the `--skip-git` flag to skip creation of
965965+ `.git/*`, `.gitignore` and `.github/*` files.
966966+- The `gleam new` command gains the `--skip-github` flag to skip creation of
967967+ `.github/*` files.
968968+- Fixed a bug where no error would be emitted if a `src` module imported a
969969+ `test` module.
970970+- Fixed a bug where comments in list prepending expressions could be formatted
971971+ incorrectly.
972972+- Fixed a bug where comments in record update expressions could be formatted
973973+ incorrectly.
974974+- Fixed a bug where long `use` expressions could be formatted incorrectly.
975975+- Fixed a bug integer multiplication would overflow large integers when
976976+ compiling to JavaScript.
977977+- Fixed `int` and `float` formatting in `const`s and patterns.
978978+- Fixed a bug where piping into a function capture expression with a pipe as one
979979+ of the arguments would produce invalid Erlang code.
980980+- Formatter no longer removes new lines in expression blocks within case branches
981981+982982+## v0.25.3 - 2022-12-16
983983+984984+- 4 digit integers are no longer automatically formatted with underscores.
985985+986986+## v0.25.2 - 2022-12-16
987987+988988+- Updated `actions/checkout` from `actions/checkout@v3.0.0` to `@v3.2.0` for
989989+ projects created via `gleam new`.
990990+- Fixed a bug where `gleam new` would set a `Rebar3` version to `25.1`
991991+ instead of the latest stable `3`.
992992+- Updated following runtime versions set via `gleam new`: `Erlang/OTP`
993993+ to `25.2`, and `Elixir` to `1.14.2`.
994994+- The formatter now inserts underscores into larger `Int`s and the larger
995995+ integer parts of `Float`s.
996996+- Added support for top level TypeScript file inclusion in builds.
997997+- The build tool will now favour using rebar3 over Mix for packages that support
998998+ both. This fixes an issue where some packages could not be compiled without
999999+ Elixir installed even though it is not strictly required.
10001000+10011001+## v0.25.1 - 2022-12-11
10021002+10031003+- New Gleam projects are now configured to explicitly install rebar3 using
10041004+ GitHub actions erlef/setup-beam.
10051005+- A better error message is now shown when attempting to use a function within a
10061006+ constant expression.
10071007+- Changed float size limit in bit string expressions to 16, 32 or 64, when static.
10081008+ Also allowed dynamic size.
10091009+- New Gleam projects are created using GitHub actions erlef/setup-beam@v1.15.0.
10101010+- Fixed a bug where returning an anonymous function from a pipeline and calling
10111011+ it immediately without assigning it to a variable would produce invalid Erlang
10121012+ code.
10131013+- Fixed a bug where the formatter would remove the braces from negating boolean
10141014+ expressions.
10151015+10161016+## v0.25.0 - 2022-11-24
10171017+10181018+[Release blog post](https://gleam.run/news/v0.25-introducing-use-expressions/)
10191019+10201020+## v0.25.0-rc2 - 2022-11-23
10211021+10221022+- Fixed a bug where Gleam dependency packages with a `priv` directory could fail
10231023+ to build.
10241024+- Fixed a regression where Elixir and Erlang Markdown code blocks in generated
10251025+ documentation would not be highlighted.
10261026+10271027+## v0.25.0-rc1 - 2022-11-19
10281028+10291029+- Generated HTML documentation now includes the `theme-color` HTML meta tag.
10301030+- The `use` expression has been introduced. This is a new syntactic sugar that
10311031+ permits callback using code to be written without indentation.
10321032+- Nightly builds are now also published as OCI container images hosted on
10331033+ GitHub.
10341034+- Fixed a bug where the build tool would not hook up stdin for Gleam programs it
10351035+ starts.
10361036+- Fixed a bug where using a record constructor as a value could generate a
10371037+ warning in Erlang.
10381038+- Fixed a bug where the build tool would use precompiled code from Hex packages
10391039+ rather than the latest version, which could result in incorrect external
10401040+ function usage in some cases.
10411041+- Fixed a bug where the warning for `todo` would not print the type of the code
10421042+ to complete.
10431043+- Fixed a bug where `try` expressions inside blocks could generate incorrect
10441044+ JavaScript.
10451045+- Generated HTML documentation now includes all static assets (but the web
10461046+ fonts), so that it can be accessed offline or in far future once CDNs would 404.
10471047+- New Gleam projects are created using GitHub actions erlef/setup-beam@v1.14.0
10481048+- The `javascript.typescript_declarations` field in `gleam.toml` now applies to
10491049+ the entire project rather than just the top level package.
10501050+- The formatter now adds a `0` to floats ending with `.` (ie `1.` => `1.0`).
10511051+- New projects require `gleam_stdlib` v0.25.
10521052+10531053+## 0.24.0 - 2022-10-25
10541054+10551055+[Release blog post](https://gleam.run/news/gleam-v0.24-released/)
10561056+10571057+## 0.24.0-rc4 - 2022-10-23
10581058+10591059+- Fixed a bug where the string concatenate operator could produce invalid Erlang
10601060+ code when working with pipe expressions.
10611061+10621062+## 0.24.0-rc3 - 2022-10-20
10631063+10641064+- Fixed a bug where the OOP method call error hint would be shown on too many
10651065+ errors.
10661066+- Fixed a bug where the string concatenate operator could produce invalid Erlang
10671067+ code when working with constant values.
10681068+10691069+## 0.24.0-rc2 - 2022-10-18
10701070+10711071+- Fixed a bug where imported and qualified record constructors used in constant
10721072+ expressions could fail to resolve.
10731073+10741074+## 0.24.0-rc1 - 2022-10-15
10751075+10761076+- Gleam can now compile Elixir files within a project's `src` directory.
10771077+- The `<>` operator can now be used for string concatenation and for string
10781078+ prefix pattern matching.
10791079+- Fixed a bug where TypeScript definitions may have incorrect type parameters.
10801080+- New projects depend on `gleam_stdlib` v0.24.
10811081+- New projects' GitHub Actions config specifies Erlang/OTP 25.1 and suggest
10821082+ Elixir 1.14.1.
10831083+- If you attempt to use the method call syntax (`thing.method()`) on a value
10841084+ without that field the error message will now include a hint explaining that
10851085+ Gleam is not object oriented and does not have methods.
10861086+- Fixed a bug in the formatter where multiple line documentation comments for
10871087+ custom type constructor fields could be formatted incorrectly.
10881088+- Fixed a bug where tail call optimisation could be incorrectly applied when
10891089+ compiling to JavaScript in some situations.
10901090+- Fixed a bug where the remainder operator would return NaN results when the
10911091+ right hand side was zero when compiling to JavaScript.
10921092+- Fixed a bug where Elixir dependencies would fail to compile on Windows.
10931093+- Fixed a bug where images added to HTML documentation via documentation
10941094+ comments would not have a max width.
10951095+10961096+## v0.23.0 - 2022-09-15
10971097+10981098+[Release Blog Post](https://gleam.run/news/gleam-v0.23-released/)
10991099+11001100+## v0.23.0-rc2 - 2022-09-15
11011101+11021102+- New Gleam projects are created using GitHub actions erlef/setup-beam@v1.13.0
11031103+ and actions/checkout@v3.0.0.
11041104+- New Gleam projects are created using version v0.23.0 of the stdlib.
11051105+- Fixed a bug where LSP hovering would fail to locate the expression.
11061106+11071107+## v0.23.0-rc1 - 2022-09-01
11081108+11091109+- Gleam can now build dependency packages that are managed using Mix.
11101110+- Compiler performance has been improved by buffering disc writing and by lazily
11111111+ loading TLS certs. In testing this doubles performance when compiling the
11121112+ standard library.
11131113+- The `gleam publish` command now adds the `priv` directory and any `NOTICE`
11141114+ file to the tarball.
11151115+- The `gleam update` command can now be used to update dependency packages to
11161116+ their latest versions.
11171117+- Module functions with empty bodies are no longer syntax errors.
11181118+- The format used by the formatter has been improved.
11191119+- OpenSSL swapped out for RustTLS.
11201120+- Generated HTML documentation now includes a search bar.
11211121+- The LSP will now provide autocompletion for imports.
11221122+- A helpful error message is now returned when assignments are missing either a
11231123+ keyword or a value.
11241124+- Qualifiers are now used when multiple types have the same name in an error
11251125+ message.
11261126+- In JavaScript, if an object has defined an `equals` method in its prototype,
11271127+ Gleam will now use this method when checking for equality.
11281128+- Functions can now be defined and referenced in constant expressions.
11291129+- An error is now raised if the record update syntax is used with a custom type
11301130+ that has multiple constructors.
11311131+- An error is now raised if a module is imported multiple times.
11321132+- Fixed a bug where defining a type named `CustomeType` would product invalid
11331133+ JavaScript.
11341134+- Fixed a bug where defining a variable with the same name as an unqualified
11351135+ import would produce invalid JavaScript.
11361136+- Fixed a bug where piping to `todo` would generate invalid Erlang code.
11371137+- Fixed a bug where inspecting a JavaScript object with a null prototype would
11381138+ crash.
11391139+- Fixed a bug where the formatter could crash if source code contained 3 or more
11401140+ empty lines in a row.
11411141+- Fixed a bug where the formatter would remove braces from blocks used as the
11421142+ subject of a case expression.
11431143+- Fixed a bug alternative patterns with a clause containing a pipe with a pipe
11441144+ after the case expresson could render incorrect Erlang.
11451145+- Fixed a bug where formatter would strip curly braces around case guards even
11461146+ when they are required to specify boolean precedence.
11471147+- Fixed a bug where `gleam new` would in some situations not validate the
11481148+ target directory correctly.
11491149+- Fixed a bug where pipes inside record update subjects could generate invalid
11501150+ Erlang.
11511151+- Fixed a bug where pipes inside record access could generate invalid Erlang.
11521152+11531153+## v0.22.1 - 2022-06-27
11541154+11551155+- The `gleam publish` confirmation prompt now accepts both "Y" and "y".
11561156+- Fixed a bug where `todo` would not emit the correct line number to the LSP while.
11571157+11581158+## v0.22.0 - 2022-06-12
11591159+11601160+[Release Blog Post](https://gleam.run/news/gleam-v0.22-released/)
11611161+11621162+- New projects are created with `gleam_stdlib` v0.22.
11631163+11641164+## v0.22.0-rc1 - 2022-06-12
11651165+11661166+- Fixed a bug where doc comments would dissociate from their statements when
11671167+ generating html documentation.
11681168+- You are now allowed to use named accessors on types with multiple constructors if the
11691169+ accessor's name, position and type match (among the constructors) (#1610).
11701170+- Added the ability to replace a release up to one hour after it is published
11711171+ using `gleam publish --replace`.
11721172+- `gleam publish`, `gleam docs publish`, `gleam docs remove`, `gleam hex retire`,
11731173+ and `gleam hex unretire` now have access to environment variables for
11741174+ username (default key `HEXPM_USER`) and password (default key `HEXPM_PASS`)
11751175+- The `gleam publish` command gains the `-y/--yes` flag to disable the "are you
11761176+ sure" prompt.
11771177+- Clear outdated files from the build directory after compilation.
11781178+- Fixed a bug where immediately calling the value that a case expression
11791179+ evaluates to could generate invalid JavaScript.
11801180+- Fixed a bug where the default project target is set to JavaScript,
11811181+ but the project would run on target Erlang instead.
11821182+- The compiler is now able to generate TypeScript declaration files on target
11831183+ JavaScript (#1563). To enable this edit `gleam.toml` like so:
11841184+11851185+ ```toml
11861186+ [javascript]
11871187+ typescript_declarations = true
11881188+ ```
11891189+11901190+- Fixed a bug where argument labels were allowed for anonymous functions.
11911191+- Fixed a bug where JavaScript code could be invalid if a variable is defined
11921192+ inside an anonymous function with a parameter with the same name as the
11931193+ variable.
11941194+- Fixed a bug where importing a JavaScript function named "then" could produce
11951195+ invalid code.
11961196+- Fixed a bug where constants that reference locally defined custom types could
11971197+ render invalid JavaScript.
11981198+- The project generator will no longer permit use of the reserved `gleam_`
11991199+ prefix.
12001200+- Generated HTML docs easter egg updated.
12011201+- `gleam export erlang-shipment` can be used to create a directory of compiled
12021202+ Erlang bytecode that can be used as a deployment artefact to get your
12031203+ application live.
12041204+- `gleam format` will now preserve (up to one) empty lines between consecutive
12051205+ comments, as well as between comments and any following expression
12061206+- The deprecated rebar3 integration has been removed.
12071207+- Fixed a bug where `gleam format` would output an unwanted newline at the top
12081208+ of documents that only contain simple `//` comments.
12091209+- No longer add `dev-dependencies` to generated `.app` Erlang files unless
12101210+ we're compiling the root project (#1569).
12111211+- Fixed a bug where the formatter could render a syntax error with lists on long
12121212+ unbreakable lines.
12131213+- Fixed a bug where JavaScript variable names could be incorrectly reused.
12141214+- Fixed a bug where `gleam format` would remove the braces around a tuple index
12151215+ access when accessing a field of the returned element.
12161216+- Fixed a bug case clause guards could render incorrect JavaScript if a variable
12171217+ name was rebinded in the clause body.
12181218+- The `gleam compile-package` command no longer generates a `.app` file. This
12191219+ should now be done by the build tool that calls this command as it is
12201220+ responsible for handling dependencies.
12211221+- Fixed a bug where piping a list tail would create invalid Erlang code (#1656).
12221222+12231223+## v0.21.0 - 2022-04-24
12241224+12251225+[Release Blog Post](https://gleam.run/news/v0.21-introducing-the-gleam-language-server/)
12261226+12271227+- New projects are created with `gleam_stdlib` v0.21.
12281228+12291229+## v0.21.0-rc2 - 2022-04-20
12301230+12311231+- Added the ability to replace a release up to one hour after it is published
12321232+ using `gleam publish --replace`.
12331233+- The language server will now enter a degraded mode that only performs
12341234+ formatting if running in a directory that is not a Gleam project with a
12351235+ `gleam.toml`.
12361236+12371237+## v0.21.0-rc1 - 2022-04-16
12381238+12391239+- The Gleam language server is here! This will provide IDE like features for
12401240+ code editors that support LSP, including but not limited to VSCode, Neovim,
12411241+ Emacs, Eclipse, Visual Studio, and Atom. This first version includes these
12421242+ features:
12431243+ - Project compilation.
12441244+ - Inline errors and warnings.
12451245+ - Type information on hover.
12461246+ - Go-to definition.
12471247+ - Code formatting.
12481248+- Fixed a bug in generated JavaScript code where functions named `then` would
12491249+ cause errors when dynamically imported.
12501250+- Initialize `git` repo when creating a new project.
12511251+- Log messages controlled with `GLEAM_LOG` now print to standard error.
12521252+- Log message colours can be disabled by setting the `GLEAM_LOG_NOCOLOUR`
12531253+ environment variable.
12541254+- You can now specify multiple packages when using `gleam add`.
12551255+- Bools can now be negated with the `!` unary operator.
12561256+- If the compiler version changes we now rebuild the project from scratch on
12571257+ next build command to avoid issues arising from reading metadata in an old
12581258+ format (#1547).
12591259+- Updated the "Unknown label" error message to match other error messages
12601260+ (#1548).
12611261+- Type holes are now permitted in function arguments and return annotations
12621262+ (#1519).
12631263+- Unused module imports now emit a warning (#1553).
12641264+- The error message for failing to parse a multiline clauses without curly
12651265+ braces has been improved with a hint on how to fix the issue (#1555).
12661266+- The error messages for when rebar3 or Erlang are missing from the machine has
12671267+ been improved with a tip on how to install them (#1567).
12681268+- Corrected the hint given with certain int and float binary operator type
12691269+ errors.
12701270+- Add support for `int` and `float` bit string type when compiling to JavaScript.
12711271+- Add support for specifying size of integers in a bit string. Supports only exact binaries,
12721272+ i.e. length is a multiple of 8.
12731273+- Fixed compilation of rebar3 based dependencies on Windows.
12741274+12751275+## v0.20.1 - 2022-02-24
12761276+12771277+- The type checker has been improved to enable use of the record access syntax
12781278+ (`record.field`) in anonymous functions passed into higher order functions
12791279+ without additional annotations.
12801280+12811281+## v0.20.0 - 2022-02-23
12821282+12831283+[Release Blog Post](https://gleam.run/news/gleam-v0.20-released/)
12841284+12851285+- New projects are created with `gleam_stdlib` v0.20.
12861286+12871287+## v0.20.0-rc1 - 2022-02-20
12881288+12891289+- Type unification errors involving user annotated types now refer to the names
12901290+ specified by the user instead of internal rigid-type ids.
12911291+- The build tool now validates that listed licenses are valid SPDX expressions.
12921292+- A WebAssembly version of the compile is now available for use in JavaScript
12931293+ and other WebAssembly environments.
12941294+- New projects include Hex badges and a link to Hexdocs.
12951295+- Enhance type mismatch errors in the presence of try.
12961296+- Enhance type mismatch error for an inconsistent try.
12971297+- Enhance type mismatch error for pipe expressions to show the whole pipeline
12981298+ and not only its first line.
12991299+- Fixed a bug where sometimes type variable could be reused result in incorrect
13001300+ non-deterministic type errors.
13011301+- Built in support for the Mix build tool has been removed. The `mix_gleam`
13021302+ plugin is to be used instead.
13031303+- Introduce a limited form of exhaustiveness checking for pattern matching
13041304+ of custom types, which only checks that all constructor tags are covered
13051305+ at the top level of patterns.
13061306+- The `ebin` directory is now copied to the build directory for rebar3 managed
13071307+ dependencies if present before compilation.
13081308+- The format used by the formatter has been improved.
13091309+- Package names in `gleam.toml` are validated when the config is read.
13101310+- The `priv` directory is linked into the build directory for Gleam projects
13111311+ managed by the build tool.
13121312+- Fixed a bug where type errors from pipes could show incorrect information.
13131313+- Fixed a bug where types could not be imported if they had the same name as a
13141314+ value in the prelude.
13151315+13161316+## v0.19.0 - 2022-01-12
13171317+13181318+Dedicated to the memory of Muhammad Shaheer, a good and caring man.
13191319+13201320+[Release Blog Post](https://gleam.run/news/gleam-v0.19-released/)
13211321+13221322+## v0.19.0-rc4 - 2022-01-10
13231323+13241324+- New projects are created with `gleam_stdlib` v0.19 and `gleeunit` v0.6.
13251325+- Fixed a bug where external functions could be specified with the wrong module
13261326+ name in generated Erlang when imported from a nested module in another
13271327+ package.
13281328+- Fixed a bug where warnings wouldn't get printed.
13291329+13301330+## v0.19.0-rc3 - 2022-01-07
13311331+13321332+- Fixed a bug where precompiled packages would fail to compile due to Erlang
13331333+ files being compiled twice concurrently.
13341334+13351335+## v0.19.0-rc2 - 2022-01-06
13361336+13371337+- Erlang modules are now compiled in a multi-core fashion.
13381338+- New projects are created with `erlef/setup-beam` v1.9.0 instead of
13391339+ `gleam-lang/setup-erlang` and `gleam-lang/setup-gleam`.
13401340+- Fixed a bug where tail call optimisation could generate incorrect code when
13411341+ the function has argument names that are JavaScript keywords.
13421342+- Fixed a bug where the build would continue when dependency packages failed to
13431343+ compile.
13441344+- Fixed a bug where `include` directories would not be accessible by the Erlang
13451345+ compiler during Gleam compilation.
13461346+13471347+## v0.19.0-rc1 - 2022-01-03
13481348+13491349+- The build tool now supports the JavaScript target. The target can be specified
13501350+ in either `gleam.toml` or using the `--target` flag.
13511351+- The `gleam check` command has been introduced for rapidly verifying the types
13521352+ of Gleam code without performing codegen.
13531353+- `true` and `false` can no longer be used as pattern matching variables, to
13541354+ avoid accidental uses of incorrect syntax that is popular in other languages.
13551355+ An error will hint about using Gleam's `True` and `False` values instead.
13561356+- You can now remove build artifacts using the new `gleam clean` command.
13571357+- The `compile-package` can now generate `package.app` files and compile source
13581358+ modules to `.beam` bytecode files.
13591359+- The flags that `compile-package` accepts have changed.
13601360+- Published Hex packages now include precompiled Erlang files.
13611361+- Erlang record headers are now written to the `include` directory within the
13621362+ package build directory.
13631363+- The format used by the formatter has been improved.
13641364+- Fixed a bug where tail recursion could sometimes generated incorrect
13651365+ JavaScript code.
13661366+- Performance of code generators has been slightly improved.
13671367+- Allow the record in a record expansion to be an expression that returns a
13681368+ record.
13691369+- Fixed a bug where external function module names would not be escaped
13701370+ correctly if they contained special characters and were assigned to a
13711371+ variable.
13721372+- A helpful error message is shown if Erlang is not installed.
13731373+13741374+## v0.18.2 - 2021-12-12
13751375+13761376+- Erlang applications are now automatically started when the VM is started by
13771377+ `gleam run` and `gleam test`.
13781378+13791379+## v0.18.1 - 2021-12-12
13801380+13811381+- Fixed a bug where pipe expressions in record updates and operator expressions
13821382+ could generate incorrect Erlang code.
13831383+- The `priv` directory is now copied to the output directory for rebar3 packages
13841384+ prior to compilation. This is required for some packages to compile.
13851385+- Fixed a bug where deps that fail to compile would be skipped when compilation
13861386+ would next be attempted, resulting the project being in an invalid state.
13871387+13881388+## v0.18.0 - 2021-12-06
13891389+13901390+[Release Blog Post](https://gleam.run/news/gleam-v0.18-released/)
13911391+13921392+- New projects now include `gleeunit`.
13931393+13941394+## v0.18.0-rc3 - 2021-12-05
13951395+13961396+- URL format in gleam.toml is now validated.
13971397+- The `gleam deps list` command has been added.
13981398+- Fixed a bug where changing requirements in `gleam.toml` would not cause deps
13991399+ to be re-resolved.
14001400+- Fixed a bug where locked deps would cause incompatible package requirements to
14011401+ be discarded.
14021402+- Development dependencies are now included in the applications listed in the
14031403+ generated OTP `.app` file.
14041404+- `gleam.toml` now includes an `erlang.extra_applications` key to specify extra
14051405+ OTP applications that need to be started.
14061406+14071407+## v0.18.0-rc2 - 2021-11-26
14081408+14091409+- Fixed a bug where OTP .app files would be generated with invalid syntax.
14101410+- Removed extra whitespace from newly generated projects.
14111411+14121412+## v0.18.0-rc1 - 2021-11-25
14131413+14141414+- Gleam can now compile Gleam projects.
14151415+- Gleam can now run tests with the `gleam eunit` command.
14161416+- Gleam can now run programs with the `gleam run` command.
14171417+- Gleam can now run an Erlang shell with the `gleam shell` command.
14181418+- Gleam can now resolve package versions for a Gleam project's dependency tree.
14191419+- Gleam can now download Hex packages.
14201420+- Gleam can now build dependency packages that are managed using Gleam or
14211421+ rebar3.
14221422+- Gleam is now the default build tool for new projects.
14231423+- The template names for `gleam new` have been changed.
14241424+- Fixed a bug where the error message for a record update with an unknown field
14251425+ would point to all the fields rather than the unknown one.
14261426+- Improved styling for inline code in generated documentation.
14271427+- New projects use v0.18 of the stdlib.
14281428+14291429+## v0.17.0 - 2021-09-20
14301430+14311431+[Release Blog Post](https://gleam.run/news/gleam-v0.17-released/)
14321432+14331433+- Functions now get special handling when being printed from JavaScript.
14341434+14351435+## v0.17.0-rc2 - 2021-09-19
14361436+14371437+- Errors thrown when no case clause or assignment pattern matches the subject
14381438+ value now include more debugging information when targeting JavaScript.
14391439+- New projects are generated using `gleam_stdlib` v0.17.1.
14401440+14411441+## v0.17.0-rc1 - 2021-09-11
14421442+14431443+- Redesigned the Gleam prelude to be a module of core classes when compiling to
14441444+ JavaScript. This improves the resulting generated code and makes debugging and
14451445+ interop easier.
14461446+- Projects without rebar3 can be generated using the `gleam-lib` template.
14471447+- JavaScript modules are imported using a camel case variable name to avoid name
14481448+ collisions with variables.
14491449+- Pipelines now use assignments in the generated code in order to preserve the
14501450+ order of any side effects.
14511451+- Fixed a bug where the compiler would crash rather than raise an error if a
14521452+ project contained a single module and attempted to import another.
14531453+- Special variable naming has been made more consistent in rendered Erlang and
14541454+ JavaScript.
14551455+- Conditional compilation can now be used to have different code within a module
14561456+ when compiling to a specific target.
14571457+- Fixed a bug where `todo` caused values not to be returned in JavaScript.
14581458+- Fixed a bug where multiple discarded function arguments generated invalid
14591459+ JavaScript.
14601460+- Fixed a bug where using JavaScript reserved words as function argument names
14611461+ caused generated invalid JavaScript.
14621462+- Fixed a bug where a case expression of just a catch-all pattern generated
14631463+ invalid JavaScript.
14641464+- Fixed a bug where the formatter would incorrectly render extra newlines below
14651465+ try expressions.
14661466+- Fixed a bug where tail recursive functions with arguments with the same name
14671467+ as JavaScript reserved words generated the wrong JavaScript.
14681468+- Fixed a bug where list equality would be incorrectly reported in JavaScript.
14691469+- Multiple subjects are now supported for case expressions in JavaScript.
14701470+- Fixed a bug where matching using a Bool or Nil literal as the subject for a
14711471+ case expression would produce invalid code when compiling to JavaScript.
14721472+- Unsupported feature error messages now include file path and line numbers for
14731473+ debugging.
14741474+- Bit string literals with no segment options or just the `bit_string`, `utf8`
14751475+ or `utf8_codepoint` options can be constructed when compiling to JavaScript.
14761476+- The format of generated JavaScript has been improved.
14771477+- Fixed a bug where rendered JavaScript incorrectly incremented variables when
14781478+ reassigned in patterns.
14791479+- Added `eval` and `arguments` to JavaScript reserved words.
14801480+- Support for the deprecated `tuple(x, y, ...)` syntax has been removed in favor
14811481+ of the more concise (`#(x, y, ...)`). Use `gleam format` with the previous
14821482+ version of the compiler to auto-migrate.
14831483+- New OTP projects are generated using `gleam_otp` v0.1.6.
14841484+- Fixed a bug where the equality operators could return the incorrect value for
14851485+ records when compiling to JavaScript.
14861486+- Fixed a bug where `todo` could sometimes render invalid JavaScript when used
14871487+ as an expression in the generated code.
14881488+- An error is now emitted if the list spread syntax is used with no prepended
14891489+ elements `[..xs]`.
14901490+- Fixed a bug where type errors inside piped expressions would be incorrectly be
14911491+ reported as being an incorrect usage of the pipe operator.
14921492+- Gleam modules with no public exports no longer render private members in
14931493+ Erlang.
14941494+- Fixed a bug where discard variables used in assert assignments would generate
14951495+ invalid Erlang code.
14961496+- Fixed a bug where some expressions as case subjects would generate invalid
14971497+ JavaScript code.
14981498+- Fixed a bug where some assignments as the final expression in a function would
14991499+ not return the correct value in JavaScript.
15001500+- Gleam packages imported in JavaScript now have the path prefix
15011501+ `gleam-packages`. This can be served from your web server or aliased in your
15021502+ `package.json` for NodeJS projects.
15031503+- Fixed a bug where the type checker would fail to generalise some type
15041504+ variables, causing module metadata writing to fail.
15051505+- Fixed a bug where tail call optimisation when compiling to JavaScript could
15061506+ result in incorrect code.
15071507+- Fixed a bug where variable names could be rendered incorrectly in closures.
15081508+- An error is now emitted if alternative patterns fail to define all the
15091509+ variables defined by the first pattern.
15101510+- New projects are generated using `gleam_stdlib` v0.17.0.
15111511+- New projects are generated using `gleam_otp` v0.2.0.
15121512+15131513+## v0.16.1 - 2021-06-21
15141514+15151515+- Values which are being imported more than once in an unqualified fashion now
15161516+ cause an error to be reported.
15171517+- Argument docs for custom type constructors are now rendered in the HTML
15181518+ documentation.
15191519+- Patterns can be used with `try` expressions when compiling to JavaScript.
15201520+- Types and record constructors can now be aliased with an uppercase name when
15211521+ imported. Aliasing them with a lowercase name is no longer permitted.
15221522+- Fixed a bug where nested import paths could be rendered incorrectly in
15231523+ JavaScript.
15241524+15251525+## v0.16.0 - 2021-06-17
15261526+15271527+[Release Blog Post](https://gleam.run/news/gleam-v0.16-released/)
15281528+15291529+## v0.16.0-rc4 - 2021-06-17
15301530+15311531+- Fixed a bug where if a JavaScript global function was imported as an external
15321532+ function with the same name the generated code would diverge.
15331533+15341534+## v0.16.0-rc3 - 2021-06-17
15351535+15361536+- New projects are generated using `gleam_stdlib` v0.16.0.
15371537+15381538+## v0.16.0-rc2 - 2021-06-08
15391539+15401540+- Gleam now supports alternative patterns in case expressions for the JavaScript target.
15411541+- The `gleam` prelude module can now be imported when compiling to JavaScript.
15421542+- Fixed a bug where the prelude module could not be imported when using the old
15431543+ build compiler API.
15441544+- Fixed a bug where if a JavaScript global function was imported as an external
15451545+ function with the same name the generated code would diverge.
15461546+- Type error messages coming from pipe usage have been improved.
15471547+15481548+## v0.16.0-rc1 - 2021-06-04
15491549+15501550+- Gleam can now compile to JavaScript! Specify the `--target javascript` flag to
15511551+ `gleam compile-package` to use it today.
15521552+- A compile time error is now raised when multiple module level constants with
15531553+ the same name are defined.
15541554+- Fixed a bug where declaring a type constructor using reserved erlang keyword
15551555+ in its fields results in invalid erlang code being generated.
15561556+- Fixed a bug where calling a function with discarded labelled arguments
15571557+ incorrectly results in a compile error.
15581558+- Fixed a bug where assert statements return the wrong value.
15591559+- The `gleam new` command requires a root folder param, project name is
15601560+ optional and if not provided the project name will be inferred from
15611561+ the folder name.
15621562+- Generated Erlang record header files now contain Erlang type information.
15631563+- New OTP application projects depend on `gleam_otp` v0.1.5.
15641564+- The output of the formatter has been improved.
15651565+15661566+## v0.15.1 - 2021-05-07
15671567+15681568+- Fixed a bug where blocks that contained try expressions could be formatted
15691569+ incorrectly.
15701570+15711571+## v0.15.0 - 2021-05-06
15721572+15731573+[Release Blog Post](https://gleam.run/news/gleam-v0.15-released/)
15741574+15751575+## v0.15.0-rc1 - 2021-05-05
15761576+15771577+- Syntax highlighting of Gleam code in generated HTML documentation has been
15781578+ improved.
15791579+- Fixed a bug where markdown tables in rendered HTML documentation would have
15801580+ the incorrect background colour on every other row.
15811581+- Tuples now have a new, concise syntax variant: `#(x, y, ...)`. Existing code
15821582+ can be auto-migrated to the new syntax by running `gleam format`.
15831583+- Fixed a bug where customt type constructors with Erlang keywords as names
15841584+ would generate invalid Erlang code.
15851585+- Gleam now supports `\e` string escapes.
15861586+- Values and types from the prelude can now be used in a qualified fashion by
15871587+ importing the `gleam` module.
15881588+- Empty lists can now be used in constants.
15891589+- Compiler performance has been improved when working with lists.
15901590+- Compiler performance has been improved when working with sequences of
15911591+ expressions.
15921592+- Assignments using `let` and `assert` are now expressions and no longer require
15931593+ a following expression in their containing block. They are now themselves
15941594+ expressions.
15951595+- Fixed a bug where tuple indexing could incorrectly claim a tuple is not of
15961596+ type tuple in some circumstances.
15971597+- Glean `new` command now checks if target folder exists, if so it returns
15981598+ an error.
15991599+- A compile time error is now raised if a module is defined with the name `gleam`.
16001600+- A compile time error is now raised if a module is defined with the a keyword
16011601+ in the name.
16021602+- New projects are generated using `gleam_stdlib` v0.15.0.
16031603+- New projects are generated at v0.1.0.
16041604+16051605+## v0.14.4 - 2021-03-27
16061606+16071607+- The Gleam compiler has been updated to compile with the new Rust v1.51.0.
16081608+- New project's `gleam.toml` has a comment that shows how to add a
16091609+ `repository` field.
16101610+- New projects no longer include a licence field in `src/$APP.app.src` by
16111611+ default.
16121612+16131613+## v0.14.3 - 2021-03-20
16141614+16151615+- Added an error hint when joining string using the `+` or `+.` operator.
16161616+- New projects are created with `setup-erlang` v1.1.2 and Erlang/OTP v23.2.
16171617+- Fixed a bug where the compiler would be unable to locate an imported module
16181618+ if a value from a nested module is used in a qualified fashion.
16191619+16201620+## v0.14.2 - 2021-03-02
16211621+16221622+- Project names can now contain numbers.
16231623+16241624+## v0.14.1 - 2021-02-27
16251625+16261626+- The error message for binary operators has been given more detail and
16271627+ hints.
16281628+- Fixed a bug where alternative patterns would incorrectly report unused
16291629+ variables.
16301630+- Fixed a bug where private types shadowed shadowed by values would
16311631+ incorrectly report unused variables.
16321632+16331633+## v0.14.0 - 2021-02-18
16341634+16351635+[Release Blog Post](https://gleam.run/news/gleam-v0.14-released/)
16361636+16371637+## v0.14.0-rc2 - 2021-02-18
16381638+16391639+- New projects are created with `gleam_stdlib` v0.14.0.
16401640+16411641+## v0.14.0-rc1 - 2021-02-14
16421642+16431643+- Gleam now generates Erlang typespecs.
16441644+- New projects no longer include a licence file by default.
16451645+- New projects can be created using the new `escript` template to generate a
16461646+ command line tool style program.
16471647+- A warning is emitted when a literal value is constructed but not used.
16481648+- Automatically generate a link to repository in docs if available.
16491649+- Code in HTML documentation is has highlighted syntax.
16501650+- Gleam now only supports `\r`, `\n`, `\t`, `\"`, and `\\` string escapes.
16511651+- A set of OCI container images are built automatically for each release.
16521652+- New compile time checks for invalid bit string literals and patterns have
16531653+ been added.
16541654+- The error messages for syntax errors in names have been improved.
16551655+- Fixed a bug where the repo URL would render incorrectly in HTML docs.
16561656+- Fixed a bug where piping a block can render invalid Erlang.
16571657+- New compile time warnings on unused types, functions and variables.
16581658+- The runtime error emitted by the `todo` keyword now carries additional
16591659+ information.
16601660+- The runtime error emitted by the `assert` keyword now carries additional
16611661+ information.
16621662+- Fixed a bug where bit string patterns would not correctly unify with the
16631663+ subject being pattern matches on.
16641664+- Documentation dark mode.
16651665+- Fixed a bug where some app.src properties were incorrectly named.
16661666+- `--warnings-as-errors` flag added to `gleam build` command.
16671667+16681668+## v0.13.2 - 2021-01-14
16691669+16701670+- `ring` dep upgraded to enable compilation on Apple M1 ARM processors.
16711671+16721672+## v0.13.1 - 2021-01-13
16731673+16741674+- Fix off-by-one error in message messages.
16751675+16761676+## v0.13.0 - 2021-01-13
16771677+16781678+[Release Blog Post](https://gleam.run/news/gleam-v0.13-released/)
16791679+16801680+- New Gleam projects use stdlib v0.13.0.
16811681+16821682+## v0.13.0-rc2 - 2021-01-12
16831683+16841684+- The `version` property in `gleam.toml` is now optional again.
16851685+16861686+## v0.13.0-rc1 - 2021-01-09
16871687+16881688+- Variable names now only have 1st letter capitalized when converted to erlang.
16891689+- Records defined in other modules can now be used in module constants.
16901690+- Documentation can link from functions, types & constants to their source
16911691+ code definitions on popular project hosting sites.
16921692+- Documentation hosted on HexDocs now has a version selector.
16931693+- Fixed a bug where the `app` project template rendered invalid code.
16941694+- Newly generated projects use stdlib v0.12.0.
16951695+- Named subexpressions in patterns now render correct Erlang.
16961696+- The anonymous function syntax now successfully parses with whitespace
16971697+ between `fn` and `(`.
16981698+- Fixed a bug where the formatter would incorrectly remove blocks around some
16991699+ binary operators.
17001700+- Constants can now be defined after they are used in functions
17011701+- The parser has been rewritten from scratch, dramatically improving error
17021702+ messages and compilation times.
17031703+- `1-1` and `a-1` are now parsed as `1 - 1` and `a - 1`
17041704+- Further information has been added to the error messages when a function
17051705+ returns the wrong type.
17061706+- Further information has been added to the error messages when case clauses
17071707+ return different types.
17081708+- Fixed a bug where imported record constructors without labels used as an
17091709+ anonymous function generates incorrect Erlang.
17101710+17111711+## v0.12.1 - 2020-11-15
17121712+17131713+- The compiler can now discriminate between record access and module access
17141714+ for shadowed names
17151715+- The `new` command will no longer permit projects to be made with names that
17161716+ clash with Erlang standard library modules.
17171717+- The formatter now correctly treats lines of only whitespace as empty.
17181718+- The styling of tables in rendered HTML documentation has been improved.
17191719+- Rendered HTML documentation has regained its max-width styling.
17201720+17211721+## v0.12.0 - 2020-10-31
17221722+17231723+[Release Blog Post](https://gleam.run/news/gleam-v0.12-and-gleam-otp-v0.1-released/)
17241724+17251725+## v0.12.0-rc4 - 2020-10-31
17261726+17271727+- The rendered module documentation sidebar can now scroll independently to
17281728+ the page.
17291729+- Application projects now have the correct `mod` value in the generated
17301730+ `.app.src`.
17311731+- Records without fields can now be used in module constants.
17321732+- New application projects are now created used Gleam's type safe OTP pulled
17331733+ from Hex.
17341734+17351735+## v0.12.0-rc3 - 2020-10-24
17361736+17371737+## v0.12.0-rc2 - 2020-10-24
17381738+17391739+## v0.12.0-rc1 - 2020-10-24
17401740+17411741+- The utf8, utf16, and utf32 type specifiers are now only available in bit
17421742+ string construction, matching must be done with the codepoint versions.
17431743+- Functions may now be called before they are defined in a module. This
17441744+ enabled mutually recursive functions!
17451745+- Discarded variable names may now include numbers.
17461746+- Fixed a bug where discarded variables might generate incorrect Erlang.
17471747+- Added support tuple access in clause guards.
17481748+- New projects are created with version 1.0.2 of the setup-gleam GitHub
17491749+ action.
17501750+- New application projects are now created used Gleam's type safe OTP.
17511751+- Comments are now correctly handled on platforms that use \r\n line endings,
17521752+ such as Windows.
17531753+17541754+## v0.11.2 - 2020-09-01
17551755+17561756+- Fixed a bug where an imported constructor would emit an unused constructor
17571757+ warning when only used in pattern matching.
17581758+17591759+## v0.11.1 - 2020-08-31
17601760+17611761+- The formatter style has been improved to render function type arguments on
17621762+ a single line when possible, even if the return type will not fit on a
17631763+ single line.
17641764+- The format for printed types in error messages has been improved.
17651765+- Fixed a bug where the formatter would strip a constructor pattern spread
17661766+ when no fields are given.
17671767+- Fixed a bug where assigning the result of a block to a variable would
17681768+ generate incorrect Erlang.
17691769+- The formatter style has been improved for function calls that take a single
17701770+ block as an argument.
17711771+- Reserved words are no longer incorrectly permitted as project names.
17721772+17731773+## v0.11.0 - 2020-08-28
17741774+17751775+[Release Blog Post](https://lpil.uk/blog/gleam-v0.11-released/)
17761776+17771777+## v0.11.0-rc3 - 2020-08-27
17781778+17791779+- Bit strings now support non-literal strings as segment values.
17801780+- Fixed a bug where Erlang variables could be generated with incorrect names
17811781+ when defining an anonymous function.
17821782+17831783+## v0.11.0-rc2 - 2020-08-24
17841784+17851785+- The formatter style has been improved to render some single argument calls
17861786+ in a more compact style.
17871787+17881788+## v0.11.0-rc1 - 2020-08-22
17891789+17901790+- Field access now works before the custom type is defined.
17911791+- The error message returned by the compiler when the user tries to use unknown
17921792+ labelled arguments now handles multiple labels at once, and does not suggest
17931793+ labels they have already supplied.
17941794+- The formatter style has been improved to use a trailing comma on imports
17951795+ broken over multiple lines.
17961796+- The formatter style has been improved to wrap lists and bit strings over as
17971797+ few lines as possible if the elements are Ints, Floats, or Strings.
17981798+- The formatter style has been improved to preserve comments on labelled
17991799+ call arguments.
18001800+- The formatter style has been improved to preserve empty lines in assignments.
18011801+- The performance of the formatter has been improved.
18021802+- Records can be updated using the spread syntax. A warning is emitted if no
18031803+ fields are updated when using this syntax.
18041804+- Fixed a bug where type parameters can leak between different type
18051805+ definitions in a module.
18061806+- Markdown tables, footnotes, strikethroughs, and tasklists are now supported
18071807+ in documentation.
18081808+- Fixed a bug where generic types may be incorrectly unified.
18091809+- Ints and floats can now be written with underscores for clarity.
18101810+- The warning for a `todo` now includes the required type of the
18111811+ not-yet-implemented expression.
18121812+- Holes can be used in type annotations to specify part of a type, leaving the
18131813+ rest for inference.
18141814+- The incorrect arity error now prints any missing labelled arguments.
18151815+- Fixed a bug where Erlang variables could be generated with incorrect names
18161816+ when directly calling an anonymous function.
18171817+- A warning is emitted when a type is imported or created but not used.
18181818+- Fixed a bug where Erlang variables names could clash when rebinding
18191819+ variables while similarly named variables ending in a number are in scope.
18201820+- Fixed a bug in the pretty printer which prevented the formatter from
18211821+ rendering sub-expressions in a single line when later code would not fit on
18221822+ the same line.
18231823+- The formatter style has been improved to render some single argument calls
18241824+ in a more compact style.
18251825+- Gleam now supports hex, octal, and binary literals.
18261826+- Rebar3 hex packages now include `gleam.toml` and `gen`.
18271827+- Newly generated projects use stdlib v0.11.0.
18281828+18291829+## v0.10.1 - 2020-07-15
18301830+18311831+- Fixed a bug where the compiler failed to return an error when type checking
18321832+ a tuple with the wrong arity in a pattern.
18331833+- The error message for a duplicate module member now shows the location of
18341834+ both definitions.
18351835+- Fix compiler bug where labelled arguments were being reordered incorrectly.
18361836+18371837+## v0.10.0 - 2020-07-01
18381838+18391839+[Release Blog Post](https://lpil.uk/blog/gleam-v0.10-released/)
18401840+18411841+- Newly generated projects use stdlib v0.10.1.
18421842+- Fixed a bug where discards inside bit string patterns generated invalid
18431843+ code.
18441844+18451845+## v0.10.0-rc2 - 2020-06-30
18461846+18471847+- Fixed a bug where variables names would be incorrectly generated when using
18481848+ alternative patterns.
18491849+18501850+## v0.10.0-rc1 - 2020-06-29
18511851+18521852+- Single letter module names are now permitted.
18531853+- Added support for bit string syntax.
18541854+- Support for the deprecated list prepend syntax has been removed.
18551855+- Added module level constants that are inlined at compile time.
18561856+- Public module level constants generate documentation.
18571857+- The formatter style has been improved to wrap and sort imports.
18581858+- The formatter now permits comments at the end of module function bodies.
18591859+- The formatter now skips files that match patterns defined in ignore files
18601860+ such as .gitignore and .ignore.
18611861+- Error message diagnostic code previews for type errors when using the the
18621862+ pipe operator have been made more accurate.
18631863+- Added support for list literals in clause guards.
18641864+- Fixed bug when reassigning a variable inside a case clause with alternative
18651865+ patterns.
18661866+- Todos can now take an optional label.
18671867+18681868+## v0.9.1 - 2020-06-12
18691869+18701870+- Fixed a bug where binary operators may lose required `{ }`s when formatted.
18711871+18721872+## v0.9.0 - 2020-06-01
18731873+18741874+[Release Blog Post](https://lpil.uk/blog/gleam-v0.9-released/)
18751875+18761876+- Newly generated projects use stdlib v0.9.0.
18771877+- Additional information is printed to the console when generating HTML
18781878+ documentation from Gleam code.
18791879+- Fixed a bug where blocks on either side of a binary operator would be
18801880+ rendered without `{ }`.
18811881+18821882+## v0.9.0-rc1 - 2020-05-26
18831883+18841884+- The formatter style has been improved.
18851885+- Numbers are now permitted in module names.
18861886+- Emitted Erlang code correctly adds parentheses around binary subexpressions
18871887+ to preserve precedence.
18881888+- Record names and fields are now escaped in `.hrl` files if they conflict
18891889+ with Erlang reserved words
18901890+- Annotations are now supported on `let` and `assert` expressions
18911891+- Formatter now accepts comments for the fields of a custom type's constructors
18921892+- Added opaque custom types, which have constructors that cannot be accessed
18931893+ from outside their own modules.
18941894+- Additional (arbitrary) markdown documentation pages can now be added and
18951895+ built with `docs build`.
18961896+- Fix code generation when calling functions returned through either record
18971897+ or tuple access
18981898+- Add lookup for Gleam source code in Mix's `deps` directory.
18991899+- Newly generated Gleam projects use the GitHub action
19001900+ `gleam-lang/setup-erlang` v1.1.0.
19011901+- Added support for custom type record literals in guards.
19021902+- Type variables are now correctly preserved within nested scopes.
19031903+19041904+## v0.8.1 - 2020-05-19
19051905+19061906+- The formatter now correctly handles unicode comments.
19071907+19081908+## v0.8.0 - 2020-05-07
19091909+19101910+[Release Blog Post](https://lpil.uk/blog/gleam-v0.8-released/)
19111911+19121912+- The `docs build`, `docs publish`, and `docs remove` commands can be used to
19131913+ compile HTML documentation locally, publish them to HexDocs, and remove them
19141914+ from HexDocs respectively.
19151915+- Type error reporting has been improved when using the pipe operator.
19161916+- Newly generated projects use stdlib v0.8.0.
19171917+- The compiler can now emit warnings. Currently there are warnings for using
19181918+ the old '|' syntax in lists and for todos.
19191919+- Will give a clearer error when a function given as an argument to another
19201920+ function doesn't match the type of the parameter.
19211921+- Fixed bug where imported type constructors had the incorrect arity.
19221922+- Fixed bug where a doing an unqualified import of a type constructor and
19231923+ giving it an alias would use the wrong name if it contained any values.
19241924+- Fixed a bug trying to access an imported constructor which contained values.
19251925+- Fixed a compiler crash that occurred when trying to unify a tuple with something
19261926+ other than another tuple or a variable.
19271927+- Added support for tuple literals in guards.
19281928+19291929+## v0.8.0-rc1 - 2020-04-28
19301930+19311931+- Strings are now encoded as utf8 binaries in the generated Erlang.
19321932+- HTML documentation can now be generated from Gleam code by running `gleam build --doc`.
19331933+- Gleam code can be formatted using the `gleam format` command.
19341934+- The pipe operator `|>` will now attempt to insert the left hand side as the
19351935+ first argument to the right hand side if the right hand side is a call,
19361936+ removing the need for function capture boilerplate.
19371937+- A `record.label` syntax can now be used to access the fields of a custom
19381938+ type that have a single record variant.
19391939+- Anonymous functions can now have return type annotations.
19401940+- There is a `todo` keyword for type checking functions that have not yet been
19411941+ implemented.
19421942+- Tuples can be indexed into using the `var.1` syntax.
19431943+- `>`, `>=`, `<`, and `<=` operators are now supported in case clause guards
19441944+ and can be used to check the ordering of integers.
19451945+- `>.`, `>=.`, `<.`, and `<=.` operators are now supported in case clause
19461946+ guards and can be used to check the ordering of floats.
19471947+- The list prepend syntax is now `[x, ..y]`. The old `[x | y]` syntax is
19481948+ deprecated but will continue to work for now. The formatter will rewrite the
19491949+ old syntax to the new.
19501950+- Add new assert syntax for binding variables `assert Ok(x) = result`. In the
19511951+ future this will allow you to use a pattern that does not match all values.
19521952+- Added support for int and float literals in guards.
19531953+- Color codes are now only emitted in error output for interactive terminal
19541954+ sessions.
19551955+- Added a new `..` syntax for discarding the remaining fields of a record.
19561956+- Using the same variable name multiple times in the same pattern will now
19571957+ raise an error.
19581958+- Discard can now be omitted in list tails in patterns, ie `[x, ..]` is the
19591959+ same as `[x, .._]`. The former is the preferred version and is emitted by the
19601960+ formatter.
19611961+19621962+## v0.7.1 - 2020-03-03
19631963+19641964+- Projects generated with `gleam new` use `stdlib` version 0.7.0.
19651965+19661966+## v0.7.0 - 2020-03-01
19671967+19681968+[Release Blog Post](https://lpil.uk/blog/gleam-v0.7-released/)
19691969+19701970+## v0.7.0-rc1 - 2020-02-28
19711971+19721972+- Type aliases can be defined to give concise names to frequently used types.
19731973+- Case expression clauses may have guards which can be used to require
19741974+ equality between specified variables in order for the clause to match.
19751975+- Case expression clauses may have alternative patterns, enabling one clause
19761976+ to match for multiple different possible patterns.
19771977+- Types may now be used before they are defined within their defining module.
19781978+- Fixed a bug where import paths would not be correctly resolved on Windows.
19791979+- Added job to create precompiled binary for 64-bit Windows when releasing.
19801980+- `gleam new` now creates a project that uses `actions/checkout@v2.0.0` in its
19811981+ GitHub actions workflow.
19821982+- Labelled argument in functions may now be discarded by prefixing the name
19831983+ with an underscore, like unlabelled arguments.
19841984+- Sub-patterns can have names assigned to them within a pattern using the `as`
19851985+ keyword.
19861986+- The format of compiler error messages printed to the console has been
19871987+ improved by upgrading to a newer version of the codespan-reporting library.
19881988+- Type variables in the given and expected types will now be printed with the
19891989+ same name in type error messages if they are equivalent.
19901990+- A friendly error message is rendered when a case expression clause has the
19911991+ incorrect number of patterns for the subjects.
19921992+- A friendly error message is rendered when a .gleam file cannot be read.
19931993+- A friendly error message is rendered when the `gleam new` command fails to
19941994+ write the new project to the file system.
19951995+- A friendly error message is rendered when there is a cycle formed by module
19961996+ imports.
19971997+- Top level types are now printed in error messages for type parameter mismatches.
19981998+- The `gen` directory is now deleted before each compilation.
19991999+- `gleam new` now includes installation instructions for Hex packages in the
20002000+ generated README.
20012001+- `gleam new` now accepts a `--description` flag for including a description of
20022002+ the project in the README and `.app.src` file.
20032003+- Fixed a bug where variable names would be incorrectly generated in some
20042004+ situations when variable names are reused during and after a case
20052005+ expression.
20062006+- Performance of the Erlang code generator has been improved by removing some
20072007+ vector allocations.
20082008+- An error is emitted when multiple types with the same name are defined in or
20092009+ imported into a module.
20102010+20112011+## v0.6.0 - 2019-12-25 🎄
20122012+20132013+[Release Blog Post](https://lpil.uk/blog/gleam-v0.6-released/)
20142014+20152015+- Function capture syntax now supports labelled arguments.
20162016+20172017+## v0.6.0-rc1 - 2019-12-23
20182018+20192019+- Syntax for defining structs and enums have been unified into a singular
20202020+ custom type definition statement. Instances of these custom types are called
20212021+ records.
20222022+- Anonymous structs have been renamed tuples.
20232023+- Values and types can be given a new name when imported in the unqualified
20242024+ fashion using the `import mod.{value as name}` syntax.
20252025+- An error will be emitted if multiple values constructors are defined with
20262026+ the same name in a module.
20272027+20282028+## v0.5.1 - 2019-12-23
20292029+20302030+- Fixed a bug where invalid Erlang would be generated when using a local
20312031+ private function as a value.
20322032+20332033+## v0.5.0 - 2019-12-16
20342034+20352035+[Release Blog Post](https://lpil.uk/blog/gleam-v0.5-released/)
20362036+20372037+- Enum constructor arguments can now be labelled, allowing arguments to be
20382038+ given by name at the call site.
20392039+- An Erlang header file with a record definition is generated for each Gleam
20402040+ struct defined.
20412041+- `gleam new` creates a project at v1.0.0.
20422042+- Function calls are now properly escaped when the function name conflicts
20432043+ with an Erlang keyword.
20442044+- References to unqualified imported functions now generate correct Erlang
20452045+ code.
20462046+- Fixed a bug where variable rebinding would generate incorrect code in some
20472047+ case expressions.
20482048+- Fixed a bug where variable rebinding of function arguments would generate
20492049+ incorrect code.
20502050+20512051+## v0.5.0-rc1 - 2019-11-26
20522052+20532053+- Function arguments can be labelled, allowing arguments to be given by name
20542054+ at the call site.
20552055+- `case` expressions now accept multiple subjects, enabling pattern matching
20562056+ on multiple values simultaneously.
20572057+- Values and types can be imported from modules and references in an
20582058+ unqualified fashion.
20592059+- Named structs now have their name as the first element in the generated
20602060+ Erlang code. This enabled easier use from Erlang by defining records for
20612061+ them, as well as slightly clearer printf debugging.
20622062+- Anonymous structs have been introduced, serving as a quick and generic
20632063+ alternative to declared structs and as a format for interop with Erlang
20642064+ tuples.
20652065+- `gleam new` now accepts a `--template` flag to generate different styles of
20662066+ project. An OTP application template has been added alongside the existing
20672067+ OTP library template.
20682068+- `gleam new` now creates configuration for GitHub Actions, making Gleam
20692069+ projects ready for continuous integration out of the box.
20702070+- The syntax for defining enums, case expressions, and blocks has been changed
20712071+ to a syntax closer to that found in the C family of languages.
20722072+- The source code preview for functions that return a type incompatible with
20732073+ the functions annotations has been improved to be more precise.
20742074+- A helpful error message is rendered if an enum field contains a generic type
20752075+ that has not been declared.
20762076+- A bug has been fixed in which type mismatch errors originating from pattern
20772077+ matching would sometimes display the incorrect expected type.
20782078+20792079+## v0.4.2 - 2019-10-22
20802080+20812081+- Fixed a crash when an incorrect number of labelled struct arguments are
20822082+ given.
20832083+- Fixed a struct labelled argument being incorrect reported as already given.
20842084+20852085+## v0.4.1 - 2019-09-29
20862086+20872087+- Struct types with parameterised fields are now registered with the correct
20882088+ number of type parameters.
20892089+20902090+## v0.4.0 - 2019-09-19
20912091+20922092+[Release Blog Post](https://lpil.uk/blog/gleam-v0.4-released/)
20932093+20942094+- The struct data type has be introduced. Structs are pre-declared user
20952095+ defined data types with named fields and constant access time.
20962096+- The map and tuple data types has been removed, replaced by the struct data
20972097+ type.
20982098+- The generated code no longer contains export statements if no functions are
20992099+ exported from a module.
21002100+- Comparison operators have been specialised to operate only on Ints.
21012101+- The `>.` `>=.` `<.` and `<=.` comparison operators have been added for
21022102+ comparing Floats.
21032103+- It is now an error to export an enum which has a constructor that takes a
21042104+ private type as an argument.
21052105+- The error messages for defining multiple modules with the same name and for
21062106+ importing test modules into application code have been improved.
21072107+- Numbers are now permitted in type names and constructors.
21082108+- The `Nil` constructor will no longer erroneously be of type `Int`.
21092109+21102110+## v0.3.0 - 2019-08-08
21112111+21122112+[Release Blog Post](https://lpil.uk/blog/gleam-v0.3-released/)
21132113+21142114+- New project structure can be generated with the `gleam new` command.
21152115+- Functions can be annotated with their argument and return types. This may be
21162116+ used to restrict the function to a less general type than inferred by the
21172117+ compiler, or purely for documentation purposes.
21182118+- External function names and their target functions are now escaped in the
21192119+ generated code if they collide with Erlang keywords such as `catch` or `or`.
21202120+- Type error arising from the arguments of function calls have more accurate
21212121+ error diagnostics.
21222122+- Precompiled Gleam binaries are now available on the GitHub release page.
21232123+- Precompiled Docker images containing the Gleam binary are now available on
21242124+ DockerHub.
21252125+- The formatting of the Erlang code rendered by the compiler has been altered
21262126+ to improve legibility.
21272127+- A helpful error message is now rendered if the shorthand anonymous function
21282128+ syntax is used with too many underscores.
21292129+- A helpful error message is now rendered when attempting to import an unknown
21302130+ module.
21312131+21322132+## v0.2.0 - 2019-06-25
21332133+21342134+- Modules can now live within namespaces such as `my_app/user/profile`.
21352135+- The name of the variable created can be specified when importing a module
21362136+ using the `import my_mod as name` syntax.
21372137+- Function names and atoms are now escaped in the generated code if they
21382138+ collide with Erlang keywords such as `catch` or `or`.
21392139+- There is a shorthand syntax for prepending multiple elements to a list.
21402140+ `[1, 2, 3 | my_list]`
21412141+21422142+## v0.1.2 - 2019-05-12
21432143+21442144+- Types containing more than 26 type variables will no longer render with
21452145+ invalid type variable names.
21462146+- Types in error messages no longer have extra indentation that increases as
21472147+ the type gets larger.
21482148+- There is a new type `Nil` which is occupied by a single value (`Nil`). This
21492149+ type is used to represent the absence of a value and is commonly used with
21502150+ `Result` to model a value that is either present (`Ok(value)`) or absent
21512151+ (`Error(Nil)`).
21522152+- Zero arity enum constructors now generate the correct Erlang when used in
21532153+ modules other than the one they are defined in.
21542154+21552155+## v0.1.1 - 2019-04-28
21562156+21572157+- Error messages now display the path of the file containing the problem.
21582158+- Maps and modules with erroneous extra fields now have a custom error
21592159+ message.
21602160+- Rows with tails that are unbound type variables are now correctly unified in
21612161+ the type system. This fixes a bug in which maps and modules may sometimes
21622162+ fail to type check when there is no error.
21632163+21642164+## v0.1.0 - 2019-04-15
21652165+21662166+[Release Blog Post](https://lpil.uk/blog/hello-gleam/)
21672167+21682168+- Initial release!