Commit graph

160 commits

Author SHA1 Message Date
Folkert
66a1ba00eb
1.65 clippy fixes 2022-11-03 16:20:37 +01:00
Ayaz Hafiz
cbd014a98a
let_import_constraint take a type index 2022-11-02 15:05:23 -05:00
Richard Feldman
5e00522a47
Merge pull request #4443 from joshuawarner32/move-min_indent-to-parse-pr
Refactor Parser trait to pass min_indent
2022-10-31 17:46:05 -07:00
Joshua Warner
07be8ec000
Refactor Parser trait to pass min_indent
This removes the need to explicitly pass thru min_indent when using the parser combinators.

My ultimate goal here is to evolve the current parser closer toward a purely combinator-based parser,
at which point we can more easily transition smoothly to a formal(ish) grammar, or expand the meanings of combinators
to include things like:
* Incremental (re)parsing
* Unified parsing and formatting code
* Better error recovery
* Using the main parser directly for syntax highlighting
2022-10-31 13:31:47 -07:00
Ayaz Hafiz
bedb26124d
Update load tests 2022-10-31 09:38:21 -05:00
Ayaz Hafiz
debe6332c5
Support OIOP for type aliases 2022-10-31 09:38:21 -05:00
Ayaz Hafiz
d55dbbf0ae
Update load test to work around constraining bug 2022-10-31 09:37:41 -05:00
Ayaz Hafiz
d77080529a
Introduce polarity for extension variable printing 2022-10-31 09:37:39 -05:00
Ayaz Hafiz
fc6f7d2613
Basic support for multi-ability docs 2022-10-24 14:00:46 -05:00
Ayaz Hafiz
548a235c25
Support parsing multiple abilities in a clause 2022-10-24 13:56:06 -05:00
Ayaz Hafiz
e75f3c3c79
Get rid of MemberImpl::Derived
We don't need this anymore, since derived members become Impls during
canonicalization now!
2022-10-23 20:48:07 -05:00
Ayaz Hafiz
d26e9c81e0
Resolve ability specializations looked up in expects 2022-10-17 17:56:48 -05:00
Ayaz Hafiz
7fa2778ecf
Fix even more load tests 2022-10-12 16:38:37 -05:00
Ayaz Hafiz
ccfb85325d
Update load tests 2022-10-12 16:38:37 -05:00
Ayaz Hafiz
a256947a9f
Move Eq to Bool 2022-10-12 16:37:51 -05:00
Ayaz Hafiz
bd5f5ed735
Old implementations can be overwritten before solving 2022-10-12 16:37:51 -05:00
Ayaz Hafiz
3674f6861e
Compile derived structural equality 2022-10-12 16:37:49 -05:00
Ayaz Hafiz
16d12a51c2
Add Eq to the standard library 2022-10-12 16:37:48 -05:00
Ayaz Hafiz
76ce025faa
Turn on type caching for Encode, Decode, Hash 2022-10-11 10:48:25 -05:00
Ayaz Hafiz
7e79ff55f1
Serialize abilities store and solved implementations with subs 2022-10-11 10:31:21 -05:00
Ayaz Hafiz
5416eb7cbf
List dependencies in the stdlib explicitly rather than hard-coding 2022-10-05 18:53:49 -05:00
Ayaz Hafiz
eadbc0912a
Update the compiler to be aware of Hash 2022-10-04 10:22:22 -05:00
Ayaz Hafiz
5bf71edf0c
Some cleanup 2022-10-02 21:42:28 -05:00
Ayaz Hafiz
a6cf21dcf9
Revert "Lints"
This reverts commit f7e85b5295a44217bde9b6b83d188d84ee863d0c.
2022-10-02 21:39:48 -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
c97cdc0753
Fix load 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
92aa0912ea
Report unused imports in modules 2022-09-30 13:40:34 -05:00
Ayaz Hafiz
ae122a0aea
Improve style 2022-09-30 13:40:34 -05:00
Ayaz Hafiz
c521668d4c
Simplify how builtin types are added to a module 2022-09-30 13:40:33 -05:00
Ayaz Hafiz
2a508721ed
Don't resolve builtin modules imported from platform interfaces as namespaced 2022-09-27 17:57:45 -05:00
Folkert de Vries
fe0e306711
Merge pull request #4108 from roc-lang/file-problem-msg
Improve file problem msg
2022-09-24 15:52:25 +02:00
Anton-4
1bf355feb9
fmt 2022-09-24 14:55:37 +02:00
Anton-4
3b0293a87d
improved file problem msg 2022-09-24 14:41:06 +02:00
Folkert de Vries
10b8cd299d
Merge pull request #4099 from roc-lang/pe-host-to-app
windows surgical linker: call host functions from the app
2022-09-24 12:54:53 +02:00
Anton-4
d83f23928e
quotes to make error stand out 2022-09-23 18:35:54 +02:00
Folkert
6c4e225a4c
use unique temp dir 2022-09-23 17:13:15 +02:00
rezzaghi
8278d37f1d
fix format 2022-09-23 11:56:31 -03:00
rezzaghi
ce70fce3b2
Add path to error message when trying to read directory 2022-09-23 11:01:00 -03:00
Ayaz Hafiz
625a86e7ed
Update test output 2022-09-21 12:30:09 -05:00
Ayaz Hafiz
06bef34829
Import Decode by default in all modules 2022-09-21 12:29:07 -05:00
Ayaz Hafiz
454f3634fd
Import all types from Encode by default 2022-09-21 12:29:06 -05:00
Ayaz Hafiz
7e5ff4883f
Do not qualify builtin modules with package shorthand when loading 2022-09-21 12:29:06 -05:00
Ayaz Hafiz
44772b8f3d
Don't add to host exposed during roc test 2022-09-14 11:26:50 -05:00
dependabot[bot]
0079048944
Bump bumpalo from 3.10.0 to 3.11.0
Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/fitzgen/bumpalo/releases)
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.10.0...3.11.0)

---
updated-dependencies:
- dependency-name: bumpalo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 21:08:56 +00:00
dependabot[bot]
d1c406812f
Bump pretty_assertions from 1.2.1 to 1.3.0
Bumps [pretty_assertions](https://github.com/rust-pretty-assertions/rust-pretty-assertions) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/rust-pretty-assertions/rust-pretty-assertions/releases)
- [Changelog](https://github.com/rust-pretty-assertions/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-pretty-assertions/rust-pretty-assertions/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: pretty_assertions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 05:28:00 +00:00