Ayaz Hafiz
935a484c71
Fix compile error
2022-04-23 10:56:54 -04:00
Ayaz Hafiz
504c3f9b49
Delay add "is open" constraint until we know a type variable
2022-04-23 10:56:53 -04:00
Ayaz Hafiz
7b2b41869f
Add a way to view solved types of arbitrary expressions/patterns in a program
2022-04-23 10:56:53 -04:00
Ayaz Hafiz
ff5ae67094
Multi-specializations of able variables through function 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
Richard Feldman
93677001ba
Merge pull request #2888 from rtfeldman/divTrunc
...
rename divFloor to divTrunc
2022-04-19 21:57:49 -04:00
Ayaz
9343c6802a
Merge pull request #2890 from rtfeldman/i/2886
...
Solve all when branch pattern constraints before solving their bodies
2022-04-18 17:46:55 -04:00
Ayaz Hafiz
2856a38236
Solve all when branch pattern constraints before solving their bodies
...
Closes #2886
2022-04-18 11:03:25 -04:00
Kevin Gillette
6a3fd3a607
rename divFloor to divTrunc
2022-04-18 02:33:31 -06:00
Folkert
8692938fb3
Merge branch 'vecset-references' into builtins-in-roc
2022-04-17 19:39:03 +02:00
Richard Feldman
718b999751
Merge pull request #2857 from rtfeldman/abilities-mono
...
Codegen for abilities
2022-04-16 22:59:16 -04:00
Folkert
e112f6ad2c
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-16 21:01:51 +02:00
Sean Hagstrom
c67a1bb8d4
fix(repl) and fix(pretty_print): update pretty_print output for Num FloatingPoint *
to be Float *
instead of F64
2022-04-15 16:37:39 +01:00
Ayaz Hafiz
8f335c3278
Add solve test for aliasing ability
2022-04-14 17:25:44 -04:00
Ayaz Hafiz
8f906826fc
Include parent ability in specialization tests
2022-04-14 08:57:32 -04:00
Folkert
2b07b8c78d
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-13 21:45:40 +02: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
cf1a6691dd
Fix solve tests
2022-04-12 18:54:12 -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
Nikita Mounier
0f0e9bdf14
Fix test in solve_expr.rs
2022-04-12 12:12:29 +00:00
Richard Feldman
d81228df80
cargo fmt
2022-04-11 13:17:46 -04:00
Nikita Mounier
1df1b4bc84
Fix typo.
2022-04-11 12:34:23 +00: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
52b58ecdf3
don't write to (temp) file in solve tests
2022-04-10 16:22:35 +02:00
Folkert
9d966d439f
fix solve tests
2022-04-09 12:29:49 +02:00
Folkert
1d0f9e9192
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-04-08 15:47:11 +02:00
Richard Feldman
8322ed95ed
Merge pull request #2806 from rtfeldman/toF32
...
Num.toF32/toF64 for LLVM backend
2022-04-08 08:28:07 -04:00
Ayaz Hafiz
17b3c7d8ee
Generate type variables when there are lots
...
Closes #2797
2022-04-07 17:49:48 -04:00
Richard Feldman
cd00a98636
Add toF32/64 and checked versions
2022-04-07 16:13:57 -04:00
Richard Feldman
bd623d65bc
Formatting whitespace
2022-04-07 16:13:57 -04:00
Ayaz Hafiz
163c6b39d6
Unify type alias "real variables"
...
Turns out that we can't always assume that a successful unification of
type alias type variables means that those aliases had the same real
type from the start. Because type variables may contain unbound type
variables and grow during their unification (for example,
`[InvalidNumStr]a ~ [ListWasEmpty]b` unify to give `[InvalidNumStr,
ListWasEmpty]`), the real type may grow as well.
For this reason, continue to explicitly unify alias real types for now.
We can get away with not having to do so when the type variable
unification causes no changes to the unification tree at all, but we
don't have a great way to detect that right now (maybe snapshots?)
Closes #2583
2022-04-05 11:21:52 -04:00
Folkert
aefb536bc4
Merge branch 'add-load-internal' into builtins-in-roc
2022-03-23 17:35:49 +01:00
Folkert
311e464b70
add load_internal
2022-03-23 15:18:22 +01:00
Folkert
ac19213fa4
stop using builtins/std
2022-03-23 14:49:38 +01:00
Folkert
b4d677ae5f
Merge branch 'simplify-stdlib-use' into builtins-in-roc
2022-03-22 20:13:12 +01:00
Folkert
d8fa2b8d92
stop passing stdlib (use lazy_static)
2022-03-22 19:53:02 +01:00
Folkert
4e1197165b
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc-delayed-alias
2022-03-18 21:25:52 +01:00
ayazhafiz
5670fe06cd
Deal with destructuring tag unions behind opaques correctly
...
Closes #2702
2022-03-13 18:44:38 -05:00
Folkert
e3e9215578
Merge remote-tracking branch 'origin/trunk' into type-checking-storage-subs
2022-03-12 14:10:43 +01:00
Folkert
01b810266b
test cleanup
2022-03-11 22:15:36 +01:00
Brendan Hansknecht
d681062c63
add Num.toNat
2022-03-11 11:17:42 -08:00
Folkert
831a90e310
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-03-08 22:36:06 +01:00
ayazhafiz
47e4904075
Chase aliases when checking for valid extension types
2022-03-06 22:17:58 -05:00
ayazhafiz
3bff99b0a2
Register accessor closures when they are bound
...
Previously we only registered record accessor closures in anonymous
contexts, where we assume they must already be specialized based on the
surrounding contexts. This is not true in general since one might bind
an accessor to a name.
Closes #2567
2022-03-06 10:53:12 -05:00
Folkert
adf4ad22a5
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-03-05 20:55:15 +01:00
Folkert
80956061dd
fix formatting bug in type pretty-print
2022-03-05 15:03:59 +01:00
Folkert
6370a80c62
make sure lambda sets within aliases are in IntroducedVariables
2022-03-05 14:29:34 +01:00