Norbert Hajagos
fc0a9ec4cf
add with_ascii_uppercased and caseless_ascii_equals to Str
2025-01-23 15:21:11 +01:00
shua
6c29d7aa1f
Merge branch 'main' into fromutf-roc
2025-01-20 19:16:38 +01:00
Norbert Hajagos
8403f1ea19
with_ascii_lowercased zig builtin
2025-01-20 10:58:41 +01:00
Luke Boswell
c8467b1fe0
Merge pull request #7454 from roc-lang/ayaz/error-on-invalid-generalized-types
...
Restrict usages of type variables in non-generalized contexts
2025-01-20 11:30:52 +11:00
shua
17624a9d2c
Merge branch 'main' into fromutf-roc
2025-01-18 01:58:14 +01:00
Ian McLerran
14d99c6907
update solve_expr and test_gen tests with map_ok
2025-01-15 21:30:19 -06:00
shua
414fecd14d
add fromUtf16 and 32, as well as lossy variants
2025-01-15 00:17:09 +01:00
Ayaz Hafiz
89700b491c
Fix some tests
2025-01-10 20:49:53 -05:00
Ayaz
ee3c71dfe6
Merge branch 'main' into ayaz/error-on-invalid-generalized-types
...
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2025-01-10 14:36:48 -05:00
Sam Mohr
eb1b5ffa26
Move to new interpolation syntax
2025-01-10 10:29:20 -08:00
Sam Mohr
8e5d875604
Merge branch 'main' into auto-snake-case
2025-01-08 01:51:12 -08:00
Luke Boswell
99dfc5529d
Merge pull request #7450 from roc-lang/ayaz/bugfix-ts
...
Minor simplifications to typechecker
2025-01-08 16:28:25 +11:00
Sam Mohr
7a2f8bfa71
Merge branch 'main' into auto-snake-case
2025-01-07 13:18:41 -08:00
Ayaz Hafiz
be99b82319
Drop debug assert
...
I don't think this assert is actually accurate.
2025-01-05 23:54:37 -05:00
Ayaz Hafiz
54cc5e4c29
Unify let-introduction in a single path
...
Remove branches on determining how let-bindings are introduced to the
scope. This is maybe a little more inefficient, but I think it is a huge
simplification.
One additional change this required was changing how fx suffixes are
checked. The current implementation would add additional constraints for
patterns in let bindings conditionally. However, this is unnecessary. I
believe it is sufficient to check the fx suffix by running the checks on
all introduced symbols after the type is well known (i.e. the body is
checked).
2025-01-05 23:54:37 -05:00
Ayaz Hafiz
bd2dd66c96
Store rigid vars with location during constraining
2025-01-05 23:54:36 -05:00
Sam Mohr
0edbf16d55
More progress
2025-01-05 05:16:47 -08:00
Sam Mohr
b56fbd38e1
Progress on updating entire compiler for snake_case
2025-01-05 03:48:03 -08:00
Sam Mohr
30b8a1407d
Fix broken ability implementation
2025-01-04 05:37:17 -08:00
Ayaz Hafiz
a0461679dd
Restrict usages of type variables in non-generalized contexts
...
Type variables can only be used on functions (and in number literals as
a carve-out for now). In all other cases, a type variable takes on a
single, concrete type based on later usages. This check emits errors
when this is violated.
The implementation is to check the rank of a variable after it could be
generalized. If the variable is not generalized but annotated as a type
variable, emit an error.
2025-01-02 14:26:37 -06:00
Ayaz Hafiz
f5961cbb22
Drop debug assert
...
I don't think this assert is actually accurate.
2025-01-02 00:51:48 -06:00
Ayaz Hafiz
c3d77b8841
Unify let-introduction in a single path
...
Remove branches on determining how let-bindings are introduced to the
scope. This is maybe a little more inefficient, but I think it is a huge
simplification.
One additional change this required was changing how fx suffixes are
checked. The current implementation would add additional constraints for
patterns in let bindings conditionally. However, this is unnecessary. I
believe it is sufficient to check the fx suffix by running the checks on
all introduced symbols after the type is well known (i.e. the body is
checked).
2025-01-01 23:39:37 -06:00
Ayaz Hafiz
280d479a24
Store rigid vars with location during constraining
2025-01-01 23:39:37 -06:00
shua
2dfce54a7c
update Str.fromUtf8 error type
2024-12-08 23:09:47 +01:00
Sam Mohr
de626102c8
Use new try impl for ? operator
2024-12-05 02:13:13 -08:00
Sam Mohr
eedade8e81
Initial working version of proper try
keyword
2024-12-04 02:31:59 -08:00
Luke Boswell
e43b78b354
update to workspace deps for miscellaneous
2024-11-29 11:37:39 +11:00
Luke Boswell
fdaaca8c8b
replace cargo deps with workspace in lower_parms, module, mono, parse, problem, roc_target, serialize, solve, solve_problem, specialize_types, test_*
2024-11-29 11:29:04 +11:00
Agus Zubiaga
2e7e67019f
Add doc comment to SolveConfig.host_exposed_symbols
2024-11-27 14:15:08 -03:00
Agus Zubiaga
6ffc8a507b
Allow suffixed pure functions that are exposed to the host
2024-11-27 14:06:37 -03:00
Isaac Van Doren
45b50bd131
add List.splitAt
2024-11-09 17:16:21 -06:00
Agus Zubiaga
c9f001b041
Allow ignored defs with an effectful RHS
2024-11-07 18:54:22 -03:00
Agus Zubiaga
cfc4be5254
Treat untyped suffixed functions as effectful
2024-11-07 18:54:21 -03:00
Agus Zubiaga
af6fc6306f
Treat untyped unsuffixed functions as pure
2024-11-07 18:54:21 -03:00
Agus Zubiaga
e75b1cf7a0
Check suffixes of all pattern identifiers
2024-11-07 18:54:20 -03:00
Agus Zubiaga
215de707fa
Report unsuffixed record literal field with effectful function
2024-11-07 18:54:20 -03:00
Agus Zubiaga
ea35094b28
Remove flex var case when checking symbol suffix
2024-11-07 18:54:20 -03:00
Agus Zubiaga
2859829ea8
Mark flex fx vars as pure after solving body
2024-11-07 18:54:19 -03:00
Agus Zubiaga
89a918cebe
Fix unifying pure with flex vars
2024-11-07 18:54:19 -03:00
Agus Zubiaga
31bc3670df
Ignore errors in statement checks
2024-11-07 18:54:18 -03:00
Agus Zubiaga
d22b2a79f5
Suffixed pure function warning
2024-11-07 18:54:17 -03:00
Agus Zubiaga
1da8af390b
Unsuffixed effectul function warning
2024-11-07 18:54:16 -03:00
Agus Zubiaga
69e026f8bb
Leftover statement warning for pure statements
2024-11-07 18:54:16 -03:00
Agus Zubiaga
7af05cc6c9
Constrain function annotation fx to body
2024-11-07 18:54:13 -03:00
Agus Zubiaga
b9b85a222f
Do not use const fx vars when canonicalizing annotations
2024-11-07 18:54:13 -03:00
Agus Zubiaga
7776883262
Unify functions fx vars
2024-11-07 18:54:13 -03:00
Agus Zubiaga
5a5abe3bc5
Unify call's fx var with that of the enclosing function
2024-11-07 18:54:12 -03:00
Agus Zubiaga
3cef756559
Add fx var to Type::Function et al
2024-11-07 18:54:12 -03:00
Agus Zubiaga
625a5425f4
Unify import params on copied variable
2024-11-05 18:10:01 -03:00
Ayaz
e1183e58e5
Merge pull request #7179 from JRI98/unused_emptytuple
...
Remove unused EmptyTuple variant from FlatType enum
2024-10-25 09:19:57 -04:00