Commit Graph

351 Commits

Author SHA1 Message Date
Folkert
7597d11b59
parse the region of the preceding comment for an expect 2022-07-21 10:42:57 -04:00
Folkert
b6f1fd6f40
constrain expects in the right order 2022-07-21 10:42:57 -04:00
Richard Feldman
3972664e48
Rename Category::Float to Category::Frac 2022-07-20 10:49:05 -04:00
Ayaz Hafiz
8f5580c0a5
Clippy 2022-07-19 15:04:01 -04:00
Ayaz Hafiz
cf158d21ed
Fix comment 2022-07-19 14:30:20 -04:00
Ayaz Hafiz
7586a8a083
Check complete ability implementations during canonicalization 2022-07-19 14:30:20 -04:00
Ayaz Hafiz
37ab06b0a3
Reject implementations that don't point to abilities 2022-07-19 14:30:19 -04:00
Ayaz Hafiz
a53de2e05c
Add a comment 2022-07-19 14:30:19 -04:00
Ayaz Hafiz
e4af8af1a3
Report duplicate implementations for ability members 2022-07-19 14:30:19 -04:00
Ayaz
7b9b855dcc
Merge pull request #3579 from rtfeldman/can-abilities
Canonicalize syntactic abilities
2022-07-19 13:30:12 -05:00
Ayaz Hafiz
666becad87
Clippy 2022-07-19 08:14:12 -04:00
Folkert
fc891c0956
the lazier thing 2022-07-18 22:13:25 -04:00
Ayaz Hafiz
d2da395619
Syntactic ability links in solve 2022-07-18 18:33:28 -04:00
Ayaz Hafiz
f8cd56da41
Register specializing symbol in can opaques 2022-07-18 17:55:01 -04:00
Ayaz Hafiz
c2154ac311
Support shorthand ability implementation syntax 2022-07-18 17:55:01 -04:00
Ayaz Hafiz
96b32c36cb
Introdue ability member names before other value names 2022-07-18 17:55:01 -04:00
Ayaz Hafiz
e672ce9ebd
First pass at canonicalizing and reporting syntactic abilities 2022-07-18 17:55:01 -04:00
Ayaz Hafiz
d118e5afbc
More can abilities 2022-07-18 17:55:01 -04:00
Ayaz Hafiz
e798eb3037
Lookup symbols in scope when the module ID is already known 2022-07-18 17:55:00 -04:00
Richard Feldman
c859ce0b23
Use Opaque over Alias 2022-07-18 17:55:00 -04:00
Folkert de Vries
98dbd236fb
Merge pull request #3546 from rtfeldman/syntactic-ability-specializations
Parse and format "has-abilities" clauses in opaque types
2022-07-16 02:06:00 +02:00
Folkert de Vries
460b822caa
Merge pull request #3501 from rtfeldman/derive-tag-union-encoding-gen
Derive tag union encoding gen
2022-07-15 15:57:41 +02:00
Folkert
b9ebd4fa27 Merge remote-tracking branch 'origin/trunk' into pretty-expect-output 2022-07-15 09:12:04 +02:00
Folkert
b6224a3806
ugly hack to make the docs build 2022-07-14 22:15:19 +02:00
Folkert de Vries
1b1b63aad0
Merge branch 'trunk' into assoc-list-dict 2022-07-14 16:47:50 +02:00
Ayaz Hafiz
d4d073d8c6
Rename Derived to HasAbility 2022-07-14 10:38:37 -04:00
Ayaz Hafiz
3f7c91f988
Where there's clippy, there's no way 2022-07-14 09:24:08 -04:00
Ayaz Hafiz
94ab904b6f
Fix compile errors 2022-07-14 09:02:37 -04:00
Ayaz Hafiz
ad5d6a4f84
Copy patterns 2022-07-14 08:49:45 -04:00
Ayaz
a9243720da
Merge pull request #3496 from rtfeldman/derive-w-mono
Monomorphize and compile derived implementations
2022-07-14 07:45:21 -05:00
Folkert
96414cb03f
cleanup 2022-07-14 08:52:38 +02:00
Folkert
06938429a1
Merge branch 'assoc-list-dict' into pretty-expect-output 2022-07-14 00:39:01 +02:00
Folkert
5763248b44
Merge remote-tracking branch 'origin/trunk' into assoc-list-dict 2022-07-13 20:44:28 +02:00
Folkert
ebce2cf8b2
make expect collector recursive 2022-07-13 18:51:11 +02:00
Richard Feldman
25facfa9c6
Expose capacity builtins 2022-07-13 12:19:37 -04:00
Folkert
fe7882b598
implement expect collector 2022-07-13 16:23:39 +02:00
Folkert
6190fc9f67
trying to gather expects 2022-07-13 15:47:25 +02:00
Ayaz Hafiz
7c2e806a02
Make sure to clone lambda names in can/copy 2022-07-13 08:47:39 -04:00
Ayaz Hafiz
987ebfa9d3
Move expr copying to can 2022-07-13 08:47:39 -04:00
Ayaz Hafiz
9a01117536
Fix compile errors 2022-07-13 08:47:37 -04:00
Ayaz Hafiz
d56d880afb
Option<SpecializationId> rather than SpecializationId = Option<..> 2022-07-13 08:47:34 -04:00
Ayaz Hafiz
2fbe715f9f
Support null specialization ids 2022-07-13 08:47:34 -04:00
Folkert
cbd6052dbb
fix dict/set not being in scope 2022-07-13 14:04:38 +02:00
Folkert
8e21fdcb04
remove dict/set lowlevels 2022-07-13 11:24:07 +02:00
Ayaz Hafiz
f1a6ea6a40
Typecheck and compile opaque wrapping functions
This enables you to write something like

```
A := U8
List.map [1, 2, 3] @A
```

which will be compiled as if it was `List.map [1, 2, 3] \x -> @A x`.

Closes #3499
2022-07-12 18:38:03 -04:00
Folkert
f9d8e01561
implement Dict/Set completely in roc 2022-07-13 00:35:20 +02:00
Richard Feldman
c61795197f
Merge pull request #3478 from rtfeldman/toplevel-expect-captures
toplevel expect captures
2022-07-12 08:58:19 -04:00
Richard Feldman
2e038a045c
Merge pull request #3467 from rtfeldman/remove-parse-def 2022-07-10 23:12:26 -04:00
Folkert
239ef9cbe1
my comment is not a code snippet, cargo 2022-07-10 21:31:26 +02:00
Folkert
830dd03b30
add comment 2022-07-10 20:48:57 +02:00
Folkert
67cbe6a590
pipe a list of expects to llvm codegen 2022-07-10 20:04:08 +02:00
Folkert
5df489ba23
turn toplevel expects into inline expects 2022-07-10 19:17:51 +02:00
Folkert
4956fc5ef4
remove transitive builtins 2022-07-10 01:22:30 +02:00
Folkert
3dee90ced8
remove parse::ast::Def 2022-07-10 01:10:37 +02:00
Richard Feldman
4ae91b2084
Fix STR_RESERVE constant 2022-07-08 20:24:22 -04:00
Richard Feldman
55931bca9e
Merge pull request #3452 from rtfeldman/can-builtins-cleanup
Can builtins cleanup
2022-07-08 18:54:59 -04:00
Folkert
a4e1de2f2d
improve names and comments around the new macros 2022-07-08 23:43:36 +02:00
Folkert de Vries
15fee6fc9c
Merge pull request #3455 from rtfeldman/opaque-recursion-var
Support recursion var unification in opaque types
2022-07-08 22:18:26 +02:00
Folkert
e8530eaca5
improve lowlevel unwrapping 2022-07-08 22:13:13 +02:00
Ayaz Hafiz
676d6b3a7f
Sorry clippy, we love long lists 2022-07-08 15:38:50 -04:00
Ayaz Hafiz
d9edb4d1bb
Support unification of recursion vars in opaques 2022-07-08 15:31:29 -04:00
Folkert
d3662c4671
remove the old can/builtins approach 2022-07-08 13:54:45 +02:00
Folkert
41768bfa97
new approach for defining our builtins 2022-07-08 13:46:34 +02:00
Folkert
56c9787e8f
List.appendUnsafe and List.reserve 2022-07-07 22:40:28 +02:00
Richard Feldman
7365da6f69
Merge pull request #3370 from rtfeldman/list-unreachable
List unreachable
2022-07-06 10:45:50 -04:00
Ayaz Hafiz
ba450367ca
Choose i128/u128 num layouts when necessary 2022-07-05 22:16:52 -04:00
Ayaz Hafiz
5a18490050
Support ordering floats in numeric literal bounds 2022-07-05 22:16:51 -04:00
Folkert
3a30e77726
Merge remote-tracking branch 'origin/trunk' into list-unreachable 2022-07-06 01:38:50 +02:00
Ayaz Hafiz
fc1617bf17
Phantom types
Closes #3314
2022-07-05 19:07:41 -04:00
Folkert de Vries
93dbda9ac5
Merge pull request #3399 from rtfeldman/pure-roc-map-with-index
Pure Roc `List.mapWithIndex`
2022-07-06 00:25:46 +02:00
Folkert
6095dcff66
Merge remote-tracking branch 'origin/trunk' into list-unreachable 2022-07-04 19:21:31 +02:00
Folkert
6d7c329698
Str.walkScalars 2022-07-04 18:01:19 +02:00
Folkert
1de9270ecf
Merge remote-tracking branch 'origin/trunk' into str-walk 2022-07-04 16:30:07 +02:00
Folkert
9c41a4d442
str.appendScalar 2022-07-04 16:27:04 +02:00
Brian Carroll
a129e0458c
can: delete AST implementation of List.mapWithIndex 2022-07-04 15:06:45 +01:00
Folkert
ab721dd3c1
Str.reserve 2022-07-04 14:57:20 +02:00
Brian Carroll
e1d8d09472
builtins: move the output argument of Zig fromUtf8RangeC to first position 2022-07-04 11:24:39 +01:00
Brian Carroll
a342f02824
wasm: fix Str.fromUtf8 2022-07-04 11:24:38 +01:00
Folkert
5904934887
rename countBytes -> countUtf8Bytes 2022-07-03 21:49:01 +02:00
Folkert
eeb271d07f
Str.splitFirst and Str.splitLast 2022-07-03 19:47:06 +02:00
Folkert
be3800d7fa
add substringUnsafe roc function 2022-07-03 17:15:25 +02:00
Ayaz Hafiz
641bd95d04
Make sure accessor closures get the name of their assigned def, if any 2022-07-03 10:37:35 -04:00
Ayaz Hafiz
019ebd93f7
Put the capture niche in the lambda name instead of generating new names 2022-07-03 10:37:29 -04:00
Folkert
3cd56c3184
add Str.countBytes 2022-07-03 14:16:47 +02:00
Folkert
1f943a5452
add Str.getUnsafe 2022-07-03 13:46:22 +02:00
Folkert
762258ae20
Merge remote-tracking branch 'origin/trunk' into list-unreachable 2022-07-03 02:54:15 +02:00
Folkert de Vries
2a82d24847
Merge pull request #3369 from rtfeldman/pure-roc-list-walk
List.walk and friends in pure Roc
2022-07-03 02:32:43 +02:00
Folkert de Vries
d2c07f350d
Merge pull request #3371 from rtfeldman/starts-with-scalar
Str.startsWithCodePt -> Str.startsWithScalar
2022-07-03 00:22:21 +02:00
Folkert de Vries
75b4b3a206
Merge pull request #3365 from rtfeldman/to-scalars
Add Str.toScalars builtin
2022-07-02 23:04:28 +02:00
Brian Carroll
94181111be
Merge branch 'trunk' of github.com:rtfeldman/roc into pure-roc-list-walk 2022-07-02 21:44:42 +01:00
Richard Feldman
af05723d35
Rename startsWithCodePt to startsWithScalar 2022-07-02 15:51:33 -04:00
Folkert
506e374642
List.unreachable 2022-07-02 19:40:05 +02:00
Folkert
e29a89d33c
remove zig implementation of keepIf/keepErrs/keepOks 2022-07-02 19:38:38 +02:00
Folkert
6324fd632d
remove manual can implementation of takeFirst/takeLast 2022-07-02 19:38:37 +02:00
Richard Feldman
09a656640e
Fix an incorrect var 2022-07-02 13:13:27 -04:00
Richard Feldman
acb7cf99e1
Add Str.toScalars builtin 2022-07-02 13:12:12 -04:00
Brian Carroll
219e6d11cf
Merge branch 'trunk' of github.com:rtfeldman/roc into pure-roc-list-walk 2022-07-02 18:08:43 +01:00
Anton-4
b74fc3554b
Merge branch 'trunk' of github.com:rtfeldman/roc into crates-folder 2022-07-02 12:35:19 +02:00
Anton-4
b1b9a8dc0a
Merge branch 'trunk' of github.com:rtfeldman/roc into crates-folder 2022-07-02 10:44:25 +02:00
Anton-4
ef68d821f1
Merge branch 'trunk' of github.com:rtfeldman/roc into crates-folder 2022-07-01 17:43:05 +02:00
Anton-4
eee85fa45d
moved all crates into seperate folder + related path fixes 2022-07-01 17:37:43 +02:00