Folkert de Vries
2cc8e95198
Merge pull request #2901 from rtfeldman/vec-map
...
VecMap
2022-04-21 09:16:38 +02:00
Richard Feldman
058bfdb8d0
Improve perf of finding type new type variables
2022-04-20 21:39:09 -04:00
Folkert
35b560f14d
remove debug code
2022-04-21 00:47:55 +02:00
Ayaz Hafiz
4bbc1d3a2b
Clippy
2022-04-20 17:46:19 -04:00
Ayaz Hafiz
80dc50763e
Using abilities as types is illegal, but we can still compile them
...
Closes #2881
2022-04-20 17:46:18 -04:00
Ayaz Hafiz
0387eeed23
Make sure we're generating correct code with has annotations
2022-04-20 17:45:41 -04:00
Ayaz Hafiz
b9f79fdd31
Able variables through different functions compile
2022-04-20 17:43:17 -04:00
Ayaz Hafiz
a07323fb40
Typecheck annotations with able variables outside ability members
2022-04-20 17:43:16 -04:00
Folkert
e87ca7e4b7
create and union fewer Output's
2022-04-20 21:20:59 +02:00
Folkert
9d17a075d9
halve the number of lookups into References
2022-04-20 20:22:52 +02:00
Folkert
b557929276
compact References into just two allocations
2022-04-20 20:22:02 +02:00
Folkert
19dce40cd1
fix formatting
2022-04-20 18:11:44 +02:00
Folkert
ec43d7d770
clippy
2022-04-20 18:05:06 +02:00
Folkert
0267963e14
stop using referenced_type_defs
2022-04-20 18:02:11 +02:00
Folkert
b92c28b237
make calls private
2022-04-20 17:43:18 +02:00
Folkert
ab8ac2edad
make bound_symbols private
2022-04-20 17:39:19 +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
8b144c446d
remove PartialEq for a bunch of types that we should not compare
2022-04-20 16:58:30 +02:00
Folkert de Vries
30731da716
Merge pull request #2892 from rtfeldman/i/2878
...
Explicitly disallow ability definitions in nested scopes
2022-04-20 14:51:21 +02:00
Richard Feldman
082fde976a
Merge branch 'trunk' into sqrt-unchecked
2022-04-20 08:19:34 -04:00
Richard Feldman
93677001ba
Merge pull request #2888 from rtfeldman/divTrunc
...
rename divFloor to divTrunc
2022-04-19 21:57:49 -04:00
Folkert
b59d33a1d5
refactor roc_collections
2022-04-19 23:00:05 +02:00
Ayaz
5188f8f7df
Merge branch 'trunk' into i/2878
2022-04-18 21:46:23 -04:00
Kevin Gillette
cd8ab753e3
remove %% operator
2022-04-18 19:15:14 -06:00
Kevin Gillette
d236c28743
Merge branch 'trunk' into sqrt-unchecked
2022-04-18 19:12:22 -06:00
Ayaz Hafiz
f129777115
Explicitly disallow ability definitions in nested scopes
...
Abilities can only be defined on the toplevel of a module. There is a
technical reason to this, which is that during type solving we must
introduce all abilities at the very beginning, and we need to make sure
ranks are correct. But there is a practical reason as well, which is
that nested ability definitions don't seem to be very useful.
Note that specializations can be nested, and are allowed to be. Also, we
can revisit this in the future. I just don't want experiments to break
right now because someone uses an ability in a nested scope where we
don't expect.
Closes #2878
2022-04-18 18:04:46 -04:00
Kevin Gillette
9ed4ca9739
remove Num.mod and Num.modUnchecked
2022-04-18 13:54:40 -06:00
Kevin Gillette
6a3fd3a607
rename divFloor to divTrunc
2022-04-18 02:33:31 -06:00
Kevin Gillette
1908ff41c3
rem, sqrt, log are unchecked but have checked variants
...
mod exists but is not implemented due to lack of hardware support
(emulation, possibly in terms of rem, is needed).
2022-04-17 14:40:39 -06:00
Folkert
7f3ca4458a
use VecSet in IntroducedVariables
2022-04-17 20:50:41 +02:00
Folkert
a1a7feca45
use VecSet in IntroducedVariables
2022-04-17 20:43:45 +02:00
Folkert
7b81c59009
Merge branch 'vecset-references' into builtins-in-roc
2022-04-17 20:32:38 +02:00
Folkert
d53a888540
Revert "use Vec instead of MutSet for references in can_ann"
...
This reverts commit d0b2cde1f4
.
2022-04-17 20:32:20 +02:00
Folkert
9f453a7ba2
use vecset for non_closures
2022-04-17 20:30:32 +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
f772c87c4b
more VecSet use, in canonical Env this time
2022-04-17 20:08:06 +02:00
Folkert
be1aff390c
use VecSet in canonicalizing annotations
2022-04-17 20:06:07 +02:00
Folkert
8692938fb3
Merge branch 'vecset-references' into builtins-in-roc
2022-04-17 19:39:03 +02:00
Folkert
dda4f46e67
use VecSet in References
2022-04-17 19:37:10 +02:00
Folkert
d0b2cde1f4
use Vec instead of MutSet for references in can_ann
2022-04-17 19:13:58 +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
6b4294307f
Start saving ability signature on designated variable again
2022-04-14 16:22:54 -04:00
Ayaz
6472e32173
Merge pull request #2842 from rtfeldman/abilities-typechecking2
...
Additional checking and reporting for abilities, behind #2838
2022-04-14 08:44:57 -04:00
Richard Feldman
4ea4aa4708
Merge pull request #2838 from rtfeldman/abilities-typechecking
...
Inference and checking for abilities
2022-04-13 22:03:44 -04:00
Folkert
2b07b8c78d
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-13 21:45:40 +02:00
Ayaz Hafiz
8eec930260
More and smarter checking and error reporting for abilities
2022-04-13 15:25:19 -04:00