dankeyy
2dc777073a
fix tuples section
...
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Signed-off-by: dankeyy <dankeyy@protonmail.com>
2023-03-27 12:08:02 +03:00
dankeyy
22ab9053d8
roc now has tuples
...
Signed-off-by: dankeyy <dankeyy@protonmail.com>
2023-03-26 20:04:18 +03:00
Richard Feldman
e549c8b4a3
Merge pull request #5206 from roc-lang/fix-roc-std-nostd
...
Only mark roc_std no_std if std feature is not present
2023-03-25 21:59:07 -04:00
Richard Feldman
72530916e5
Merge pull request #5204 from roc-lang/i4561
...
Check in mono test that works now
2023-03-25 21:58:16 -04:00
Richard Feldman
666339b886
Merge pull request #5196 from yukiomoto/disallow-html-in-docs
...
Treat html as text in markdown parsing to disallow html in docs
2023-03-25 21:57:18 -04:00
Ayaz
eadbb4eddd
Merge pull request #5202 from roc-lang/i5176
...
Compilation of when expressions with redundant branches and guards
2023-03-25 20:02:22 -05:00
Ayaz
8c55e8126d
Merge pull request #5203 from roc-lang/virtual-dom-annotations
...
Fix a few bugs Virtual-DOM cropped up
2023-03-25 20:00:51 -05:00
Ayaz Hafiz
782a9839ac
Only mark roc_std no_std if std feature is not present
...
Otherwise, you will get compile errors with the std feature.
2023-03-25 17:09:38 -05:00
Ayaz Hafiz
5e950134c3
Clippy
2023-03-25 17:06:41 -05:00
Ayaz Hafiz
93dc3714de
Use an iterator to walk over pattern bindings
2023-03-25 17:03:34 -05:00
Ayaz Hafiz
f75248d206
Factor out mono literal and pattern into smaller crates
2023-03-25 16:33:55 -05:00
Ayaz Hafiz
01c15c0648
Use empty slices
2023-03-25 16:15:13 -05:00
Ayaz Hafiz
18ee5d497c
Fix mono tests
2023-03-25 16:15:09 -05:00
Ayaz Hafiz
8a32747bc8
Clippy
2023-03-25 16:14:31 -05:00
Ayaz Hafiz
570876129b
Format
2023-03-25 16:14:31 -05:00
Ayaz Hafiz
628fd6a49f
Add gen test for #5176
2023-03-25 16:14:31 -05:00
Ayaz Hafiz
aef21741ec
Update mono tests
2023-03-25 16:14:30 -05:00
Ayaz Hafiz
dd55be6142
Handle guards that appear multiple times in a compiled decision tree
...
Suppose we have a when expression
```
15 if foo -> <b1>
b if bar -> <b2>
_ -> <b3>
```
that may have a decision tree like
```
15?
\true => foo?
\true => <b1>
\false => bar?
\true => <b2>
\false => <b3>
\false => bar?
\true => <b2>
\false => <b3>
```
In this case, the guard "bar?" appears twice in the compiled decision
tree. We need to materialize the guard expression in both locations in
the compiled tree, which means we cannot as-is stamp a compiled `bar?`
twice in each location. The reason is that
- the compiled joinpoint for each `bar?` guard needs to have a unique ID
- the guard expression might have call which needs unique call spec IDs,
or other joins that need unique joinpoint IDs.
So, save the expression as we build up the decision tree and materialize
the guard each time we need it. In practice the guards should be quite
small, so duplicating should be fine. We could avoid duplication, but
it's not clear to me how to do that exactly since the branches after the
guard might end up being different.
2023-03-25 16:14:21 -05:00
Ayaz Hafiz
f3ddc254c1
Update comment
2023-03-25 16:14:21 -05:00
Ayaz Hafiz
ecad660e7f
Ensure that when jumping to a branch, all pattern symbols are loaded
...
If we are jumping to a target branch, it is necessary that the target
branch has all required pattern symbols loaded in it. Usually this is
already the case, but there is an exception with guarded patterns.
Guarded patterns have their patterns loaded only right before the guard
is evaluated, which happens at some point further along the decision
tree. As such, when a guarded pattern jumps to its target destination,
it should append the loaded patterns as parameters on the target
joinpoint.
2023-03-25 16:14:21 -05:00
Ayaz Hafiz
393250db92
Utility to collect symbols bound by a pattern
2023-03-25 16:14:21 -05:00
Ayaz Hafiz
fe9be63787
Utility to substitute many symbols at once
2023-03-25 16:14:20 -05:00
Ayaz Hafiz
c13abb03be
Check in mono test that works now
...
Closes #4561
2023-03-25 15:58:39 -05:00
Ayaz
1891df77b8
Merge pull request #5188 from roc-lang/i5177
...
Make sure openness constraint goes under tuples
2023-03-25 15:52:09 -05:00
Ayaz
61dd5cc8c7
Merge pull request #5179 from roc-lang/i5143-tuple-abilities
...
Implement ability obligation checking and derivation for tuples
2023-03-25 15:51:39 -05:00
Ayaz Hafiz
f37ede036a
Do not adjust rank of lambda sets under alias arguments
2023-03-25 15:21:40 -05:00
Ayaz
78dea53a46
Merge pull request #5166 from roc-lang/fix-bool-abilities
2023-03-25 15:14:17 -05:00
Ayaz Hafiz
f7455deb06
Get rid of inaccurate debug assertion
2023-03-25 15:01:41 -05:00
Ayaz Hafiz
99d31aa74c
Derive key for decoding should pass under recursion
2023-03-25 15:01:41 -05:00
Ayaz Hafiz
f3d1582a5e
More debugging for missing lambda sets
2023-03-25 15:01:41 -05:00
Ayaz Hafiz
71c76c598a
Derive key for encoding should pass through recursion
2023-03-25 15:01:41 -05:00
Ayaz Hafiz
9b7c4bf367
Debug assertion should be negated
2023-03-25 15:01:40 -05:00
Yuki Omoto
e8adfa5b71
Treat html as text in markdown parsing to disallow html in docs
2023-03-25 21:17:53 +09:00
Ayaz Hafiz
1b2ee9ad30
Make sure openness constraint goes under tuples
...
Closes #5177
2023-03-24 14:13:14 -05:00
Anton-4
41d7ade5a3
Merge pull request #5161 from sad2project/patch-2
...
Fix typo
2023-03-24 19:24:23 +01:00
Anton-4
cae7d5eaba
ignore in different order
...
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2023-03-24 18:00:14 +01:00
Anton-4
c48c8f6d2c
added zig build lock
2023-03-24 17:24:10 +01:00
Anton-4
c7a3d48817
Merge remote-tracking branch 'upstream/main' into patch-2
2023-03-24 13:52:24 +01:00
Anton-4
0ac8cbbb97
Merge pull request #5184 from miniBill/main
...
Fix field names in example
2023-03-24 13:46:55 +01:00
Leonardo Taglialegne
0a9549798c
Fix field names in example
...
Signed-off-by: Leonardo Taglialegne <cmt.miniBill@gmail.com>
2023-03-24 00:38:40 +01:00
Ayaz Hafiz
db3698c33c
Fix code guards
2023-03-23 11:53:43 -05:00
Ayaz Hafiz
5069d926bb
Update mono tests
2023-03-23 10:18:04 -05:00
Folkert de Vries
24e2c66187
Merge pull request #5171 from roc-lang/i5169
...
Fix repl eval of Str.toDec
2023-03-23 09:20:30 +01:00
Ayaz Hafiz
825ed1c8b3
Fully implement Decoding in EnvDecoding
2023-03-22 17:18:23 -05:00
Ayaz Hafiz
c7f2a1cfe9
Avoid using builtin types in derive tests
2023-03-22 17:08:43 -05:00
Ayaz Hafiz
84fa22f235
Fix solve test module
2023-03-22 17:08:43 -05:00
Ayaz Hafiz
3e83e42195
Make sure to report error rather than descending as appropriate
2023-03-22 17:08:43 -05:00
Ayaz Hafiz
3d2642b282
Stray dbg
2023-03-22 17:08:42 -05:00
Ayaz Hafiz
e6094df69b
Fast-path for determining ability member impls for builtin opaques
2023-03-22 17:08:41 -05:00
Ayaz Hafiz
297a571b34
Eq for Bool
2023-03-22 17:03:58 -05:00