Richard Feldman
a5a4141e7e
Reproduce principality bug
2020-01-01 17:02:22 -05:00
Richard Feldman
fbe57db010
Merge pull request #96 from rtfeldman/let-rec
...
WIP: LetNonRec
2020-01-01 17:01:54 -05:00
Folkert
28f58bb768
sort cyclic definitions alphabetically
2020-01-01 22:54:01 +01:00
Folkert
7c8597eb03
remove format before into()
...
I think this didn't work before because something was wrong in the context, and it didn't know which instance to pick
2020-01-01 22:49:35 +01:00
Folkert
a2f462bc02
remove dbg and add comment
2020-01-01 22:28:37 +01:00
Richard Feldman
95e3b602f2
Merge branch 'trunk' into let-rec
2020-01-01 16:11:32 -05:00
Richard Feldman
78fe53e520
Merge pull request #99 from rtfeldman/inlinable-string
...
Use InlinableString
2020-01-01 16:11:25 -05:00
Richard Feldman
e69453de02
Merge branch 'trunk' into inlinable-string
2020-01-01 16:03:22 -05:00
Richard Feldman
54e26967a7
Merge pull request #100 from rtfeldman/null-vars
...
Null vars
2020-01-01 16:03:12 -05:00
Folkert
d0d121ad29
add tests for valid and invalid recursion
2020-01-01 21:58:08 +01:00
Richard Feldman
d68b54f763
Rename CI step from rustfmt to cargo fmt
2020-01-01 15:41:10 -05:00
Richard Feldman
3f9b146d01
cargo fmt
2020-01-01 15:40:59 -05:00
Folkert
dc4ac20fcd
properly generate lets
...
The topological sort into groups only give groups whose elements are equivalent with regards to the topological sort. But there may still be internal cycles withing a group, or the group can contain no mutual recursive definitions at all! So we must look more carefully at the groups, using the strongly connected components.
So that is what happens now: The normal analysis uses a modified successor function that is syntactic: it gives all symbols in a definition's body, even (especially!) those behind a lambda.
With this, we can separate recursive functions from non-recursive ones.
Then a second analysis is needed to crudely spot invalid recursion, of the kind `x = x`. Here, we don't want to look behind a lambda.
I also had to change some test cases to actually use a symbol in the result: this analysis doesn't run for unused symbols.
2020-01-01 21:36:49 +01:00
Richard Feldman
7e414fb854
Follow clippy's advice
2020-01-01 15:34:12 -05:00
Richard Feldman
3605d5bba9
Refactor out new_for_testing_only
2020-01-01 15:33:01 -05:00
Richard Feldman
784b22a28e
Make and use a newtype for OptVariable
2020-01-01 15:29:05 -05:00
Richard Feldman
5cb9a4ba2d
Use Variable::NULL with copy
2020-01-01 15:14:45 -05:00
Richard Feldman
69d6a6c7b0
Introduce Variable::NULL with id 0
2020-01-01 15:14:45 -05:00
Richard Feldman
41eec797a2
Globally disable clippy:large_enum_variants
2020-01-01 14:26:16 -05:00
Richard Feldman
cebcdafe93
Use InlinableString over Box<str>
2020-01-01 06:02:14 -05:00
Richard Feldman
0d801d01ea
Use as_str over into_str
2020-01-01 06:00:30 -05:00
Richard Feldman
6e4eae8100
Merge branch 'trunk' into let-rec
2020-01-01 04:36:42 -05:00
Richard Feldman
3b008b69a8
Merge pull request #92 from rtfeldman/ct/multi-line-if-condition-1
...
Multi line if conditions
2020-01-01 04:36:29 -05:00
Richard Feldman
6bb19246dc
Merge branch 'trunk' into ct/multi-line-if-condition-1
2020-01-01 04:29:15 -05:00
Richard Feldman
3709e8d1c9
Merge remote-tracking branch 'origin/trunk' into let-rec
2020-01-01 04:28:38 -05:00
Richard Feldman
f97ed3a9bd
Merge pull request #98 from rtfeldman/improve-errors
...
Improve type error reporting
2020-01-01 04:28:24 -05:00
Richard Feldman
7aac9d9c9e
Remove unnecessary arity-specific Mismatch
...
Now that the error holds both types, we can figure this out
after the fact. We don't need to track this separately!
2020-01-01 04:21:44 -05:00
Richard Feldman
cd4d9f245a
Use into() over a pub const
2020-01-01 04:10:42 -05:00
Richard Feldman
2f61455061
Merge remote-tracking branch 'origin/trunk' into improve-errors
2020-01-01 04:04:53 -05:00
Chadtech
212523fa08
Merge branch 'trunk' into ct/multi-line-if-condition-1
2020-01-01 04:04:14 -05:00
Richard Feldman
068a3b060d
Reproduce failing module declarations test
2020-01-01 00:42:00 -05:00
Richard Feldman
b44a4ed8db
Merge remote-tracking branch 'origin/trunk' into let-rec
2020-01-01 00:40:58 -05:00
Richard Feldman
5c9b1c06c6
Merge pull request #97 from rtfeldman/fix-modules
...
Fix type inference in module defs
2020-01-01 00:34:22 -05:00
Richard Feldman
7bced69367
Reuse expr_var for body constraint
2020-01-01 00:26:02 -05:00
Richard Feldman
2e881e95a2
Clarify comment
2019-12-31 22:52:00 -05:00
Richard Feldman
13cedfa178
Clone the persistent data structure
2019-12-31 22:43:58 -05:00
Richard Feldman
efa912d52b
Re-enable failing module test
2019-12-31 21:38:06 -05:00
Richard Feldman
b0ce78c212
Merge branch 'trunk' into let-rec
2019-12-31 20:38:05 -05:00
Richard Feldman
0c3d1bd2b2
Merge pull request #93 from rtfeldman/ct/list-formatting
...
List formatting basics
2019-12-31 20:32:25 -05:00
Richard Feldman
28ad27ff6c
Support spaces in empty collection literals
2019-12-31 20:25:29 -05:00
Richard Feldman
775066dde4
Drop obsolete comment
2019-12-31 20:21:53 -05:00
Richard Feldman
56df170be6
Reproduce parsing failure on [ ]
2019-12-31 20:20:58 -05:00
Richard Feldman
ed1910ceab
Add an #[allow] for clippy
2019-12-31 19:51:54 -05:00
Richard Feldman
676cc7d46a
Do what clippy suggests
2019-12-31 19:50:55 -05:00
Richard Feldman
4af75c1633
Drop unused import
2019-12-31 19:50:08 -05:00
Richard Feldman
37c26843f4
Introduce decl_to_let helper function
2019-12-31 19:48:57 -05:00
Richard Feldman
17a5a9b593
Use into_let
2019-12-31 19:48:57 -05:00
Richard Feldman
1b2b33cc47
Use into_iter.rev() over .reverse()
2019-12-31 19:48:57 -05:00
Richard Feldman
8c81685052
Replace Declaration.into_iter() with insert_all
2019-12-31 19:48:57 -05:00
Richard Feldman
b2069c5ba3
Merge branch 'trunk' into ct/multi-line-if-condition-1
2019-12-31 18:54:33 -05:00