Ayaz Hafiz
a4c122d5db
Validate derives clauses after solving
2022-05-20 15:56:55 -04:00
Ayaz Hafiz
22bf650685
Cleanup abilities_in_scope
and rename to pending_abilities_in_scope
...
`abilities_in_scope` is a buffer we use to keep track of locally-defined
abilities before we've fully resolved them. We do this because we
canonicalize ability members signatures before we've registered an
ability to the abilities store, and canonicalization of signatures must
report `has` bounds that don't reference abilities.
So, this buffer is more appropriately named `pending_abilities_in_scope`.
There is also no reason to export it, because it is only relevant
during canonicalization of type defs in a module.
2022-05-20 09:57:31 -04:00
Ayaz Hafiz
95e325296f
Solve derived impls
2022-05-19 18:23:02 -04:00
Ayaz Hafiz
1beb0551cb
Expose ability names
2022-05-19 18:21:42 -04:00
Ayaz Hafiz
312cdd0b70
Correct imports of Encode and abilities across modules
2022-05-19 18:21:40 -04:00
Folkert
f285e7ce93
add a TypedHole node to Expr, for use in the editor
2022-05-18 16:39:24 +02:00
Ayaz Hafiz
710a10a29c
Check for invalid cycles after type solving recursive defs
...
Disallow cycles that pass through a non-function value. Since we
evaluate eagerly, having one such cycle means there is at least one path
in the program that (likely) has unbounded recursion. Of course we can't
be certain (halting problem), but it's very likely, and avoids stuff
like #1926 . Also, mono (as it's done today) won't work if things in a
cycle aren't functions.
Closes #1926
2022-05-11 14:57:01 -04:00
Ayaz Hafiz
17d8545510
Remove symbols_from_pattern
2022-05-11 14:53:40 -04:00
Ayaz Hafiz
edee222763
Add AbilityMember can variant for resolving ability specializations
2022-05-08 15:08:16 -04:00
Ayaz Hafiz
2e57bf0b6a
Permit able variables in aliases, and thread them through
2022-05-08 15:08:14 -04:00
Folkert
7be41d8c09
remove unused variables from let/letrec
2022-05-08 20:06:00 +02:00
Folkert
2e9477e011
remove another result wrapper
2022-05-08 17:16:13 +02:00
Folkert
d5b010cb13
remove unused Result wrapper
2022-05-08 17:16:00 +02:00
Ayaz Hafiz
77a1f644a4
Thread error message information for requires
2022-05-06 12:06:27 -04:00
Ayaz Hafiz
e8fbda44fc
Revert "Revert "Thread through symbols_from_requires""
...
This reverts commit 8ac1dfac1a
.
2022-05-06 12:06:27 -04:00
Richard Feldman
8ac1dfac1a
Revert "Thread through symbols_from_requires"
...
This reverts commit 1421aebcd3
.
2022-05-05 16:19:34 -04:00
Richard Feldman
1421aebcd3
Thread through symbols_from_requires
2022-05-05 16:18:47 -04:00
Anton-4
c745c08071
fmt+clippy
2022-05-02 18:33:41 +02:00
Folkert
8fe3e24c8b
step 4: new scope with passing reporting tests
2022-04-30 00:51:32 +02:00
Folkert de Vries
4074088a5e
Merge pull request #2971 from rtfeldman/no-mono-exhaustiveness
...
No more exhaustiveness checking in mono, nor mono errors
2022-04-29 09:18:50 +02:00
Ayaz Hafiz
9dac9e4bc2
Coalesce
2022-04-28 20:34:03 -04:00
Folkert
99340e314c
remove clone of scope.ident_ids
2022-04-28 23:27:46 +02:00
Folkert
f17cf9d02b
remove var_store argument
2022-04-28 22:30:27 +02:00
Folkert
b1fe5659a4
cleanup
2022-04-28 21:19:27 +02:00
Folkert
992575051a
remove identids from Env
2022-04-28 21:11:08 +02:00
Folkert
7fb5b23fb0
move identids into Scope
2022-04-28 21:08:28 +02:00
Folkert
fb9d60226d
store `exposed_ident_ids in the scope itself
2022-04-28 20:30:02 +02:00
Folkert
5a613db7b6
use snapshots for inner scopes
2022-04-28 20:01:01 +02:00
Folkert
c31b796938
more types!
2022-04-26 20:10:29 +02:00
Ayaz
e736adaa24
Merge pull request #2952 from rtfeldman/ability-unused-method-reporting
...
Ability unused method reporting
2022-04-25 15:53:06 -04:00
Folkert
945305fc2b
take scope by-value now
2022-04-25 20:50:26 +02:00
Ayaz Hafiz
caf65ba2f8
Fix codegen of effect symbols
2022-04-25 10:59:42 -04:00
Ayaz Hafiz
23bbe0863b
Fix effect module
2022-04-25 10:59:41 -04:00
Folkert
9d17a075d9
halve the number of lookups into References
2022-04-20 20:22:52 +02:00
Folkert
b92c28b237
make calls private
2022-04-20 17:43:18 +02:00
Folkert
c531191e49
make value_lookups private
2022-04-20 17:34:08 +02:00
Folkert
e740bbe529
make some of References' fields private
2022-04-20 17:25:22 +02:00
Folkert
b59d33a1d5
refactor roc_collections
2022-04-19 23:00:05 +02:00
Folkert
7b81c59009
Merge branch 'vecset-references' into builtins-in-roc
2022-04-17 20:32:38 +02:00
Folkert
c47460d792
use VecSet in recursive alias correction
2022-04-17 20:27:47 +02:00
Folkert
304b7fd569
use VecSet for exposed_symbols
2022-04-17 20:23:29 +02:00
Folkert
39aa112fd5
more VecSet
2022-04-17 20:14:25 +02:00
Folkert
e112f6ad2c
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-16 21:01:51 +02:00
Folkert
86c86ab41e
stop inserting builtin implementations in all modules
2022-04-16 20:35:50 +02:00
Ayaz Hafiz
15a040ec87
Basic type inference and solving for abilities
...
Note that is still pretty limited. We only permit opaque types to
implement abilities, abilities cannot have type arguments, and also no
other functions may depend on abilities
2022-04-12 16:18:07 -04:00
Folkert
6ef443d1b0
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-10 19:14:00 +02:00
Folkert de Vries
7675e0232b
Merge pull request #2819 from rtfeldman/zero-arg-tag
...
Drop unused `arguments` field from `ZeroArgumentTag`
2022-04-10 15:18:03 +02:00
Folkert
c9b29c773f
simplify GeneratedInfo
2022-04-09 12:23:18 +02:00
Folkert
d2756919fd
treat Box.Box as a builtin opaque type
2022-04-09 12:04:12 +02:00
Folkert
e9f7427c67
fix some things in Num
2022-04-08 20:24:17 +02:00