Releases: kengorab/abra-lang
Releases · kengorab/abra-lang
v0.0.30
Deprecate `export` and replace it all with `pub` (#543)
v0.0.29: Introduce `pub` keyword (#542)
* Introduce `pub` keyword The first pass is to replace the `export` keyword with `pub`. This saves from having two keywords (`export` for use at the top-level, and `pub` for type fields/methods) and instead the usage of `pub` at the top-level indicates that the value is exported (aka, visible outside of the current module, similarly to how `pub` fields/methods are visible outside of the current type/enum). * Typechecker: error changes + cleanup Clean up the typechecker by tracking the current TypedModule rather than tracking individually all the useful pieces. This just seems like a cleaner way of doing things. Also, since the `pub` keyword is being introduced and the `export` keyword phased out, adjust the error messages related to exports to better reflect that new world. * Parser/Typechecker: Support `pub` fields/methods This doesn't actually enforce visibility on fields or methods, but it does track them. This was a large change which required lots of test updates. * Fixing failing test
v0.0.28: Typechecker: Fixes #521 (#541)
* Typechecker: Fixes #521 When attempting to extract generic values given a template, ensure the template struct/enum matches the source's struct/enum before extracting generics. Previously, this would result in an `unreachable()` block. This resulted in a crash rather than a useful type error message. * Renaming variable
v0.0.27
Add `Map#getOrInsert` method (#538)
v0.0.26: Cleanup (#536)
* Cleanup Compiler: Use Option try expressions, and do some other general tidying up and refactoring of things that have been sitting around for a while. * Typechecker: Updating to use Option try Update `if XYZ |v| v else ...` expressions to use the new `try` capability for Option types. Also some other minor cleanups. * Cleanup across the board Use Option type `try` syntax, and other cleanups
v0.0.25: Update typechecker.abra
Remove import of 'log'
v0.0.24: Typechecker: try-else improvements (#535)
* Typechecker: try-else improvements This change allows try-expressions to be used in functions which do not necessarily return a Result value, if there is an else-clause attached. * Typechecker/Compiler: Support Option try Try expressions can now work on values with type `T?`.
v0.0.23: Prelude: Map improvements (#523)
* Prelude: Map improvements Use `uninitialized` intrinsic to have "empty" `MapEntry` objects in the `Map`'s `_entries` field, rather than the previous approach of having an array of `MapEntry?` values. This approach adds a bit more logical overhead, but it significantly reduces the amount of allocations when working with `MapEntry` values, and also eliminates the need for `flattenOption`. * Updating process_callstack test, because the contents of prelude changed
v0.0.22: Add `uninitialized` intrinsic (#522)
This effectively just results in a null pointer, but it's cast to be whatever generic value `T` it's required to be. This can be dangerous of course and requires additional checks, but is useful in cases where performance is important (like with `MapEntry<K, V>[]` in the `Map` type); this approach can be leveraged instead of using `Option<T>`. It's much less ergonomic and type-safe, but it doesn't result in an extra layer of allocation and pointer-indirection.
v0.0.21: LSP: Handling the 'initialize' method (#519)
* LSP: Handling the 'initialize' method This adds a ton of code to the `json` std module to support json encoding/decoding of the `initialize` request and response json rpc messages as part of the LSP lifecycle. This can correctly receive an `initialize` request and decode it to a data structure, and respond with an `InitializeResult` object. This code currently fails when it is sent the next message type ( `textDocument/didOpen`) which is not yet implemented. * LSP: typecheck and emit diagnostics Refactor the language server to be a bit more organized. Also, handle the basic textDocument messages, for which the project is typechecked and any errors are emitted as Diagnostics.