jade-lang 0.11.3 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +112 -0
  3. data/lib/jade/ast.rb +1 -1
  4. data/lib/jade/codegen/context.rb +18 -1
  5. data/lib/jade/codegen/function_call.rb +9 -2
  6. data/lib/jade/codegen/inlines.rb +2 -0
  7. data/lib/jade/codegen.rb +7 -5
  8. data/lib/jade/diagnostics/renderer.rb +5 -1
  9. data/lib/jade/entry.rb +32 -10
  10. data/lib/jade/frontend/forward_declaration/error/ambiguous_type.rb +36 -0
  11. data/lib/jade/frontend/forward_declaration/error.rb +1 -0
  12. data/lib/jade/frontend/forward_declaration/helper.rb +7 -0
  13. data/lib/jade/frontend/forward_declaration/import_declaration.rb +10 -2
  14. data/lib/jade/frontend/semantic_analysis/constructor_reference.rb +5 -0
  15. data/lib/jade/frontend/semantic_analysis/error/ambiguous_name.rb +36 -0
  16. data/lib/jade/frontend/semantic_analysis/error/top_level_statement.rb +28 -0
  17. data/lib/jade/frontend/semantic_analysis/error.rb +2 -0
  18. data/lib/jade/frontend/semantic_analysis/module_node.rb +21 -1
  19. data/lib/jade/frontend/semantic_analysis/variable_reference.rb +5 -0
  20. data/lib/jade/frontend/semantic_analysis.rb +4 -6
  21. data/lib/jade/frontend/type_checking/constraints/deriving/show.rb +24 -0
  22. data/lib/jade/frontend/type_checking/error/narrowed_method_variable.rb +36 -0
  23. data/lib/jade/frontend/type_checking/error/narrowed_signature.rb +53 -0
  24. data/lib/jade/frontend/type_checking/error.rb +2 -0
  25. data/lib/jade/frontend/type_checking/inference/assign.rb +7 -4
  26. data/lib/jade/frontend/type_checking/inference/case_of.rb +1 -6
  27. data/lib/jade/frontend/type_checking/inference/constructor_reference.rb +1 -1
  28. data/lib/jade/frontend/type_checking/inference/function_declaration.rb +21 -0
  29. data/lib/jade/frontend/type_checking/inference/helpers.rb +11 -0
  30. data/lib/jade/frontend/type_checking/inference/implementation.rb +23 -2
  31. data/lib/jade/frontend/type_checking/inference/lambda.rb +1 -4
  32. data/lib/jade/frontend/type_checking/inference/list.rb +16 -2
  33. data/lib/jade/frontend/type_checking/narrowing.rb +93 -0
  34. data/lib/jade/frontend/type_checking/pattern_checks.rb +30 -0
  35. data/lib/jade/frontend/type_checking/state.rb +9 -2
  36. data/lib/jade/frontend/type_checking.rb +3 -6
  37. data/lib/jade/frontend.rb +0 -22
  38. data/lib/jade/parsing/error.rb +15 -0
  39. data/lib/jade/registry.rb +1 -1
  40. data/lib/jade/stdlib/compiled.rb +8 -1
  41. data/lib/jade/stdlib/dict.rb +12 -0
  42. data/lib/jade/stdlib/intrinsics.rb +8 -1
  43. data/lib/jade/stdlib/set.rb +12 -0
  44. data/lib/jade/stdlib.rb +8 -1
  45. data/lib/jade/symbol/ambiguous.rb +5 -0
  46. data/lib/jade/symbol.rb +1 -0
  47. data/lib/jade/version.rb +1 -1
  48. metadata +10 -2
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jade-lang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.3
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustin Cornu
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-09-16 00:00:00.000000000 Z
10
+ date: 2026-09-21 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: base64
@@ -126,6 +126,7 @@ files:
126
126
  - lib/jade/frontend/forward_declaration/body.rb
127
127
  - lib/jade/frontend/forward_declaration/error.rb
128
128
  - lib/jade/frontend/forward_declaration/error/alias_expansion.rb
129
+ - lib/jade/frontend/forward_declaration/error/ambiguous_type.rb
129
130
  - lib/jade/frontend/forward_declaration/error/bad_import.rb
130
131
  - lib/jade/frontend/forward_declaration/error/duplicate_constructor_name.rb
131
132
  - lib/jade/frontend/forward_declaration/error/duplicate_type_name.rb
@@ -164,6 +165,7 @@ files:
164
165
  - lib/jade/frontend/semantic_analysis/char_literal.rb
165
166
  - lib/jade/frontend/semantic_analysis/constructor_reference.rb
166
167
  - lib/jade/frontend/semantic_analysis/error.rb
168
+ - lib/jade/frontend/semantic_analysis/error/ambiguous_name.rb
167
169
  - lib/jade/frontend/semantic_analysis/error/circular_extends.rb
168
170
  - lib/jade/frontend/semantic_analysis/error/constant_not_callable.rb
169
171
  - lib/jade/frontend/semantic_analysis/error/constructor_not_found.rb
@@ -189,6 +191,7 @@ files:
189
191
  - lib/jade/frontend/semantic_analysis/error/predicate_name_not_allowed.rb
190
192
  - lib/jade/frontend/semantic_analysis/error/recursive_type_alias.rb
191
193
  - lib/jade/frontend/semantic_analysis/error/shadowing_error.rb
194
+ - lib/jade/frontend/semantic_analysis/error/top_level_statement.rb
192
195
  - lib/jade/frontend/semantic_analysis/error/type_args_mismatch.rb
193
196
  - lib/jade/frontend/semantic_analysis/error/type_param_required.rb
194
197
  - lib/jade/frontend/semantic_analysis/error/unbound_type_variable.rb
@@ -264,6 +267,8 @@ files:
264
267
  - lib/jade/frontend/type_checking/error/list_item_type_mismatch.rb
265
268
  - lib/jade/frontend/type_checking/error/missing_implementation.rb
266
269
  - lib/jade/frontend/type_checking/error/missing_patterns.rb
270
+ - lib/jade/frontend/type_checking/error/narrowed_method_variable.rb
271
+ - lib/jade/frontend/type_checking/error/narrowed_signature.rb
267
272
  - lib/jade/frontend/type_checking/error/pattern_type_mismatch.rb
268
273
  - lib/jade/frontend/type_checking/error/port_not_decodable.rb
269
274
  - lib/jade/frontend/type_checking/error/port_not_encodable.rb
@@ -309,6 +314,8 @@ files:
309
314
  - lib/jade/frontend/type_checking/inference/variable_reference.rb
310
315
  - lib/jade/frontend/type_checking/instantiation.rb
311
316
  - lib/jade/frontend/type_checking/loader.rb
317
+ - lib/jade/frontend/type_checking/narrowing.rb
318
+ - lib/jade/frontend/type_checking/pattern_checks.rb
312
319
  - lib/jade/frontend/type_checking/placeholder.rb
313
320
  - lib/jade/frontend/type_checking/port_resolution.rb
314
321
  - lib/jade/frontend/type_checking/requirements.rb
@@ -381,6 +388,7 @@ files:
381
388
  - lib/jade/stdlib/tuple.rb
382
389
  - lib/jade/symbol.rb
383
390
  - lib/jade/symbol/alias.rb
391
+ - lib/jade/symbol/ambiguous.rb
384
392
  - lib/jade/symbol/anonymous_record.rb
385
393
  - lib/jade/symbol/base.rb
386
394
  - lib/jade/symbol/constructor.rb