Gears

Results 138 comments of Gears

Thanks for the review Jak! I'll get to those points as soon as I have time

I've addressed all the points in your review now. This now compiles: ```gleam case some_wibble { Wibble(..) -> some_wibble.field_only_present_on_wibble _ -> todo } ``` Both bugs you found are now...

I also have a question about an error message which could potentially be confusing to the user. For example: ```gleam type Wibble { Wibble(a: Int, b: Int, c: Int) Wobble(a:...

Interesting, I wonder why that's happening. I'll look into it, thanks!

Found the issue. It was to do with `TypeVar::Link`, which allows shared mutability with `Arc`. This meant that when I was changing the `narrowed_variant` field of a type in the...

I see, yes. I'm pretty sure this won't cause issues since this type must already be `Type::Named` to be able to be narrowed, but it's certainly worth adding some test...

I've added a couple of tests to make sure this change doesn't break type inference, but I honestly couldn't think of that many cases to test. Anyone who is more...

I have now implemented exhaustiveness checking for narrowed types, as discussed on Discord. This allows stuff like: ```gleam type Wibble { Wibble(Bool) Wobble(Int) } pub fn main(b: Bool) { let...

I should add version tracking to this as well. I was thinking about it before, and wasn't really sure if there was a good way to do it, but it...

Yep. I'm not sure I'll be able to track the exhaustiveness checking for narrowed types, but record access and record updates should be doable