Ayaz Hafiz
0b8ac07287
Get rid of more type clones
2022-10-24 14:25:19 -05:00
Ayaz Hafiz
7c3fe5bc44
Remove some type clones
2022-10-24 14:11:53 -05:00
Ayaz Hafiz
55d7f3f658
Require type and expected indices in equal_types constraints
2022-10-24 14:05:19 -05:00
Ayaz Hafiz
35a4781045
Get rid of redundant references
2022-10-24 13:13:08 -05:00
Ayaz Hafiz
9b24205906
Emplace variables made from types in expectations
2022-10-24 13:11:35 -05:00
Ayaz Hafiz
04a3f1c00e
Use a helper to emplace type cells
2022-10-24 12:07:00 -05:00
Ayaz Hafiz
d3e14550d8
Leave variables behind when converting Types to variables
...
This is part one of addressing the present issues with emplacing type
directly where type variables should be reused. Now, when an
`Index<Type>` is converted to a variable in solving, we leave the
converted variable in the `Type`'s place. Specifically, we keep an index
to a `Cell<Type>`.
Note that this transformation is only temporary, it will be removed once
we merge this with the `Type` SoA representation, but it is needed in
the meantime as I transform the `Constrain` API to get rid of
type-emplacement.
2022-10-24 11:42:35 -05:00
Christopher Duncan
a627a47709
Add Dict module to the testing CI
2022-10-23 08:37:59 -04:00
Richard Feldman
f734cc11c2
Merge pull request #4364 from travisstaloch/str-graphemes
...
Str graphemes
2022-10-22 22:31:50 -07:00
Travis Staloch
c2dbed2ff5
str-graphemes: rework and add some zig tests
...
- rework strGraphemes() to use a mutable slice and keep track of just
`last_codepoint_len`.
- add zig tests for empty string, ascii, utf8, ascii+utf8+emoji
2022-10-22 19:29:49 -07:00
Prajwal S N
df7e4eea7e
builtin(str): implement Str.graphemes
...
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-22 19:29:49 -07:00
Folkert de Vries
be624f8bcb
Merge pull request #4359 from roc-lang/i4313
...
Disallow typing optional fields when required fields are annotated
2022-10-23 01:20:55 +02:00
Folkert de Vries
bcf2fc340d
Merge pull request #4350 from roc-lang/i4348
...
Use runtime representation of values when building structural eq
2022-10-23 01:19:17 +02:00
Folkert de Vries
4a5c8fd7ae
Merge pull request #4303 from roc-lang/i4291
...
Make sure self-recursive checks only happen after typechecking
2022-10-23 01:18:56 +02:00
Folkert de Vries
863d0ab63e
Merge pull request #4353 from roc-lang/refine-relocation-location
...
refine relocation location
2022-10-21 12:16:31 +02:00
Brendan Hansknecht
e27b874331
update test to use HASH_HASH_I* instead of HASH_ADD_I*
2022-10-19 18:22:44 -07:00
Ayaz Hafiz
f826ff1a71
Remove addI* variants from Hash
...
These are trivially fulfilled by converting a signed int to its unsigned
repr and hashing that.
2022-10-19 14:24:21 -05:00
Richard Feldman
b6a282b0ce
Merge pull request #4337 from joshuawarner32/when-indentation-1
...
Allow parsing `when` cases with python-like indentation
2022-10-19 07:03:05 -07:00
Joshua Warner
e39a385f5f
Allow parsing when cases with python-like indentation
2022-10-18 19:13:20 -07:00
Folkert de Vries
e90ddcd7d1
Merge pull request #4354 from roc-lang/var-has-variable
...
Resolve ability specializations looked up in expects
2022-10-18 23:28:17 +02:00
Ayaz Hafiz
05e8e6de6f
Disallow typing optional fields when required fields are annotated
...
Closes #4313
2022-10-18 15:50:20 -05:00
Brendan Hansknecht
62c9a2a8b6
Merge pull request #4355 from roc-lang/concat-memleak
...
Fix memory leak in List.concat
2022-10-18 19:07:52 +00:00
Ayaz Hafiz
d7237dc9e9
Cargo format
2022-10-18 12:09:18 -05:00
Folkert
b23b53aa6f
disable -fPIE on windows
2022-10-18 18:45:38 +02:00
Ayaz Hafiz
706d22a942
Fix encode/decode deriving
2022-10-18 08:22:23 -05:00
Brendan Hansknecht
9f09bebdca
run
2022-10-17 21:50:25 -07:00
Brendan Hansknecht
1225cb54fc
Fix memory leak in List.concat
2022-10-17 21:45:46 -07:00
Ayaz Hafiz
d26e9c81e0
Resolve ability specializations looked up in expects
2022-10-17 17:56:48 -05:00
Ayaz Hafiz
8aee32830a
Add symbols' localized type variable to the AST
2022-10-17 17:35:48 -05:00
Folkert
d93902cd18
fix compilation on windows for windows
2022-10-17 21:22:13 +02:00
Ayaz Hafiz
7986514d20
Use runtime representation of values when building structural eq
...
Closes #4348
2022-10-17 11:36:57 -05:00
Prajwal S N
07224e9086
builtin(list): add List.walkFrom, List.walkFromUntil
...
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-17 20:51:03 +05:30
Ayaz Hafiz
3d34de5fc1
Remove test caught by reporting tests
2022-10-17 09:59:34 -05:00
Ayaz Hafiz
ecab8fa25a
Make sure self-recursive checks only happen after typechecking
...
Programs like
```
after : ({} -> a), ({} -> b) -> ({} -> b)
fx = after (\{} -> {}) \{} -> if Bool.true then fx {} else {}
```
are legal because they always decay to functions, even if they may not
look like functions syntactically. Rather than using a syntactic check
to check for illegally-recursive functions, we should only perform such
checks after we know the types of values.
Closes #4291
2022-10-17 09:59:32 -05:00
Anton-4
d6885bde23
Merge pull request #4299 from cjduncana/ci-markdown-links
...
Repair broken links in Markdown
2022-10-15 19:32:25 +02:00
Anton-4
d242895ff9
Merge pull request #4254 from roc-lang/wasm32_cli_run
...
wasm 32 cli run fixes, added to ci tests
2022-10-15 18:41:52 +02:00
Anton-4
2f8dcb7e12
Merge pull request #4298 from lucacervello/replace-panic!-with-internal-error!-in-compiler-crates
...
Replace panic! with internal_error! in `compiler/build`, `compiler/alias_analysis` and `compiler/arena_pool`
2022-10-15 17:05:25 +02:00
Anton-4
78e66c6c26
format Str.roc
2022-10-15 11:19:54 +02:00
Anton-4
762bd43e5f
minor improvements
...
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-10-15 09:46:41 +02:00
Luke Boswell
a99fe32bff
Merge branch 'roc-lang:main' into updating-docs
2022-10-15 18:32:37 +11:00
Anton-4
789586f545
add link with explanation of grapheme
...
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-10-15 09:17:08 +02:00
Luke Boswell
e1e084a68d
remove >>> from comments
2022-10-15 16:29:42 +11:00
Luke Boswell
1b4e89203d
updated Str builtin documentation
2022-10-15 16:15:43 +11:00
Ayaz
c1c339dbdf
Merge pull request #4304 from roc-lang/i4259
...
Make sure type variables bound to abilities are instantiated in aliases
2022-10-14 16:07:58 -05:00
Folkert
e63dba8e2f
minimal wasi benchmarks
2022-10-14 21:59:34 +02:00
Ayaz Hafiz
5e35b6458a
Apply lint suggestions
2022-10-14 13:56:01 -05:00
Ayaz Hafiz
65f1bd2907
Fix rigid able bindings to abilities
2022-10-14 13:56:01 -05:00
Ayaz Hafiz
20e4295eea
Make sure type variables bound to abilities are instantiated in aliases
...
Closes #4259
2022-10-14 13:56:00 -05:00
Ayaz Hafiz
12ecdab4c5
Add listGetUnsafe to Dict.roc rather than exposing from list
2022-10-14 13:43:31 -05:00
Brendan Hansknecht
5a86f611fa
add some TODOs
2022-10-14 07:55:07 -07:00