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
Ayaz Hafiz
0792ccbbe8
Calling ability with non-specialized type is an error
2022-04-13 11:49:33 -04:00
Ayaz Hafiz
d110fbde6c
Annotation specializes ability
2022-04-13 10:44:34 -04:00
Ayaz Hafiz
25b3aa7ca7
Typed body specializations solve
2022-04-13 10:42:46 -04:00
Ayaz Hafiz
389c46edcf
Remove unneeded var
2022-04-13 10:12:45 -04:00
Ayaz Hafiz
5e1ab8225e
Report when ability member binds >1 variable to parent
2022-04-13 10:11:24 -04:00
Kevin Gillette
2c4a83788c
Rename internal NUM_DIV_INT references to NUM_DIV_FLOOR.
...
This balances with NUM_DIV_CEIL
(which is another form of integer division).
2022-04-13 02:48:57 -06:00
Ayaz Hafiz
0336b6ad27
Clippy
2022-04-12 19:02:58 -04:00
Ayaz Hafiz
127d435ff2
Report incomplete ability implementations
2022-04-12 18:26:19 -04:00
Ayaz Hafiz
cbbbb8c855
Remove stray dbg
s
2022-04-12 16:32:50 -04:00
Ayaz Hafiz
64b559073d
Clippy
2022-04-12 16:18:07 -04: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
Ayaz Hafiz
7536d48a22
Remove unused function
2022-04-12 16:18:06 -04:00
Nikita Mounier
8206f345c7
Merge remote-tracking branch 'origin/trunk' into div-no-result
2022-04-11 11:45:06 +00:00
Nikita Mounier
4ecf2a8c24
Modify division behaviour to panic when dividing by 0, and add divChecked
, divFloorChecked and
divCeilingChecked` for safe alternatives which return a Result, mimicking the previous behaviour.
2022-04-11 11:23:33 +00: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
a4c8ebd55e
fix can tests; qualify imports from num
2022-04-09 14:41:45 +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
a7c87af065
typo
2022-04-09 11:39:57 +02:00
Folkert
e9f7427c67
fix some things in Num
2022-04-08 20:24:17 +02:00
Ayaz
69ed0b755a
Merge pull request #2804 from rtfeldman/abilities-canonicalization
...
Basic canonicalization, error checking for abilities
2022-04-08 12:00:23 -04:00
Richard Feldman
b777b88e1c
Drop unused arguments
field from ZeroArgumentTag
2022-04-08 11:53:16 -04:00
Folkert
1d0f9e9192
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-08 15:47:11 +02:00
ayazhafiz
94a5cd3559
Improve shadow errors
2022-04-07 22:38:20 -04:00
ayazhafiz
02e1a98cac
Remove redundant member
2022-04-07 22:19:30 -04:00
ayazhafiz
304a32ef0a
Typo
2022-04-07 20:51:21 -04:00
Ayaz Hafiz
1ca3dad1e2
Allow complicated return type
2022-04-07 17:21:17 -04:00
Ayaz Hafiz
73bfff699f
Handle symbols that shadow ability member definitions
...
Just add the shadowing symbol for now. We'll handle checking that a
specialization's type matches the member's type definition in a later
pass, during typechecking.
2022-04-07 17:21:17 -04:00
Ayaz Hafiz
884d07344e
Clippy
2022-04-07 17:21:17 -04:00
Ayaz Hafiz
66ec1b4a84
Basic canonicalization and error checking for abilities
2022-04-07 17:21:17 -04:00
Richard Feldman
a4233ad661
Add LLVM implementation for toF32/64
2022-04-07 16:13:58 -04:00
Richard Feldman
cd00a98636
Add toF32/64 and checked versions
2022-04-07 16:13:57 -04:00
Ayaz Hafiz
d3b848fa46
Clippy
2022-04-06 22:24:14 -04:00
Ayaz Hafiz
a3ac68a41f
Split up Defs into TypeDef and ValueDef
...
Just a refactoring PR. This is useful because during canonicalization
we always process type defs first, then value defs. With abilities this
distinction continues to grow; in that case, we have patterns associated
with types that we want to process before patterns from values.
2022-04-06 22:18:57 -04:00
Ayaz Hafiz
9fbc525d02
Make sure float suffixes are parsed out after can
...
Before we hit mono, we need to make sure the suffixes of numeric
literals are parsed out from the literal string, so that we don't try to
parse something whose type we already know but has the extraneous
suffix.
Co'ed with @tagraves
2022-04-05 11:32:34 -04:00
Folkert
0dd2cec09a
update with new clippy lints
2022-03-31 19:34:51 +02:00
Folkert
877b9eab7a
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-03-23 17:33:58 +01:00
Richard Feldman
cce590dee5
Merge pull request #2761 from rtfeldman/simplify-unused-defs
...
Remove unneeded work in canonicalization
2022-03-23 10:10:05 -04:00
Richard Feldman
750fbf2dcf
Merge pull request #2766 from rtfeldman/simplify-identids
...
simplify IdentIds
2022-03-22 20:23:56 -04:00
Folkert
615aaa9a77
remove unused number min/max functions
2022-03-22 23:12:50 +01:00