Brendan Hansknecht
90f4885f4b
use Arc to avoid ever needing to actually copy the underlying bytes
2023-04-09 14:03:33 -07:00
Brendan Hansknecht
a354860d07
clippy
2023-04-09 14:03:33 -07:00
Brendan Hansknecht
6302a8d4b5
switch from type annotation to type variable
2023-04-09 14:03:33 -07:00
Brendan Hansknecht
8f4945f286
make file loading errors that happen late in compilation still fatal
2023-04-09 14:03:33 -07:00
Brendan Hansknecht
7079361841
add ingested file category for error messages
2023-04-09 14:03:32 -07:00
Brendan Hansknecht
d42aa43b41
add ingest file to can ir and start pipelining it through the compiler
2023-04-09 14:03:32 -07:00
Brendan Hansknecht
7c77f7c2a2
get a basic full pipeline working that will load a file as a string
2023-04-09 14:03:32 -07:00
Brendan Hansknecht
56ed985cc9
pass through correct path and type for ingested file
2023-04-09 14:03:32 -07:00
Brendan Hansknecht
f4411afbbc
get basic wiring of a value through the compiler
2023-04-09 14:03:31 -07:00
Ayaz Hafiz
630a8e32d4
Clippy
2023-04-02 00:32:20 -05:00
Ayaz Hafiz
0e47140eaf
Complete instantiation annotations
2023-04-01 20:05:18 -05:00
Ayaz Hafiz
ca5a5c2698
More progress on instantiated annotations in the source
2023-04-01 15:06:44 -05:00
Ayaz Hafiz
bfcafb0be3
Refactor the solve inferrer
2023-04-01 12:45:32 -05:00
Ayaz Hafiz
32a59b7e72
Lints
2023-03-31 18:04:32 -05:00
Ayaz Hafiz
a10ce77584
Support printing can decls in uitest
2023-03-31 14:34:06 -05:00
Ayaz Hafiz
d2b9a1a33c
Improve debug printing for can decls
2023-03-27 10:10:56 -05:00
Ayaz Hafiz
66fb2f476e
Pretty-print tuple access
2023-03-22 10:27:49 -05:00
Ayaz Hafiz
e8a29d2df4
Ensure that closures inside recursive closures capture correctly
...
With a code like
```
thenDo = \x, callback ->
callback x
f = \{} ->
code = 10u16
bf = \{} ->
thenDo code \_ -> bf {}
bf {}
```
The lambda `\_ -> bf {}` must capture `bf`. Previously, this would not
happen correctly, because we assumed that mutually recursive functions
(including singleton recursive functions, like `bf` here) cannot capture
themselves.
Of course, that premise does not hold in general. Instead, we should have
mutually recursive functions capture the closure (haha, get it) of
values captured by all functions constituting the mutual recursion.
Then, any nested closures can capture outer recursive closures' values
appropriately.
2023-03-20 17:44:59 -04:00
Brendan Hansknecht
48f17a8e2c
add Str.releaseExcessCapacity
2023-03-15 15:24:59 -07:00
Brendan Hansknecht
1319ba4844
add List.releaseExcessCapacity builtin
2023-03-13 17:43:21 -07:00
Brendan Hansknecht
e6964536b2
add more Num.bytesTo* functions
2023-03-12 08:41:05 -07:00
Brendan Hansknecht
785da377c8
add Num.count*Bits functions
2023-03-12 08:41:04 -07:00
Brendan Hansknecht
f42f61e271
run a toml formatter and then clean it up a bit
2023-03-06 19:47:57 -08:00
Brendan Hansknecht
4a89bee0a5
centralize package versions except for vendor and excluded
2023-03-06 19:29:09 -08:00
Brendan Hansknecht
5485c8a5b0
update to using workspace package spec
2023-03-06 16:36:18 -08:00
Ayaz Hafiz
5a1898b285
Pretty-print opaque refs
2023-02-20 18:42:05 -06:00
Joshua Warner
5a6be05ead
implement mono / lowering for tuples
2023-02-07 18:54:50 -08:00
Ayaz Hafiz
009607c55a
Handle FunctionOrTagUnion types in exhaustiveness checking
...
We should treat FunctionOrTagUnion types as tag unions for the purposes
of exhautiveness checking.
Closes #4994
2023-02-01 22:03:10 -06:00
Folkert
3417a0e059
fix silent merge request wrt record accessors
2023-01-25 00:02:19 +01:00
Folkert de Vries
8e5efe67b4
Merge pull request #4912 from roc-lang/remove-polymorphic-expression-compilation
...
Rip out polymorphic expression compilation
2023-01-24 21:35:08 +01:00
Joshua Warner
de828416bf
Initial implementation of tuples in type checking
...
This leaves in place a bunch of TODOs and likely many bugs - notably, I haven't tested codegen/layout at all here.
2023-01-22 12:40:44 -08:00
Ayaz Hafiz
6b491c617e
Store def name on accessor functions
2023-01-21 12:37:09 -06:00
Ayaz Hafiz
c9460ecf3f
Rename IsImplicitOpennessVar
2023-01-16 10:52:23 -06:00
Ayaz Hafiz
5fceb9ceb7
Push implicit openness vars through
2023-01-16 10:52:23 -06:00
Ayaz Hafiz
96b2b7a0c5
Fix comment
2023-01-16 10:52:23 -06:00
Ayaz Hafiz
1c93727822
Add a notion of "openness" tag extensions suitable only for size-polymorphism
2023-01-16 10:52:23 -06:00
Ayaz Hafiz
3d0a0a4a99
Update more dict/set references
2023-01-14 15:33:54 +01:00
Richard Feldman
ab7de647e4
Merge pull request #4863 from joshuawarner32/better-scalar-literals
...
Improve parsing of scalar literals
2023-01-09 11:42:44 -05:00
Ayaz
7c61d0d278
Merge pull request #4843 from roc-lang/pattern-as-can
...
Pattern as can
2023-01-08 19:36:40 -06:00
Folkert
c2ddeb0de0
fix and test as pattern type inference
2023-01-08 16:40:03 +01:00
Joshua Warner
94070e8ba6
Improve parsing of scalar literals
...
* Unify parsing of string literals and scalar literals, to (e.g.) ensure escapes are handled uniformly. Notably, this makes unicode escapes valid in scalar literals.
* Add a variety of custom error messages about specific failure cases of parsing string/scalar literals. For example, if we're expecting a string (e.g. a package name in the header) and the user tried using single quotes, give a clear message about that.
* Fix formatting of unicode escapes (they previously used {}, now correctly use () to match roc strings)
2023-01-07 15:12:52 -08:00
Ayaz Hafiz
bcfb258db8
Add a bit to mark syntactically-generalizable types
2023-01-04 17:02:20 -06:00
Ayaz Hafiz
3b0e2429e6
Support printing weak type variables in tests
...
Unbound type variables that are not at the generalization rank will now
be printed as `w_a` in solve tests.
2023-01-04 16:24:19 -06:00
Ayaz
9171799c67
Merge pull request #4841 from roc-lang/parse-pattern-as
...
Parse pattern as
2022-12-31 13:19:57 -06:00
Folkert
2e27746413
can for list .. as
2022-12-31 16:00:40 +01:00
Folkert
905341d849
can for normal (no-list) as
2022-12-31 15:46:11 +01:00
Richard Feldman
879b957676
Delete unused branch (it never got hit on CI)
2022-12-30 22:40:45 -05:00
Folkert
aff70bb6bd
refactor PatternAs
2022-12-30 18:22:10 +01:00
Folkert
e9196f3c0b
parse and format pattern as
2022-12-30 17:50:17 +01:00
Richard Feldman
8e2eb2b28d
Check if a branch is unreachable
2022-12-29 20:48:45 -05:00