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
Folkert
8b26beb49f
keep track of references used in a closure
2019-11-27 19:41:12 +01:00
Folkert
18f451d9da
do what clippy wants
2019-11-27 16:18:57 +01:00
Folkert
ebc100eae8
remove procedures from tests
2019-11-27 15:59:01 +01:00
Folkert
cf7cc56407
Remove procedures
from Env
...
For now this leaves some commented code dealing with calls. The second
type checking phase needs to know if a function is (tail-) recursive
(those will always have a non-unique type), so I don't want to remove it
completely.
2019-11-27 15:49:46 +01:00
Folkert
972a1720f5
fix tests
2019-11-27 15:21:20 +01:00
Folkert
712295f197
clean up
2019-11-27 15:18:26 +01:00
Folkert
c4d783b654
Add closure variant to the canonical Expr
...
And emit that instead of extracting procedures. The scoping information
is required in later stages, and extracting a procedure can happen
during code generation.
2019-11-27 14:56:13 +01:00
Richard Feldman
916e64a1a3
First pass at a build module
2019-11-26 20:56:10 -05:00
Richard Feldman
ef7dd313ed
Decouple parsing module headers from defs
2019-11-26 20:55:46 -05:00
Richard Feldman
f2472c91bb
Merge pull request #29 from rtfeldman/cleanup
...
Clean up some crates
2019-11-26 17:43:20 -05:00
Richard Feldman
9956c57122
Drop unused num and fraction crates
2019-11-26 17:23:26 -05:00
Richard Feldman
781bb23922
Update Inkwell
2019-11-26 17:18:57 -05:00
Richard Feldman
e40b1d42fa
Use wyhash over fxhash
2019-11-26 17:17:20 -05:00
Richard Feldman
25cd967cee
Fix unused warning.
2019-11-26 17:12:00 -05:00
Richard Feldman
5f4fc0070e
Use im_rc over dogged
2019-11-26 17:11:51 -05:00
Richard Feldman
be4f9719f4
Merge pull request #28 from rtfeldman/parse-modules
...
Parse modules
2019-11-25 22:35:05 -05:00
Richard Feldman
a3d1da97cf
Make clippy happy.
2019-11-25 22:24:54 -05:00
Richard Feldman
05759de60c
Extract fmt_record
2019-11-25 22:24:47 -05:00
Richard Feldman
90d463873e
Drop type_limit
2019-11-25 22:19:33 -05:00
Richard Feldman
0d69d7e90f
Add one_of! combinator
2019-11-25 21:32:11 -05:00
Richard Feldman
26dfe25377
Remove unnecessary conditionals.
2019-11-25 21:10:30 -05:00
Richard Feldman
67cceec8ad
Format imports
2019-11-25 21:08:20 -05:00
Richard Feldman
4566d15526
Format exposes
2019-11-25 20:52:54 -05:00
Richard Feldman
59fa1431e9
Merge pull request #27 from rtfeldman/call
...
Replace CallByName and CallPointer with Call
2019-11-25 20:44:51 -05:00