Commit Graph

19991 Commits

Author SHA1 Message Date
Folkert de Vries
7bd6523175
Merge pull request #4199 from roc-lang/hash-obligation-checking
Obligation checking for the `Hash` ability
2022-10-04 19:51:55 +02:00
Ayaz Hafiz
f68cb3b0ed
Flip order of hash signature 2022-10-04 12:14:07 -05:00
Ayaz
006e97d976
Merge pull request #4197 from roc-lang/hash-api
Add the `Hash` builtin module
2022-10-04 12:12:32 -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
Folkert de Vries
0cc7d738e5
Merge pull request #4181 from roc-lang/i4153
Correctly compile top-level defs that are illegally self-recursive
2022-10-03 21:49:50 +02: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
b7e9b07acb
Merge pull request #4175 from roc-lang/docs-link-readme
make docs links stand out more
2022-10-03 17:49:09 +02:00
Anton-4
bf1a5bec08
make docs links stand out more
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-10-03 17:15:03 +02:00
Anton-4
eae4b35959
Merge pull request #4170 from roc-lang/benchmarks-link
fix benchmarks link
2022-10-03 17:13:36 +02:00
Anton-4
f4596469d1
fix benchmarks link
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-10-03 16:39:05 +02:00
Anton-4
f1c3451384
Merge pull request #4162 from Areadrill/patch-1
Add tips to REPL
2022-10-03 16:04:05 +02: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
b10c7722c9
Merge pull request #4156 from roc-lang/bool-docs
Update boolean docs in tutorial
2022-10-03 03:49:19 -07: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
Richard Feldman
0ae1d023e0
Update roc-for-elm-programmers about booleans 2022-10-03 00:55:36 -04:00
Richard Feldman
e5c5be62d8
Explain booleans more in tutorial 2022-10-03 00:55:14 -04: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
Richard Feldman
7f4fd015b5
Use Bool.true and Bool.false in tutorial 2022-10-02 18:46:13 -04:00
Richard Feldman
3c84fec8ed
Use Bool.true and Bool.false in FAQ 2022-10-02 18:46:04 -04:00
Ayaz Hafiz
3883867b5c
Properly format characters with escape sequences
Ran into this just now
2022-10-02 17:10:34 -05:00
Folkert de Vries
5eda218302
Merge pull request #4138 from roc-lang/windows-preprocessing
Windows preprocessing
2022-10-02 18:09:21 +02:00
Folkert
355bbcb3a7
improve comment 2022-10-02 15:48:36 +02:00