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
5f19410de6
Merge branch 'simplify-unused-defs' into builtins-in-roc
2022-03-21 23:45:09 +01:00
Folkert
38c2710fc5
intern common tag names
2022-03-20 15:30:47 +01:00
Folkert
6a9b08ed11
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc
2022-03-20 13:01:00 +01:00
hafiz
3f07afe3b5
Merge pull request #2750 from rtfeldman/delay-instantiating-aliases-fix-limitations
...
Delay instantiating aliases fix limitations
2022-03-19 20:41:14 -04:00
hafiz
418e71e95c
Merge pull request #2755 from rtfeldman/dense-let-constraints
...
Constraint gen tweaks
2022-03-19 20:39:55 -04:00
Folkert
7f92de69ab
some comments
2022-03-19 23:44:28 +01:00
Folkert
55d9dc745c
track if an alias is exposed
2022-03-19 17:10:29 +01:00
Richard Feldman
5f2054aeb6
Merge pull request #2754 from rtfeldman/remove-type-solvedtype-conversion
...
Remove Type/Subs -> SolvedType conversion
2022-03-19 10:48:42 -04:00
Folkert
5a15a121ff
remove Content -> SolvedType conversion
2022-03-19 12:26:21 +01:00
Folkert
21a51464f3
various small type-related changes
2022-03-18 22:35:12 +01:00
Folkert
4e1197165b
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc-delayed-alias
2022-03-18 21:25:52 +01:00
Folkert
a3b00fbf55
Merge branch 'explicit-closed-tag-record' into delay-instantiating-aliases
2022-03-17 20:34:52 +01:00
Folkert
f8a73e0baa
use unreachable!
2022-03-17 19:50:16 +01:00
Folkert
426bfe3ff1
implement solve crate
2022-03-17 19:31:54 +01:00
Folkert
c5fb4f2e47
rewrite and fix builtin alias instantiation
2022-03-16 22:10:04 +01:00
Folkert
7fd420bb95
optimize instantiation of builtins
2022-03-16 21:15:54 +01:00
Folkert
ad6fd18b05
optimizations for known aliases and identity substitutions
2022-03-16 18:33:53 +01:00
Folkert
b3dce7317d
hook up aliases
2022-03-15 22:23:40 +01:00
Folkert
7d8409f6a6
write Aliases implementation
2022-03-15 22:02:04 +01:00
Folkert
9059e09dca
thread through Aliases
2022-03-14 21:20:35 +01:00
Folkert
f9bd46ecb8
fake implementation of type_to_var for DelayedAlias
2022-03-14 20:22:38 +01:00
Folkert
00f3eaf2a1
thread through DelayedAlias
2022-03-14 19:47:19 +01:00
ayazhafiz
5670fe06cd
Deal with destructuring tag unions behind opaques correctly
...
Closes #2702
2022-03-13 18:44:38 -05:00
Folkert
15ac77567a
make rigid variable introducion more obvious
2022-03-13 18:27:42 +01:00
Folkert
523032c6c9
more comments
2022-03-13 14:05:53 +01:00
Folkert
ed247c9da3
Merge remote-tracking branch 'origin/trunk' into type-checking-storage-subs
2022-03-13 13:43:00 +01:00
Folkert
eccb461b01
get fancy, store variable directly in the index
2022-03-13 01:59:28 +01:00
Folkert
b3d9f9c2de
use EitherIndex<Type, Variable> to halve number of types stored
2022-03-13 01:46:49 +01:00
Folkert
da03b0c2b3
add either_type_index_to_var
2022-03-13 01:45:23 +01:00
Folkert
e3e9215578
Merge remote-tracking branch 'origin/trunk' into type-checking-storage-subs
2022-03-12 14:10:43 +01:00
Folkert
6bb8bcb5a2
cleanup
2022-03-12 14:02:34 +01:00
Folkert
d9c3a7ddd9
get rid of unneeded field on SolvedModule
2022-03-12 14:00:51 +01:00
Folkert
c64f768abe
more comments
2022-03-12 13:52:13 +01:00
Folkert
01b810266b
test cleanup
2022-03-11 22:15:36 +01:00
Folkert
364bc81dc4
stop making solved types for non-builtins
2022-03-11 21:08:24 +01:00
Brendan Hansknecht
d681062c63
add Num.toNat
2022-03-11 11:17:42 -08:00
Folkert
30e7d94c95
clarify old constraint gen is now just for the builtins
2022-03-11 19:25:42 +01:00
Folkert
aebb3a162e
it's alive!
2022-03-11 17:27:44 +01:00