Commit graph

2377 commits

Author SHA1 Message Date
Ayaz Hafiz
f68cb3b0ed
Flip order of hash signature 2022-10-04 12:14:07 -05:00
Ayaz Hafiz
5c6856d1d6
Add reporting test 2022-10-04 11:10:11 -05:00
Ayaz Hafiz
e9efc95425
Obligation checking for the Hash ability
This implements type-level checks that types can and cannot implement
the `Hash` ability.

Part of #4195
2022-10-04 10:51:14 -05:00
Ayaz Hafiz
ca4ee908f8
Avoid shadowing Hash in mono tests 2022-10-04 10:23:39 -05:00
Ayaz Hafiz
1c8ed27e58
Avoid Hash shadowing in abilities tests 2022-10-04 10:23:09 -05:00
Ayaz Hafiz
eadbc0912a
Update the compiler to be aware of Hash 2022-10-04 10:22:22 -05:00
Ayaz Hafiz
76510ec323
Add Hash.roc builtin module 2022-10-04 10:14:29 -05:00
Ayaz Hafiz
f6c21cc933
Correctly format abilities with comments 2022-10-04 10:03:51 -05:00
Ayaz
f145610be0
Merge pull request #4125 from roc-lang/fix-module-name-mismatches
Assorted QoL improvements to incorrect module importing
2022-10-04 06:37:19 -05:00
Richard Feldman
feb05eac27
Merge pull request #4184 from roc-lang/i4147
Suggest Bool.true and Bool.false where tag literals are used
2022-10-03 18:49:51 -07:00
Ayaz
2f9d41f1d6
Merge pull request #4183 from roc-lang/i4149
Print bool correctly in repl
2022-10-03 20:48:26 -05:00
Ayaz Hafiz
cf5712620c
Suggest Bool.true and Bool.false where tag literals are used
Closes #4147
2022-10-03 17:36:27 -05:00
Ayaz
6ff59f6dc7
Merge pull request #4182 from roc-lang/i4151
Correctly format nested pipeline operators
2022-10-03 14:53:02 -05:00
Ayaz Hafiz
823076f4bf
Update repl tests 2022-10-03 14:34:18 -05:00
Ayaz Hafiz
dfd0fdc990
Print bool correctly in repl
Closes #4149
2022-10-03 14:32:15 -05:00
Ayaz Hafiz
bbb2083dd6
Correctly format nested pipeline operators
Closes #4151
2022-10-03 14:18:17 -05:00
Ayaz Hafiz
581eeb5054
Improve invalid recursion error message quality 2022-10-03 13:30:43 -05:00
Ayaz Hafiz
92b754f292
Illegal self recursion on toplevel defs
Closes #4153
2022-10-03 13:14:56 -05:00
Ayaz Hafiz
fd4b20de58
Fix test
Closes #3385
2022-10-03 13:03:52 -05:00
Anton-4
a46d4fa1c6
further improved tips UX, fixed cli.rs assert 2022-10-03 15:31:34 +02:00
João Mota
d6b59e7091
slight overlook
Signed-off-by: João Mota <jackthemotorcycle@gmail.com>
2022-10-03 13:44:00 +01:00
João Mota
692d7651ab
Add tips to REPL
Signed-off-by: João Mota <jackthemotorcycle@gmail.com>
2022-10-03 13:38:27 +01:00
Richard Feldman
2764ebb94c
Merge pull request #4146 from roc-lang/format-char-with-spaces
Properly format characters with escape sequences
2022-10-02 23:09:10 -07:00
Ayaz Hafiz
b1784768fa
Fix interface name 2022-10-02 23:33:20 -05:00
Ayaz Hafiz
ec40c3aa0e
Derive Copy 2022-10-02 21:42:43 -05:00
Ayaz Hafiz
5bf71edf0c
Some cleanup 2022-10-02 21:42:28 -05:00
Ayaz Hafiz
e1aadbc6ef
Add clone comment 2022-10-02 21:41:10 -05:00
Ayaz Hafiz
a6cf21dcf9
Revert "Lints"
This reverts commit f7e85b5295a44217bde9b6b83d188d84ee863d0c.
2022-10-02 21:39:48 -05:00
Ayaz Hafiz
f3689b1146
Fmt 2022-10-02 21:38:04 -05:00
Ayaz Hafiz
852fd0a127
Lints 2022-10-02 21:38:04 -05:00
Ayaz Hafiz
0cc9ea4b05
Detect and report module names that don't match what they are used as
Prior to this commit, if you had a module structure like

```
| - A.roc
| - Dep
    | - B.roc
```

where `B.roc` was defined as

```
interface B exposes [] imports []
```

and `A.roc` was defined as

```
interface A exposes [] imports [Dep.B]
```

The compiler would hang on you. The reason is that even though we expect
`B` to be named `Dep.B` relative to `A`, that would not be enforced.

With this patch, we now enforce such naming schemes - a module must have
the namespaced name it is referenced by. Currently, we determine the
expected namespaced name by looking at how transitive dependencies of the
root module reference the module. In the future, once we have a package
ecosystem and a solid idea of "package roots", we can use the "package
root" to determine how a module should be named.

Closes #4094
2022-10-02 21:38:03 -05:00
Ayaz Hafiz
a5ebd7f477
Comments and optimizations for builtins 2022-10-02 21:38:03 -05:00
Ayaz Hafiz
5d649666fa
Detect and report module import cycles
Closes #3557
2022-10-02 21:38:03 -05:00
Ayaz Hafiz
c67be21636
Check that module names correspond to the paths they are defined in
Closes #3440
Closes #4050
2022-10-02 21:38:02 -05:00
Ayaz Hafiz
3883867b5c
Properly format characters with escape sequences
Ran into this just now
2022-10-02 17:10:34 -05:00
Folkert
355bbcb3a7
improve comment 2022-10-02 15:48:36 +02:00
Folkert
57e67f9878
ignore a test that does not yet work on windows 2022-10-02 15:43:39 +02:00
Folkert
675092db17
add a test for preprocessing 2022-10-02 15:41:15 +02:00
Folkert
78a5902261
on windows, run the .exe with the full path 2022-10-02 15:40:34 +02:00
Folkert
06e24fb44f
bump image size 2022-10-02 15:39:24 +02:00
Folkert
a798552dee
write valid dummy sections 2022-10-02 15:37:53 +02:00
Folkert
cf23feb996
track section alignment 2022-10-02 15:33:00 +02:00
Folkert
249901c73c
add libc functions to the linker crate, so we can run tests on windows 2022-10-02 15:29:24 +02:00
Richard Feldman
a3ee6b22af
Merge pull request #4097 from roc-lang/better-default-importing
Improve how builtin modules and their types are imported
2022-10-02 00:25:32 -07:00
Folkert de Vries
2b91154b93
Merge pull request #4128 from roc-lang/static-relocations
PE inter-section relocations
2022-10-01 00:01:56 +02:00
Ayaz Hafiz
877714e9c0
Unused imports in gen-abilities 2022-09-30 14:24:06 -05:00
Ayaz Hafiz
c97cdc0753
Fix load tests 2022-09-30 13:40:35 -05:00
Ayaz Hafiz
1cffb3376e
Ignore can errors in glue tests 2022-09-30 13:40:35 -05:00
Ayaz Hafiz
cc125d62bc
Remove redundant reference 2022-09-30 13:40:35 -05:00
Ayaz Hafiz
f745debc73
Fix scope tests 2022-09-30 13:40:34 -05:00