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
Sam Mohr
3a6c622727
Fix failing tests, remove unnecessary NONE bitflag
2025-01-19 15:33:01 -08:00
Ian McLerran
297dd0233e
update internal references to Result.map
2025-01-15 19:55:27 -06:00
Sam Mohr
eb1b5ffa26
Move to new interpolation syntax
2025-01-10 10:29:20 -08: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
Anthony Bullard
d0ec7e2762
Add unit test
2024-12-26 10:56:48 -06:00
faldor20
a7308130cf
clippy on everything
2024-12-12 20:54:25 +10:00
faldor20
81f2095e61
basic working
...
compiling, but still missing positions from expression errors
2024-12-12 20:54:25 +10:00
JRI98
a18232bd8b
Cleanup after #7227
2024-11-18 11:04:07 +00:00
Luke Boswell
8a566dc339
WIP
2024-11-11 10:22:58 +11:00
Luke Boswell
bb57c4a600
remove unneded basic-cli reference in test_reporting
2024-09-04 21:50:15 +10:00
Anton-4
e7a44430fd
update to basic cli 15
2024-08-31 14:30:07 +02:00
Anton-4
7938e4bdc8
basic-cli 0.15, test fixes
2024-08-28 18:39:15 +02:00
Anton-4
44b8abdead
update to basic-cli 0.14
2024-08-23 15:50:05 +02:00
Agus Zubiaga
762799052e
Merge branch 'main' into typecheck-module-params
2024-08-07 18:55:33 -03:00
Joshua Warner
4f32f43048
Implement block / indent based parsing
...
... and enforce that defs can only occur in blocks (or, inside parenthesized expressions)
2024-07-27 13:34:16 -07:00
Anton-4
3a36d84c45
update to basic-cli 0.12
2024-07-10 20:07:03 +02:00
Agus Zubiaga
26fe91b02f
Always use "MODULE PARAMS" term in errors
...
The theory is that this will be more searchable
2024-07-06 22:07:29 -03:00
Agus Zubiaga
0cbb352a89
Move unexpected params warning to solve
2024-07-06 21:36:26 -03:00
Agus Zubiaga
89fc1104f0
Report import params mismatch
2024-07-02 11:10:00 -03:00
Agus Zubiaga
922b1c44ef
Report missing params
2024-07-02 11:10:00 -03:00
Agus Zubiaga
bc6a84a215
Report unexpected params
2024-07-02 11:09:59 -03:00
Agus Zubiaga
f0fe0a3ea6
Module params are not extensible
2024-07-02 04:10:47 -03:00
Agus Zubiaga
5ec4b042bb
Constrain and solve import params
...
No reporting yet
2024-07-02 04:10:46 -03:00
Agus Zubiaga
c541dd5747
Do not report import params symbol as unused
2024-07-02 04:10:46 -03:00
Agus Zubiaga
2da7ea394b
Add --main flag to specify app/package to resolve deps from
2024-06-07 17:09:44 -03:00
Agus Zubiaga
8dedd9f03c
New app
header syntax
...
Implements the new app header syntax as discussed in Zulip [1].
app [main] {
cli: platform "../platform/main.roc",
json: "../json/main.roc"
}
Old headers still parse and are automatically upgraded to the new
syntax by the formatter.
[1] 418444862
2024-05-01 10:49:01 -03:00
Agus Zubiaga
057a18573a
New module
header
...
Implements the new `module` header syntax as described in "module and package changes" [1]:
```
module [Request, Response, req]
```
The old syntax should still work fine, and is automatically upgraded to the new one
when running `roc format`.
[1] https://docs.google.com/document/d/1E_77fO-44BtoBtXoVeWyGh1xN2KRTWTu8q6i25RNNx0/edit
2024-05-01 10:39:12 -03:00
Agus Zubiaga
eb8ef6241e
Merge branch 'main' into inline-imports
2024-05-01 10:25:17 -03:00
Anton-4
3742ef5f42
update basic-cli links to 0.10
2024-04-28 12:45:31 +02:00
Agus Zubiaga
a8a829aadd
Merge branch 'main' into inline-imports
2024-04-28 00:11:29 -03:00
Richard Feldman
6571c18a35
Update tests
2024-04-25 23:10:45 -04:00
Agus Zubiaga
f69bc2e46f
Merge branch 'main' into inline-imports
2024-04-23 18:57:20 -03:00
Agus Zubiaga
7efc7a4a3e
Canonicalize ingested files directly instead of creating AST nodes
2024-04-23 18:55:41 -03:00
Anton-4
29e59dfec9
upgrade to basic-cli 0.9.1
2024-04-23 19:06:33 +02:00
Agus Zubiaga
d952d5576a
Handle explicit builtin imports with empty exposing lists
...
Also includes related style suggestions by Ayaz on #6658
2024-04-22 18:29:48 -03:00
Agus Zubiaga
7ebfc6d06d
Support both inline and header imports
...
Load will now convert header imports to inline import defs, so that
we can support both temporarily.
2024-04-20 19:04:09 -03:00
Agus Zubiaga
7a53484479
Report an error when import shadows a symbol in scope
2024-04-20 12:38:17 -03:00
Agus Zubiaga
979aff8bf7
Explicit builtin import warning
...
We will now show a warning if a builtin is imported explicitly,
since this is unncessary.
We will not show the warning if they expose functions from the builtin:
import Dict exposing [isEmpty]
However, we will show a special warning if they expose types from it:
import Dict exposing [Dict, isEmpty]
2024-04-20 12:35:46 -03:00
Agus Zubiaga
b56f029a09
Fix unqualified unused import false positive
...
If we exposed a symbol in an import and used it both unqualified
and qualified, we'd produce an unused warning false positive.
This happened because we were using a single bit flag to determine
whether a value was used qualified or unqualified.
2024-04-20 12:18:52 -03:00
Agus Zubiaga
1f347f6ca1
Fix package module resolution in inline imports
...
We were still passing `ModuleIds` from `load` to `can`, but now
that imports can appear in any scope, we don't know which package
an unqualified module name belongs to from the top level.
We now pass `PackageModuleIds` instead and keep a Map of `ModuleName` to
`ModuleId` in `Scope`.
This also allow us to import multiple modules with the same name from different
packages as long as a unique alias is provided.
2024-04-20 12:16:37 -03:00
Agus Zubiaga
842a256907
Implement import aliases
...
Allows a module to be imported with an alias:
import JsonDecode as JD
Import aliases must be unique and they cannot have the same name
as an imported module.
2024-04-20 12:07:01 -03:00
Agus Zubiaga
d5a38a26db
Merge branch 'main' into inline-imports
2024-04-20 12:01:11 -03:00
Luke Boswell
f9771a9983
split test_utils
2024-04-15 20:30:34 +10:00
Anton-4
e4e1d7116c
update to basic-cli 0.9.0
2024-04-13 12:28:16 +02:00
Anton-4
62cc19c64b
Merge pull request #6597 from jschear/js/double_hash_is_a_doc_comment
...
Add spaces to doc comments
2024-04-01 16:20:54 +02:00
Brendan Hansknecht
6dc5bfb1b7
Use roc_target over target_lexicon
...
Tailors a target class for our needs.
Replaces tons of uses across the entire compiler.
This is a base for later adding new targets like thumb.
2024-03-31 10:50:26 -07:00
Jonathan Schear
61f3de4b8f
Run formatter
2024-03-24 18:33:57 -04:00
Jonathan Schear
f511c061ab
Add blank line to test_load for Docs
2024-03-24 14:34:40 -04:00