Commit graph

14474 commits

Author SHA1 Message Date
Folkert de Vries
fc446d307d changes after code review 2019-11-18 14:55:03 +01:00
Folkert de Vries
1fba0ba879
add note about cargo update 2019-11-18 14:44:10 +01:00
Richard Feldman
7f66c4a10b
Merge pull request #8 from rtfeldman/parse-block-string
Parse BlockString
2019-11-17 17:39:13 -05:00
Richard Feldman
50a6817bea
Merge pull request #11 from rtfeldman/fix-underscore-arg
Fix underscore argument parsing
2019-11-17 06:09:49 -05:00
Richard Feldman
b46bd68c24 Add a clarifying comment. 2019-11-16 22:39:37 -05:00
Richard Feldman
942cf8b781 Require space between function argument patterns. 2019-11-16 22:39:31 -05:00
Richard Feldman
60ee53080a Reproduce malformed argument bug 2019-11-16 22:39:25 -05:00
Richard Feldman
1e8423a368
Merge pull request #2 from rtfeldman/fix-identity
Generate type var names when pretty printing
2019-11-16 22:38:27 -05:00
Richard Feldman
11acfd8d2a Fix invalid function arg name in test 2019-11-16 22:30:38 -05:00
Richard Feldman
0b61fcdc25 Clarify some comments. 2019-11-16 22:30:38 -05:00
Richard Feldman
349f060495 Don't generate names that collide with rigids 2019-11-16 22:30:38 -05:00
Richard Feldman
a2cc417a34 Disable unrelated failing tests for now 2019-11-16 22:30:38 -05:00
Richard Feldman
036a72e6e5 Fix generated type var order 2019-11-16 22:30:38 -05:00
Richard Feldman
47fdedc63e Avoid unnecessary work. 2019-11-16 22:30:38 -05:00
Richard Feldman
c5882fe667 Fix some bugs in type var name gen 2019-11-16 22:30:38 -05:00
Richard Feldman
394f33de8a Add more function inference tests 2019-11-16 22:30:38 -05:00
Richard Feldman
b26c4393cb Add more identity inference tests 2019-11-16 22:30:38 -05:00
Richard Feldman
7382dc93ba Use unwrap_or_else over unwrap 2019-11-16 22:30:38 -05:00
Richard Feldman
377ba81795 Improve Debug display of union find structure 2019-11-16 22:30:38 -05:00
Richard Feldman
75166878e8 Give a more descriptive panic when lookup fails 2019-11-16 22:30:38 -05:00
Richard Feldman
90bc97b6d9 Format parens better in function types 2019-11-16 22:30:38 -05:00
Richard Feldman
c2e966ca3d Make name_root support multiple letters 2019-11-16 22:30:38 -05:00
Richard Feldman
dd014b7794 Drop obsolete comment 2019-11-16 22:30:38 -05:00
Richard Feldman
90b8db4fbe Restore always_function test 2019-11-16 22:30:38 -05:00
Richard Feldman
cb47a2f16f Add anonymous identity function test 2019-11-16 22:30:38 -05:00
Richard Feldman
9ee5fad6ab Remove unnecessary ref 2019-11-16 22:29:36 -05:00
Richard Feldman
2c3307d4ce Drop obsolete FlatType::BinOp 2019-11-16 22:29:36 -05:00
Richard Feldman
bf2e75a535 Name all type vars 2019-11-16 22:29:36 -05:00
Richard Feldman
b6f862b7d6 Cleanup 2019-11-16 22:29:36 -05:00
Richard Feldman
ffe088e686 Name some Reason variants better 2019-11-16 22:29:36 -05:00
Richard Feldman
a335632630 Rename identity test to identity_function 2019-11-16 22:29:36 -05:00
Richard Feldman
d82b7815c2 Canonicalize patterns with scope.symbol 2019-11-16 22:29:11 -05:00
Richard Feldman
912fe3b593 Fix pattern constraint gen 2019-11-16 22:29:11 -05:00
Folkert
b13c9295e3 add BlockStrLiteral pattern in the parsing ast 2019-11-16 14:20:31 +01:00
Folkert
2765e3d284 use Roc syntax in comment 2019-11-16 12:48:40 +01:00
Folkert
68eb120da8 desugar if into case
- I think this runs into the same "cloning disaster" described in other
branches
- should "False" be qualified? could it ever be locally shadowed?
    In that case it's `(&["Bool"], "False")`?
- is there a default/empty region that is preferable for the `False` and
`_` patterns?
- desugaring works, but generating constraints for variants (needed for
False and _) doesn't yet. so the test would trigger a panic currently
- is there a reason for False and _ (True and _ is the more obvious choice)
2019-11-16 12:40:11 +01:00
Richard Feldman
4af0ee0e64
Merge pull request #5 from rtfeldman/desugar-apply
Desugar pizza into Apply
2019-11-16 00:10:29 +00:00
Richard Feldman
f0945a3e50
Merge pull request #6 from rtfeldman/can-blockstr
Can blockstr
2019-11-16 00:09:55 +00:00
Folkert
c39e060ddc Parse BlockString
a couple of open questions:

- shouldn't patterns (for formatting) make the distinction between block
and line?
- can the `arena.alloc` be removed? the Vec is already allocated by bumpalo
- for error reporting, is it better to distinguish block and line?
2019-11-15 18:08:01 +01:00
Folkert
42932367e1 revert accidental push to trunk 2019-11-15 13:13:20 +01:00
Folkert
6d982001e8 add commented test
desugaring works, but generating constraints for variants (needed for
False and _) doesn't yet.
2019-11-15 13:08:17 +01:00
Folkert
b1f2a47a58 desugar if into case
- I think this runs into the same "cloning disaster" described in other
branches
- should "False" be qualified? could it ever be locally shadowed?
    In that case it's `(&["Bool"], "False")`?
- is there a default/empty region that is preferable for the `False` and
`_` patterns?
2019-11-15 13:03:11 +01:00
Folkert
1ea0264174 changes after review
trust the borrow checker: reallocation of Expr is not needed
2019-11-15 12:18:06 +01:00
Folkert
a8bb717068 changes after review 2019-11-15 11:56:21 +01:00
Richard Feldman
6c0e771287
Merge pull request #1 from rtfeldman/format-records
Add formatting for records
2019-11-15 03:34:26 +01:00
Richard Feldman
20240df507 Replace Operator with BinOp and UnaryOp 2019-11-15 02:26:47 +00:00
Richard Feldman
307c2bbd6b Merge remote-tracking branch 'origin/trunk' into format-records 2019-11-15 02:24:31 +00:00
Richard Feldman
eb0dce2854 Finish multiline record field formatting 2019-11-15 02:13:51 +00:00
Richard Feldman
67d512f5fb Remove block comments 2019-11-15 02:01:40 +00:00
Richard Feldman
d662fe44ba Merge branch 'clippy' into trunk 2019-11-15 01:31:15 +00:00