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
Richard Feldman
4926bfbc3a
Reorganize fmt and module
2019-11-25 20:42:44 -05:00
Richard Feldman
ed23e23a54
Rename unqualified_ident to lowercase
2019-11-25 16:25:49 -05:00
Richard Feldman
4959652c94
Add a test for calling function args
2019-11-24 21:25:05 -05:00
Richard Feldman
b27893b5d9
Replace CallByName and CallPointer with Call
2019-11-24 21:24:32 -05:00
Richard Feldman
c72270ddf2
Merge pull request #25 from rtfeldman/parens
...
Introduce ParensAround
2019-11-24 15:47:27 -05:00
Richard Feldman
d5d81ce1eb
Merge pull request #26 from rtfeldman/closure-in-let
...
Removing let binding of extracted closure
2019-11-24 15:47:16 -05:00
Richard Feldman
2a7e2c9bca
Remove the Def after moving it to a Procedure
2019-11-24 15:32:09 -05:00
Folkert
31f9a0d18c
Add test for removing let binding of closure
...
when an identifier is assigned to a closure, and the closure is
extracted, the assignement should be removed.
This removes an indirection (call -> local var lookup -> procedure lookup),
but also guarantees that a Symbol is unique, and doesn't stand for
a local variable and a (global) procedure.
2019-11-24 17:55:46 +01:00
Richard Feldman
740168e425
Fix desugaring bug
2019-11-22 00:21:37 -05:00
Richard Feldman
8e0fb89f66
Introduce Expr::ParensAround
2019-11-22 00:21:32 -05:00
Folkert
e363bfa6a5
do what clippy says, again
2019-11-21 16:27:04 +01:00
Folkert
c49928fe43
do what clippy says
2019-11-21 15:53:58 +01:00
Richard Feldman
be1d049910
Merge pull request #23 from rtfeldman/clippy
...
Enable Clippy
2019-11-21 08:03:02 -05:00
Richard Feldman
2851ee3a8c
Update Inkwell explanation
2019-11-21 07:25:39 -05:00
Richard Feldman
29701858e1
Rename clippy step
2019-11-21 07:24:57 -05:00
Richard Feldman
fa757b75c8
Switch Inkwell back to using branch over rev
2019-11-21 07:19:43 -05:00
Richard Feldman
ad9ae5aaf6
Only run CI on PR, not on push
...
It's annoying to see the double output, and doesn't seem to help.
2019-11-21 07:10:43 -05:00
Folkert de Vries
4ed1c98881
Merge pull request #9 from rtfeldman/record-patterns
...
Add record patterns
2019-11-21 13:10:13 +01:00
Richard Feldman
5549614cb3
Enable clippy on CI
2019-11-21 07:08:25 -05:00
Richard Feldman
4e26084051
Fix remaining clippy issues
2019-11-21 07:07:01 -05:00
Richard Feldman
84691067e1
Merge pull request #22 from rtfeldman/restore-a-test
...
Partially restore a canonicalization test
2019-11-21 07:06:54 -05:00
Folkert
56e0947646
remove inaccurate comment
...
patterns in a record destructure can now be any arbitrary pattern,
rather than just identifiers.
2019-11-21 13:04:23 +01:00
Folkert
3c4d5b508d
fix bug in case sharing analysis
2019-11-21 12:59:33 +01:00
Richard Feldman
372892600f
Update Cargo.toml comments
2019-11-21 06:44:42 -05:00
Richard Feldman
a0a50a26cb
Restore Inkwell rev
2019-11-21 06:42:36 -05:00
Richard Feldman
308f5e1194
Try removing rev for inkwell
2019-11-21 06:30:42 -05:00