Commit graph

9048 commits

Author SHA1 Message Date
Richard Feldman
0a9abed1d4 Update Inkwell 2019-11-30 20:35:07 -05:00
Richard Feldman
773d304f6b Update some doc comments 2019-11-30 20:35:07 -05:00
Richard Feldman
787d76b36a Get parallel loading working 2019-11-30 20:35:07 -05:00
Richard Feldman
997b6ec4ad Add PatternType::TopLevelDef 2019-11-30 20:35:07 -05:00
Richard Feldman
064ac5ce84 Add tokio sync and futures crate 2019-11-30 20:35:07 -05:00
Richard Feldman
fd116296df Second pass at parallel loading 2019-11-30 20:35:07 -05:00
Richard Feldman
4cf040a076 Add State::bytes_consumed() 2019-11-30 20:35:07 -05:00
Richard Feldman
d3f6d74fd7 Make State derive Eq 2019-11-30 20:35:07 -05:00
Richard Feldman
7c815b276a Fix UnqualifiedIdent docs 2019-11-30 20:35:07 -05:00
Richard Feldman
0477b68dc3 Add SendMap and SendSet 2019-11-30 20:35:07 -05:00
Richard Feldman
700fd6d2f2 Revert "First pass at async stuff"
This reverts commit 43440629ea81978f379c79576d8d9cada1be85fa.
2019-11-30 20:35:07 -05:00
Richard Feldman
29acb7a2b4 First pass at async stuff 2019-11-30 20:35:07 -05:00
Richard Feldman
37cfb0f650 Add tokio 2019-11-30 20:35:07 -05:00
Richard Feldman
960d42c33d
Merge pull request #33 from rtfeldman/tail-recursion
Tail recursion
2019-11-30 20:32:42 -05:00
Folkert
5cbf7e87e2 clean up testing code 2019-12-01 00:32:34 +01:00
Folkert
a943ff2c6d clarify comments about procedures 2019-12-01 00:22:57 +01:00
Richard Feldman
21efec0373 Remove a .clone() 2019-11-30 17:46:01 -05:00
Folkert
e0e511d61d Add normal recursivity check
after all definitions in a let are canonicalized, we can run over the
closure map and check whether a closure is recursive.
2019-11-30 17:01:24 +01:00
Folkert
c641686c4c clean up tail recursion for case
This is much simpler now, and has some tests!
2019-11-30 15:07:43 +01:00
Folkert
a7fa9d8a33 Add tail-recursion detection
when there is a function in the tail, it is a call by name and the name
matches the tail-callable symbol, this is registered.
2019-11-30 13:06:52 +01:00
Folkert
806c521c56 move pattern checking before body checking
this means we can know when checking the body that we're processing an Identifier pattern
2019-11-30 12:30:44 +01:00
Richard Feldman
9d9818317b
Merge pull request #30 from rtfeldman/keep-closures
Keep closures in canonical Expr
2019-11-29 11:24:10 -05:00
Folkert
e5ea558e7a please clippy 2019-11-29 13:34:53 +01:00
Folkert
62fb37b427 remove most recursion detection code
I think it's easier to do recursion checking in the 2nd type checker.
There we can build a full graph of calls from the `env.closures` map.
2019-11-29 13:31:16 +01:00
Folkert
ad3fdcf843 disable tai-call detection for now
I think this needs some more structural work. This change keeps tests
passing for now.
2019-11-29 13:23:15 +01:00
Folkert
d171506fc7 Only count a tail-call if it actually is one
in e.g.

case x of
    0 -> 0
    _ -> f ( x - 1)

The old code would look at the first branch. it is not a tail call, so
it concluded that the whole expression isn't. But the second branch is.
2019-11-28 13:04:15 +01:00
Richard Feldman
5063c3ac7f Import MutMap in tests/helpers 2019-11-27 22:45:20 -05:00
Richard Feldman
32eeef5318 Merge remote-tracking branch 'origin/trunk' into keep-closures 2019-11-27 22:45:09 -05:00
Richard Feldman
9accd28be9
Merge pull request #32 from rtfeldman/rust-2018
Use Rust 2018 Edition
2019-11-27 22:43:04 -05:00
Richard Feldman
7226466c9d
Merge pull request #31 from rtfeldman/modules
Load Modules
2019-11-27 22:32:24 -05:00
Richard Feldman
5118ece84f Add _: to some traits 2019-11-27 22:11:40 -05:00
Richard Feldman
be1e83dd6d Use crate:: prefix a bunch. 2019-11-27 22:11:40 -05:00
Richard Feldman
d8d8aa292a Add edition=2018 to Cargo.toml 2019-11-27 22:11:40 -05:00
Richard Feldman
871db61b8b Use a struct over a tuple 2019-11-27 22:10:56 -05:00
Richard Feldman
3c6c61b842 Rename test_build to test_load 2019-11-27 21:18:12 -05:00
Richard Feldman
c27e03e794 s/build/load/g 2019-11-27 21:15:54 -05:00
Richard Feldman
eeda789b87 Fix module_defs parser 2019-11-27 21:14:29 -05:00
Richard Feldman
b2e19ffe72 Reproduce failing module_defs parse 2019-11-27 21:14:22 -05:00
Folkert
4314269055 start recording tail calls again in Apply
This got removed when removing call by name. It seems over-eager though: things that aren't supposed to be tail-calls currently are marked as such
2019-11-28 00:13:07 +01:00
Richard Feldman
dcece2d421 Add test_build and fixtures 2019-11-27 17:31:23 -05:00
Richard Feldman
99fe28bb73 Improve build process a bunch 2019-11-27 17:30:50 -05:00
Richard Feldman
6a161e816f Drop duplicate comment 2019-11-27 17:30:04 -05:00
Richard Feldman
fe86c3b49d Add Region::new 2019-11-27 17:29:28 -05:00
Richard Feldman
83de38bab1 Custom debugging format for UnqualifiedIdent 2019-11-27 17:27:05 -05:00
Richard Feldman
fef3fa833e Custom debugging format for Symbol 2019-11-27 17:26:48 -05:00
Richard Feldman
0a51bd9940 Fix parsing nested modules. 2019-11-27 17:21:21 -05:00
Richard Feldman
145d985c2d Add failing test for nested module parsing 2019-11-27 17:21:08 -05:00
Folkert
b50e6391ab fix error in checking recursive definitions 2019-11-27 22:48:19 +01:00
Folkert
60c0e3d4fe implement closure recursivity check 2019-11-27 22:28:48 +01:00
Folkert
ade260ef92 foundation for recursivity analysis 2019-11-27 19:57:09 +01:00