José Valim
7e7b4a8f4e
Indent lists
2026-05-20 13:35:41 +02:00
José Valim
f9573159ab
Clarify cases optimization apply
2026-05-20 12:54:03 +02:00
José Valim
3d4bffe097
Remove duplicate nodes in BDD when performing unions
...
Our inference algorithm deduce types for each clause,
subtracting previous clauses. For a function with three
clauses, the type of each clause is roughtly:
c1
c2 - c1
c3 - c2 - c1
To compute the domain, we union these clauses, leading
to large types that mix unions and differences. By removing
repeated nodes, the union of the entries above become:
c1 or c2 or c3
2026-05-20 12:41:24 +02:00
José Valim
694930ec25
Add some initial resources to types page
2026-05-20 09:55:20 +02:00
José Valim
76fbc0ccbc
Do not discard variables in cond
...
When traversing the case for the reverse arrow, if there are
no changes, the case-expr are not re-executed, which meant
variables would not be redefined.
Closes #15402 .
Closes #15403 .
2026-05-19 13:15:58 +02:00
José Valim
28734f03d0
Clarify aliases is part of the next chapter, closes #15401
2026-05-18 20:50:15 +02:00
José Valim
0dd4399293
Simplify literal differences to avoid repacking
2026-05-17 15:57:31 +02:00
José Valim
0aa8c1fc2c
Fix optimization in map leaf difference
2026-05-17 15:57:31 +02:00
Jean Klingler
315279701a
Fix dialyzer opaqueness violation with MapSet ( #15399 )
2026-05-17 19:45:56 +09:00
José Valim
57b1685cac
Collect diagnostics across clauses in rescue, closes #15307
2026-05-16 18:12:45 +02:00
Evadne Wu
ca13b750ce
Fix parse_error input spec ( #15393 )
2026-05-16 13:20:23 +02:00
José Valim
c3e1aa706d
Infer signatures across application boundaries, closes #15360
2026-05-16 13:14:06 +02:00
Evadne Wu
210f6fc3ac
Clarify File.cp_r directory permission docs ( #15392 )
2026-05-15 19:27:24 +02:00
José Valim
87582af546
Preserve evaluation order when rewriting ( #15389 )
...
This was done by moving the rewriting which change evaluation order to the Erlang pass,
otherwise would be hard to rewrite back in the type checker reports.
Closes #15310 .
2026-05-14 21:16:55 +02:00
Guillaume Duboc
63708d313c
Type system support for put_elem/3 ( #15388 )
2026-05-14 20:45:33 +02:00
Guillaume Duboc
e7a5a667bf
Make tuple_insert_at preserve static part of a type ( #15387 )
2026-05-14 20:44:54 +02:00
Guillaume Duboc
367e38cbe6
Fix if_set dropping static part of type ( #15379 )
2026-05-14 20:44:22 +02:00
José Valim
cb4020e692
Simplify handling of negative indexes
2026-05-14 18:25:58 +02:00
Łukasz Samson
909b099d44
Fix dynamic-value error wrapping in tuple_insert_at/3 ( #15382 )
...
Propagate `badtuple` and `badindex` error from `tuple_insert_at_checked` to the caller instead of wrapping it in `dynamic`
2026-05-14 16:23:46 +02:00
José Valim
7495a03535
Revert "Improve Keyword performance ( #15378 )" ( #15386 )
...
This reverts commit d50b0321ab .
2026-05-14 16:18:50 +02:00
José Valim
5509b95437
Group clauses by return, closes #15371
2026-05-14 15:38:47 +02:00
Łukasz Samson
0792999f63
Fix invalid error message on tuple operations with negative index ( #15380 )
2026-05-14 15:38:28 +02:00
Peter Ullrich
d50b0321ab
Improve Keyword performance ( #15378 )
2026-05-14 15:23:00 +02:00
José Valim
41332ac3d6
Silence warnings on charlist formatting
2026-05-14 14:03:32 +02:00
José Valim
46f7b37916
Ignore eval failure warnings from Erlang
...
Closes #15372 .
2026-05-14 13:59:28 +02:00
José Valim
6b114ee7c1
Avoid false positives when comparing structs with dynamic
...
Closes #15370
2026-05-14 13:53:25 +02:00
Guillaume Duboc
71148aa953
Tuple operations performance boost + fix logic bug ( #15376 )
2026-05-14 12:44:18 +02:00
José Valim
b35e210321
Properly format or/and in type errors
...
See #15369 .
2026-05-14 12:43:28 +02:00
Cohen Carlisle
56336feb2f
Mirror Map.filter/2 perf note in Map.reject/2 ( #15373 )
2026-05-13 23:23:03 +02:00
José Valim
aad63173b8
Clarify semantics of defguard, closes #15284
2026-05-13 18:53:13 +02:00
José Valim
c2d39715ff
Update CHANGELOG
2026-05-13 11:45:50 +02:00
Guillaume Duboc
472a49d84a
Preserve static parts in dynamic container descriptors ( #15363 )
2026-05-13 11:45:23 +02:00
José Valim
8bdd041122
Add missing exclamation mark
2026-05-13 10:35:57 +02:00
José Valim
0eabf48524
Refine types from case on inference
2026-05-12 20:15:16 +02:00
Guillaume Duboc
b0db1a26e1
Performance boost on map operations + bugfix ( #15362 )
...
Add the two important optimization paths for negative-map projection: value-side projection for map fetch/get and shape-side projection for map put/update.
Keep regression coverage for projected negative maps.
2026-05-12 18:50:17 +02:00
José Valim
35eeab3511
Fix regression on default inference, closes #15359
2026-05-12 14:59:53 +02:00
José Valim
aae39c87dc
Fix warnings
2026-05-12 14:49:36 +02:00
José Valim
8a2c815c85
Propagate hd/tl checks across clauses, closes #15358
2026-05-12 14:06:08 +02:00
José Valim
0b9b5b962b
Improve type system docs
2026-05-12 10:58:11 +02:00
José Valim
41353c6cf8
Infer precise types for default arguments
2026-05-12 10:40:25 +02:00
José Valim
7e49585d26
Use inlined functions to reduce compiled module size
2026-05-11 23:36:21 +02:00
Peter Ullrich
7081e7223e
Add SWAR versions of Base validations ( #15357 )
2026-05-11 23:29:52 +02:00
José Valim
3e3ce13c1d
Deal with raising clauses in cond
2026-05-11 12:45:42 +02:00
José Valim
4816d3773a
Perform occurrence typing in cond
2026-05-11 11:51:03 +02:00
José Valim
5b8b8e3589
Reintroduce escaped trailing newlines in heredocs in Macro.to_string/2 ( #15355 )
...
Closes #15354 .
2026-05-11 10:18:49 +02:00
Cohen Carlisle
aafc248179
fix ===/2 arity in docs ( #15353 )
2026-05-10 09:34:03 +09:00
Łukasz Samson
8a35ffa811
Reject negative Duration in to_timeout ( #15352 )
...
Previously a negative timeout value violating the spec was returned
2026-05-08 22:28:48 +02:00
Łukasz Samson
a5435a6ead
Reject invalid config shapes in Config.validate!/2 ( #15349 )
...
Previous code used `Enum.all?` and silently skipped invalid pairs
2026-05-08 11:01:32 +02:00
Łukasz Samson
c3f7e3473e
Raise in Stream.cycle when enumerable reduce call yields no elements ( #15344 )
2026-05-06 12:22:53 +02:00
Łukasz Samson
68c413f76c
Improve ambiguous import error message ( #15335 )
2026-05-06 12:22:34 +02:00