Commit Graph

251 Commits

Author SHA1 Message Date
Ayaz Hafiz
f8d51473d8
Report builtins type errors during load building as appropriate 2022-11-24 10:05:25 -05: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
Ayaz
1a3119e4c5
Merge pull request #4525 from roc-lang/fix-fixpoints-2
Implement fixpoint-fixing and unconditionally emplace variables into type indices
2022-11-19 17:47:02 -06:00
Joshua Warner
2d9aba2242
Refactor parser methods to not return State as part of ParseError
As previously discovered with #4464, it's easy to accidentally mis-use the State value returned on the Err path.

There were mixed assumptions about what that State represents: (1) the State where the error occurred, or (2) the State at the beginning of the thing we were just parsing.

I fixed this up to always mean (2) - at which point we don't actually need to return the State at all - so it's impossible for further discrepency to creep in.

I also took the liberty to refactor a few more methods to be purely combinator-based, rather than calling `parse` directly.
2022-11-18 19:52:23 -05:00
Richard Feldman
a8ee5b7cbf
Merge pull request #4537 from roc-lang/output-tweaks
Reporting tweaks
2022-11-17 08:28:57 -05:00
Richard Feldman
6c4e2c8738
Revise wording on unnecessary wildcard warning
My concern with the previous wording is that:
- Beginners will be confused by "these are always open"
- Users advanced enough to understand what that actually means won't benefit from seeing it in this warning message!
2022-11-16 23:18:51 -05:00
Richard Feldman
2f54e46909
Add a blank line after failed inline expectations 2022-11-16 23:11:05 -05:00
Richard Feldman
1e4cf52fd4
Merge pull request #4504 from roc-lang/fix-styles
Fix some web styles
2022-11-16 21:53:05 -05:00
Ayaz Hafiz
fe0eacb70a
Propogate only_unseen phanton type count check 2022-11-16 19:46:54 -06:00
Ayaz Hafiz
28768bcfba
Fix order of alias arg discovery 2022-11-16 14:05:53 -06:00
Ayaz Hafiz
cc677917a7
Fix typo 2022-11-16 14:05:53 -06:00
Ayaz Hafiz
216a786d52
Make sure to count generated phantom type variables in error type 2022-11-16 14:05:53 -06:00
Ayaz Hafiz
2a5864c19a
Update reporting tests 2022-11-16 14:05:52 -06:00
Folkert de Vries
de472015f6
Merge pull request #4505 from roc-lang/fix-web-repl-palette
Fix web REPL error formatting by routing the active Palette everywhere
2022-11-15 15:49:37 +01:00
Joshua Warner
ca5d084497
Implement tuple pattern parsing
Step 2 of N in implementing #4465
2022-11-13 16:11:57 -05:00
Folkert
662bf1de99
more workspace dependencies 2022-11-13 16:10:02 +01:00
Brian Carroll
ed048c7c93
Fix more tests 2022-11-12 09:12:28 +00:00
Ayaz Hafiz
bd9c9cc184
Replace busted gen test with reporting test 2022-11-11 21:16:26 -06:00
Ayaz Hafiz
ae6f349669
Update reporting test 2022-11-11 21:16:26 -06:00
Ayaz Hafiz
f1180a1549
Byte deletion party 2022-11-11 21:16:23 -06:00
Ayaz Hafiz
a2e90c3709
Fix types SoA usage in solve 2022-11-11 21:16:23 -06:00
Ayaz Hafiz
e3ef9828c7
Store solve aliases as TypeTag 2022-11-11 21:16:05 -06:00
Ayaz Hafiz
314b75b0e5
Feed SoA Types from load into solve 2022-11-11 21:16:03 -06:00
Richard Feldman
83e4eef475
Merge pull request #4492 from joshuawarner32/tuple-syntax-1
Implement initial tuple syntax
2022-11-11 17:55:25 -08:00
Brian Carroll
b64514d7e4
Fix web REPL error formatting by routing the active Palette everywhere 2022-11-11 23:38:08 +00:00
Richard Feldman
1478cfc3ad
Don't use style attributes for web repl colors
This doesn't work because of our content-security policy!
2022-11-11 12:24:43 -05:00
Joshua Warner
1753c9cf5b
Implement initial tuple syntax 2022-11-08 18:04:46 -05:00
Ayaz Hafiz
28c3709ddf
Miscellaneous cleanup 2022-11-08 14:11:26 -06:00
Ayaz Hafiz
8dfc9c0367
Inline BadType::BadTypeArguments in canonicalization errors 2022-11-08 14:11:25 -06:00
Ayaz Hafiz
98464984dd
Remove type problem bad type 2022-11-08 14:11:25 -06:00
Ayaz Hafiz
09748aec48
Remove problems from error type API surface 2022-11-08 14:11:25 -06:00
Ayaz Hafiz
c9953129cb
Remove problem storage in Type::Erroneous 2022-11-08 14:11:24 -06:00
Ayaz
8179e29bf8
Merge pull request #4486 from roc-lang/more-prep-constraining
Lift constraining expectation indices up a level
2022-11-08 13:47:57 -06:00
Ayaz Hafiz
4e2eb67ff1
Surface constrain_expr takes an index 2022-11-08 09:00:50 -06:00
Anton-4
a6a2b59a79
Merge branch 'main' of github.com:lukewilliamboswell/roc into rust-docs 2022-11-08 15:57:24 +01:00
Luke Boswell
2c2a70b8e7 Merge remote-tracking branch 'upstream/main' into rust-docs 2022-11-06 09:15:57 +11:00
Joshua Warner
5d5b71a083
Refactor several parse methods to use more combinators 2022-11-05 09:44:08 -04:00
Richard Feldman
2110540a53
Merge pull request #4464 from joshuawarner32/fix-one_of
Fix one_of bug, properly return MadeProgress from "when" parsing
2022-11-03 19:25:36 -07:00
Joshua Warner
311193fe70
Fix one_of error state handling 2022-11-03 20:54:08 -04:00
Luke Boswell
f3bdb5f321
updating rust package documentation 2022-11-03 20:00:06 +11:00
Ayaz Hafiz
2a4fca7034
First pass at expectations taking a type index 2022-11-02 15:05:22 -05:00
Ayaz Hafiz
666f0f8a52
Simplify constructor recovery
This fixes a bug in the list pattern matching code that caused crashes
in the presence of list guards, and simplifies the pattern splitting
algorithm to avoid complexity and allocations. Previously we would place
arguments-to-be-matched of constructors and lists at the front of
specialized rows for exhaustiveness checking, but at the back for
redundancy checking. Now, we always place them at the back - this avoids
needless allocation, and is not any worse, since we can still recover
the non-exhaustive witnesses by looking at the end of a list, instead of
the front.
2022-11-01 17:47:22 -05:00
Ayaz Hafiz
1d73560182
Add some more tests 2022-11-01 12:16:11 -05:00
Ayaz Hafiz
342f9f2e02
Add correct redundancy checking and tests for list patterns 2022-11-01 12:07:00 -05:00
Ayaz Hafiz
17920911e4
Implement list exhaustiveness checking 2022-11-01 12:07:00 -05:00
Ayaz Hafiz
62edf9547e
Better printing of list patterns 2022-11-01 12:07:00 -05:00
Ayaz Hafiz
08d04e8c79
Update reporting tests 2022-11-01 12:06:59 -05:00
Ayaz Hafiz
92a3c48ce5
Implement sketching and pattern specialization for list patterns 2022-11-01 12:06:59 -05:00