Anton-4
3c679f6338
Merge branch 'main' into lower-module-params
2024-08-30 16:29:46 +02:00
Agus Zubiaga
80770fae11
Handle aliases at call instead
2024-08-27 02:51:23 -03:00
Agus Zubiaga
36df43fadc
Handle simple aliased fn in params value def
2024-08-27 01:27:54 -03:00
Agus Zubiaga
b667753a32
Capture import params def
2024-08-26 23:31:42 -03:00
Sam Mohr
12df3a04de
Merge attempt
2024-08-19 23:34:05 -07:00
Agus Zubiaga
e80e3e5b2d
Convert top-level value def to fn taking params
2024-08-17 11:21:21 -03:00
Agus Zubiaga
7a8b9f7d6d
Add variable to ParamsVar
2024-08-16 20:54:16 -03:00
Sam Mohr
7e72541a79
Merge branch 'main' into builtin-task
2024-08-12 23:12:38 -07:00
Agus Zubiaga
762799052e
Merge branch 'main' into typecheck-module-params
2024-08-07 18:55:33 -03:00
Sam Mohr
cb8040f629
Ignore underscore-prefixed fields in record builders
2024-08-06 22:49:35 -07:00
Sam Mohr
8288af3156
Merge branch 'main' into builtin-task
2024-07-31 13:36:32 -07:00
Aidan
ddb58a2cd5
spaces_middle
-> lines_between
2024-07-29 13:06:48 -04:00
Aidan
91fdd903e7
comment
-> spaces_middle
2024-07-29 10:04:32 -04:00
Luke Boswell
b489c44b19
Merge remote-tracking branch 'remote/main' into builtin-task
2024-07-19 19:51:50 +10:00
Agus Zubiaga
0cbb352a89
Move unexpected params warning to solve
2024-07-06 21:36:26 -03:00
Agus Zubiaga
63e722f61d
Rename symbol and module lookup struts
2024-07-06 11:42:53 -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
db76ab4015
Replace params in abilities TODOs with unimplemented!
2024-07-02 11:09:59 -03:00
Agus Zubiaga
90c7745989
Capture import params location for better errors
2024-07-02 11:09:56 -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
8604bb23b2
Include param's record references
2024-07-02 04:10:46 -03:00
Agus Zubiaga
674adf1fad
Wrap import params expr so we can constrain later
2024-07-02 04:10:46 -03:00
Agus Zubiaga
5aebb7b570
Unqualified lookups return params
2024-07-02 04:10:44 -03:00
Agus Zubiaga
9d26adb228
Qualified lookups return params
2024-07-02 04:10:44 -03:00
Agus Zubiaga
96e2d32fa6
Canonicalize import params record
2024-07-02 04:10:44 -03:00
Agus Zubiaga
5e2ccdbfd5
Import params pending def
2024-07-02 04:10:44 -03:00
Sam Mohr
700c7ae9aa
Add Task as a built-in module/type
2024-06-25 00:03:56 -07:00
Anton-4
05a61e2210
clippy + fmt
2024-06-19 12:34:10 +02:00
Richard Feldman
8357bd8c91
Revise errors for undeclared type vars in aliases
2024-05-12 21:20:11 -04:00
Agus Zubiaga
8a25e4aac4
Handle optional annotation in ingested files when canonicalizing
2024-05-05 16:57:56 -03:00
Anton-4
f7011c8e33
Merge pull request #6644 from roc-lang/rust-1-76-0-upgrade
...
Rust 1.76.0 upgrade
2024-05-03 07:25:19 +02: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
Anton-4
c303be7553
Merge branch 'main' into rust-1-76-0-upgrade
2024-04-30 19:36:01 +02:00
Agus Zubiaga
a8a829aadd
Merge branch 'main' into inline-imports
2024-04-28 00:11:29 -03:00
Luke Boswell
2fe03e6c91
remove suffixed from Expr::Var
2024-04-28 08:47:08 +10:00
Agus Zubiaga
e500d664fd
can: Replace AnnotationReferences with plain References
...
`AnnotationReferences` ignored the fact that within an annotation
the same symbol could be referenced both in a qualified and unqualified
manner.
By using `References` we will properly track all the possible combinations.
2024-04-23 21:16:32 -03:00
Agus Zubiaga
5ca1494df1
Add IdentIds::exposed_values
2024-04-23 20:12:54 -03:00
Agus Zubiaga
0f89d3558a
impl From<ImportedModuleName> for QualifiedModuleName
2024-04-23 20:03:07 -03:00
Agus Zubiaga
7efc7a4a3e
Canonicalize ingested files directly instead of creating AST nodes
2024-04-23 18:55:41 -03: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
66bf955a6e
can/def match => if..let
2024-04-22 17:51:51 -03:00
Agus Zubiaga
5112e064e5
Add module_path to can env instead of threading it through
2024-04-21 10:30:34 -03:00
Agus Zubiaga
e5789158e5
Remove todo on ingested file handling
2024-04-21 10:13:26 -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
3217e5a3f0
Allow dots in import module names
...
We found some issues with the private submodules part of the proposal [1],
and we decided to keep module directories for now.
[1] https://docs.google.com/document/d/1E_77fO-44BtoBtXoVeWyGh1xN2KRTWTu8q6i25RNNx0/edit#heading=h.x84bh32l37em
2024-04-20 12:33:02 -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