Folkert
439befcc38
run cargo fmt
2022-12-23 17:19:54 +01:00
Lunarmagpie
f932bb66a0
Add function binding to error message
2022-12-23 11:07:57 -05:00
Lunarmagpie
3265a786a5
make changes suggested by folkertdev
2022-12-23 11:01:50 -05:00
Lunarmagpie
db9c00ec1e
update docs to better explain -> operator
2022-12-22 21:00:58 -05:00
Richard Feldman
e84b3c2704
Merge pull request #4781 from roc-lang/dbg-final-expression
...
parse error for dbg/expect final expressions
2022-12-19 23:36:51 -05:00
Folkert
d97fd98a33
parse error for dbg/expect final expressions
2022-12-16 22:47:53 +01:00
Richard Feldman
3227f95d45
Merge branch 'refactor-platform-info' into packages
2022-12-11 06:17:29 -05:00
Brendan Hansknecht
d81be27be0
update call to List.range in reporting test
2022-12-04 20:19:02 -08:00
Richard Feldman
da595a86b0
Parse package module header
2022-12-04 06:26:44 -05:00
Ayaz Hafiz
705ce10085
New problem dropped
2022-12-02 14:14:18 -06:00
Ayaz Hafiz
66419e8f29
The yeah yeah yeahs
2022-12-02 14:11:58 -06:00
Ayaz Hafiz
c351be3230
Import in test reporting
2022-12-02 14:11:58 -06:00
Ayaz Hafiz
39f89e3d65
Get severity from type problem variants
2022-12-02 14:11:58 -06:00
Ayaz Hafiz
e438fbf37c
Enumerate severity on problem variants
2022-12-02 14:11:57 -06:00
Ayaz Hafiz
0a807dc43e
Provide warning for defs that are used only in (mutual) recursion
...
This patch provides errors for defs that are used only in
possibly-mutual recursion, and are not reachable outside of their
recursive closures. For example:
```
test_report!(
mutual_recursion_not_reached_nested,
indoc!(
r#"
app "test" provides [main] to "./platform"
main =
f = \{} -> if Bool.true then "" else g {}
g = \{} -> if Bool.true then "" else f {}
""
"#
),
@r###"
── DEFINITIONs ONLY USED IN RECURSION ──────────────────── /code/proj/Main.roc ─
These 2 definitions are only used in mutual recursion with themselves:
4│> f = \{} -> if Bool.true then "" else g {}
5│> g = \{} -> if Bool.true then "" else f {}
If you don't intend to use or export any of them, they should all be
removed!
"###
);
```
2022-12-02 11:50:12 -06:00
Ayaz Hafiz
3605008fce
Update tests to check eq unbound float is resolved to dec
2022-12-01 11:41:42 -06:00
Ayaz Hafiz
590535a42b
Obligation checking Eq for floating point types may never succeed
2022-12-01 10:02:37 -06:00
Ayaz Hafiz
0bae0aafb6
Unify ranged numbers with flex able, modulo obligation checking
...
Closes #4594
2022-12-01 09:50:29 -06:00
Richard Feldman
c1a75a57f1
Merge pull request #4592 from roc-lang/collections_refactor
...
Refactor collection_trailing_sep_e
2022-11-28 11:14:30 -05:00
Joshua Warner
a3071a8aea
Allow migrating reporting tests to failing parse tests
2022-11-26 17:34:50 -08:00
Joshua Warner
451b2c0ded
Refactor collections
2022-11-26 09:55:54 -08:00
Richard Feldman
b2beeb770e
Merge remote-tracking branch 'origin/main' into https-packages
2022-11-25 19:50:06 -05:00
Ayaz Hafiz
8bb015bb0f
End the string
2022-11-25 16:43:09 -06:00
Ayaz
15e372373a
Merge branch 'main' into underivable-rigid-better-error
...
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-11-25 16:33:57 -06:00
Richard Feldman
58fad36f9d
Merge pull request #4460 from roc-lang/crash
...
Crash
2022-11-25 17:18:21 -05:00
Folkert
165db8c885
make line and column numbers the same as editor (i.e. 1-based)
2022-11-25 17:55:27 +01:00
Richard Feldman
bef59299a2
Merge remote-tracking branch 'origin/main' into https-packages
2022-11-25 04:07:37 -05:00
Richard Feldman
5d4fa4eff1
clippy
2022-11-24 21:34:02 -05:00
Richard Feldman
54da1b1e3b
Print a newline at the end of dbg output
2022-11-24 20:39:04 -05:00
Richard Feldman
c63baa2ede
Print dbg output in blue in terminal
2022-11-24 20:38:52 -05:00
Richard Feldman
99f55d6ed6
Merge remote-tracking branch 'origin/main' into https-packages
2022-11-24 19:14:31 -05: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
848c18f996
Merge pull request #4567 from joshuawarner32/tuple-type-annotation
...
Implement tuple type parsing
2022-11-24 14:42:11 -06:00
Richard Feldman
b9b03d432a
Merge remote-tracking branch 'origin/main' into https-packages
2022-11-24 13:14:36 -05:00
Richard Feldman
ed0c64ca7c
Fix reporting tests
2022-11-24 11:54:51 -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
Ayaz Hafiz
f8d51473d8
Report builtins type errors during load building as appropriate
2022-11-24 10:05:25 -05:00
Richard Feldman
f5cb2d73a1
Merge branch 'precompiled-legacy' into https-packages
2022-11-24 04:29:56 -05:00
Ayaz Hafiz
7c3a0807c2
Suggest binding type variables to an ability when they're unsatisfied
2022-11-23 16:37:50 -06: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 Hafiz
03e6d6d7e0
Report builtins type errors during load building as appropriate
2022-11-22 10:36:41 -06:00
Richard Feldman
721841fa1f
Provide roc_cache_dir everywhere
2022-11-20 19:53:48 -05: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