Ayaz Hafiz
2b49aee3d2
Pull out string literal creation
2022-11-24 14:46:51 -06:00
Ayaz Hafiz
d7db10d7b5
Check in panic_utils.zig
2022-11-24 14:46:50 -06:00
Ayaz Hafiz
4709f9a0de
roc_panic is passed a RocStr
2022-11-24 14:46:50 -06:00
Ayaz Hafiz
a9f8c2ddec
Factor out build_string_literal
2022-11-24 14:46:50 -06:00
Ayaz Hafiz
f29b85e244
Update builtins to use RocStr as panic type
2022-11-24 14:46:50 -06:00
Ayaz Hafiz
25693f8ffe
Fix constraining
2022-11-24 14:46:50 -06:00
Ayaz Hafiz
e2b30e5301
Constrain + solve crash
2022-11-24 14:46:50 -06:00
Ayaz Hafiz
9dc489c2b0
First pass constraining crash
2022-11-24 14:46:49 -06:00
Ayaz Hafiz
ee5eacc3e4
Support crash in derive tests
2022-11-24 14:46:49 -06:00
Ayaz Hafiz
dd05d813a9
Canonicalize crash
2022-11-24 14:46:49 -06:00
Ayaz Hafiz
1011ce9fba
Format crash
2022-11-24 14:46:49 -06:00
Ayaz Hafiz
fee01166c7
Add crash as a keyword
2022-11-24 14:46:49 -06:00
Ayaz
848c18f996
Merge pull request #4567 from joshuawarner32/tuple-type-annotation
...
Implement tuple type parsing
2022-11-24 14:42:11 -06:00
Richard Feldman
ac2d50aea9
Merge pull request #4542 from roc-lang/precompiled-legacy
...
Precompiled legacy linking
2022-11-24 13:13:48 -05:00
Joshua Warner
c6b5273144
Implement tuple type parsing
...
Also change some tests with newly relaxed indentation requirements, and remove an irrelevant test (since unindented close parens are now perfectly valid, the test is no longer useful).
2022-11-24 07:36:59 -08:00
Joshua Warner
a6a90178ce
Refactor record_type to use combinators
2022-11-24 07:36:44 -08:00
Ayaz Hafiz
2ed2d88881
Do not run occurs checks when printing type variables
...
This is a hack. Let's find and correct these problems earlier in the
compiler.
2022-11-24 10:05:28 -05:00
Ayaz Hafiz
be047f4b4a
Debug Work
2022-11-24 10:05:28 -05:00
Ayaz Hafiz
b4216a26a5
Force occurs check for introduced types after checking annotated bodies
...
The current type inference scheme is such that we first introduce the
types for annotation functions, then check their bodies without
additional re-generalization. As part of generalization, we also perform
occurs checks to fix-up recursive tag unions.
However, type annotations can contain type inference variables that are
neither part of the generalization scheme, nor are re-generalized later
on, and in fact end up forming a closure of a recursive type. If we do
not catch and break such closures into recursive types, things go bad
soon after in later stages of the compiler.
To deal with this, re-introduce the values of recursive values after we
check their definitions, forcing an occurs check. This introduction is
benign because we already generalized appropriate type variables anyway.
Though, the introduction is somewhat unnecessary, and I have ideas on
how to make all of this simpler and more performant. That will come in
the future.
2022-11-24 10:05:28 -05:00
Richard Feldman
4958647663
Fix a missing to_str() on Windows
2022-11-24 10:05:28 -05:00
Richard Feldman
96d3ab99e5
Fix a regression in a macOS workaround
2022-11-24 10:05:28 -05:00
Richard Feldman
f1021ffd45
Fix a missing .to_str()
2022-11-24 10:05:28 -05:00
Richard Feldman
a38532ea4b
Update error message
2022-11-24 10:05:27 -05:00
Richard Feldman
69a7c3ea15
Centralize host tempfile builder logic
2022-11-24 10:05:27 -05:00
Richard Feldman
4b64f8c9e9
Make sure tempfiles don't get dropped too early
2022-11-24 10:05:27 -05:00
Richard Feldman
8ce3069a74
Avoid an unused variable warning
2022-11-24 10:05:27 -05:00
Richard Feldman
30d72d0bc7
Give tempfiles the file extensions Zig expects
2022-11-24 10:05:27 -05:00
Richard Feldman
806e3e2ac7
Missed a couple of .to_str().unwrap()s
2022-11-24 10:05:27 -05:00
Richard Feldman
3d6b383a4e
Only reference native host binaries (for now)
2022-11-24 10:05:26 -05:00
Richard Feldman
b7b5de76ed
Use tempfile::NamedTempFile in more places
2022-11-24 10:05:26 -05:00
Richard Feldman
4ae7b391d5
Drop obsolete .gitignore entries
2022-11-24 10:05:26 -05:00
Richard Feldman
1679c62a0a
Use include_bytes! so builtin hosts live in binary
2022-11-24 10:05:26 -05:00
Ayaz Hafiz
7865075f76
Mark mono test
2022-11-24 10:05:26 -05:00
Ayaz Hafiz
9dbc2224fb
Fix imports
2022-11-24 10:05:25 -05:00
Ayaz Hafiz
5efdecafc9
Constrain flex inference variables without re-generalization
...
When constraining a recursive function like
```
f : _ -> {}
f : \_ -> f {}
```
our first step is to solve the value type of `f` relative to its
annotation. We have to be careful that the inference variable in the
signature of `f` is not generalized until after the body of `f` is
solved. Otherwise, we end up admitting polymorphic recursion.
2022-11-24 10:05:25 -05:00
Ayaz Hafiz
f8d51473d8
Report builtins type errors during load building as appropriate
2022-11-24 10:05:25 -05:00
Folkert
5cb47939e2
don't try to run dbg with roc run
2022-11-24 11:19:41 +01:00
Richard Feldman
adddc1ff70
Fix dbg parse test
2022-11-24 03:31:19 -05:00
Richard Feldman
28bccb792f
Merge remote-tracking branch 'origin/main' into precompiled-legacy
2022-11-24 02:20:50 -05:00
Folkert
51c018b03c
fix compile error in tests
2022-11-23 23:24:53 +01:00
Folkert
1875176319
improve formatting
2022-11-23 23:16:37 +01:00
Folkert
e44a8a9eed
print all the relevant info
2022-11-23 22:58:58 +01:00
Folkert
e7f3c6f281
inline dbg
2022-11-23 21:23:28 +01:00
Folkert
dcb530d3af
Revert "toplevel debug"
...
This reverts commit 5ea8d96f3e
.
2022-11-23 20:29:55 +01:00
Folkert
5ea8d96f3e
toplevel debug
2022-11-23 20:29:45 +01:00
Folkert de Vries
df7f57e4a3
Merge pull request #4563 from roc-lang/fix-recursion-checks-of-inferred-vars
...
Force occurs check for introduced types after checking annotated bodies
2022-11-23 13:02:50 +01:00
Folkert de Vries
099ab4938f
Merge pull request #4565 from roc-lang/more-standalone
...
Use include_bytes! so builtin hosts live in binary
2022-11-23 13:01:39 +01:00
Richard Feldman
04e3ac37f4
Fix wasm host_dest name generation
2022-11-23 00:06:43 -05:00
Richard Feldman
c0b065b51a
Fix a couple of preprocessed host bugs
2022-11-22 23:38:07 -05:00
Richard Feldman
d9f3e11634
Add wasm32 support to preprocessed_host_filename
2022-11-22 23:02:12 -05:00