Skip to content

Commit f3ebbfb

Browse files
authored
Multiple rhs (#24)
* notes * more hacking * more hacking * more argh * hackikng away * stuff * start rewriting all pattern matching * pattern match rewrite almost done * pattern match rewrite passes the first test * codegen for multiple rhs passes first test * note another bug * note codegen after parse unit * getting closer * next multidef example works * make later defs local to main def to avoid top level mutual recursion * multiple defs test case three works * add some tests * detect redefinition across parse units * case three works * fix up filemodel merge * fix access to nested structs * more debugging * omg fixed pattern defs * more fixes * fix local multiple defs * tiny * fix Vector ++ Image * fix Image op Vector * add more tests for multiple RHS * ready for 9.0.14 release * fix date
1 parent d1ac9d4 commit f3ebbfb

File tree

8 files changed

+1919
-398
lines changed

8 files changed

+1919
-398
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## master
22

3+
- pattern matching rewrite
4+
- add multiple defs and parameter pattern match to compiler
5+
- add filemodel::new_from_file, rework filemodel_open
6+
- reloading a toolkit now deletes all defs, then does load ... adding a new
7+
def to a func across a parse unit is now an error
8+
39
## 9.0.14 2025/10/25
410

511
- fix load cancel

TODO

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
- should allow vips_image ++ Image
2-
3-
- remove remove prefs workspace stuff?
4-
5-
things like max heap size should be settable ... maybe pres are useful?
1+
- nicholas's bug report
62

73
- lcomps leave stray unreffed symbols in "list unresolved"
84

@@ -17,6 +13,39 @@
1713

1814
- dir should hide $$vars
1915

16+
- programming window is showing generated syms, like $$pattern_lhs0?
17+
18+
- ban patterns in class parameters
19+
20+
or could we allow multiple class defs?
21+
22+
Fred (Image x) = class { ... };
23+
24+
probably only useful for trivial classes
25+
26+
- what about
27+
28+
fred (list x) = ...;
29+
fred (complex x) = ...;
30+
31+
ie. allow names of builtin types as well as class names
32+
33+
maybe:
34+
35+
fred (is_list x) = ...;
36+
37+
ie. a predicate before the arg, as well as a class name?
38+
39+
- do we allow eg.
40+
41+
fred [a, b ..] = a + b;
42+
43+
equivalent to
44+
45+
fred a:b:x = a + b;
46+
47+
48+
2049
- programming window is showing generated syms, like $$pattern_lhs0?
2150

2251
- ban patterns in class parameters

0 commit comments

Comments
 (0)