Gears

Results 24 issues of Gears

I found it quite annoying that the extension would create a `.vscode` folder and `settings.json` file in every project I opened with VSCode, so I made it only create it...

Closes #2978 Let me summarise what I've done: - BadName errors are now no longer reported in the lexer. The lexer treats all previous bad names as valid. - The...

Closes #2958 Implements a code action which converts: ```gleam let assert Ok(foo) = bar() ``` into: ```gleam let foo = case bar() { Ok(foo) -> foo Error(e) -> panic as...

For example, turning: ```gleam result.map(Ok(1), fn(x) { io.debug(x) }) ``` Into: ```gleam use x

help wanted
priority:medium

Closes #2957 I have added a code action which fills in the missing patterns for an inexhaustive case expression. The formatting of the resulting syntax isn't great at the moment,...

When #3418 was implemented, it looks like I overlooked a case: ```gleam case option.None { option.Some(_) -> Nil // ^ Use "import module" code action here option.None -> Nil }...

When there is a case expression with no matched patterns, we attempt to improve the error by running the first column through exhaustiveness checking (See #3561, [here](https://github.com/gleam-lang/gleam/blob/9f5ccd5ad7a9581be1954a9c71bca9142943b33f/compiler-core/src/exhaustiveness.rs#L268)). This works fine,...

help wanted

Currently, if a user runs the "Add missing patterns" code action on this code: ```gleam case some_value.optional_field {} ``` They would get something like: ```gleam case some_value.optional_field { option.Some(_) ->...

help wanted

This code: ```gleam type Wibble {Wibble(Int, Float, String)} pub fn main() { let wibble = Wibble(1, 2.0, "three") case wibble { Wibble(int, float, string) -> { ... } } }...

help wanted
good first issue
priority:medium

Closes #2060 This PR implements type narrowing when pattern matching. This allows you to perform safe record updates when the variant is known, and access fields which aren't common to...