Patrick Thomson
edd83d466f
Merge branch 'look-up-its-a-core' into compile-string-literals
2019-10-23 14:52:29 -04:00
Patrick Thomson
bd24ff7daf
Merge remote-tracking branch 'origin/master' into hlint-in-ci-again
2019-10-21 15:28:27 -04:00
Patrick Thomson
a273f5881c
Make it more accurate now that eval is not a special node.
2019-10-21 15:25:54 -04:00
Patrick Thomson
e607d9c011
Adjust the name of this test.
2019-10-21 15:25:28 -04:00
Patrick Thomson
b06b3338f8
Unused pragmas.
2019-10-21 14:59:42 -04:00
Patrick Thomson
386e8317dc
lint semantic-python
2019-10-21 14:09:20 -04:00
Patrick Thomson
ff23c301fb
don't worry about this since it's a known bug
2019-10-18 10:22:19 -04:00
Patrick Thomson
01b4a23b23
Use rec
so functions can refer to themselves in their bodies.
...
Code like the following kind is legal in Python:
```python
def recursive(a): return recursive
```
This implies that function and class definitions need to use the Core
`rec` construct so that their bodies have an appropriate entry in the scope.
2019-10-16 17:34:43 -04:00
Patrick Thomson
daf12b5132
Integrate prelude into the test suite.
2019-10-15 13:10:18 -04:00
Patrick Thomson
5578e42989
Call the type
function inside the __semantic_prelude global.
2019-10-15 12:46:32 -04:00
Patrick Thomson
5566bac682
Compile class definitions.
2019-10-14 11:48:58 -04:00
Patrick Thomson
12f096fb75
Merge branch 'master' into semantic-analysis
2019-10-11 17:02:47 -04:00
Patrick Thomson
bb686ff481
Merge pull request #334 from github/rename-core-file-to-analysis-file
...
Rename Core.File to Analysis.File
2019-10-11 17:02:19 -04:00
Rob Rix
d433b41492
Merge branch 'master' into generalize-analysis-over-the-name-type
2019-10-11 16:39:41 -04:00
Rob Rix
30c447a5ec
Merge pull request #331 from github/compile-python-function-decorators
...
Compile Python function decorators and finish milestone #2 .
2019-10-11 14:51:34 -04:00
Rob Rix
35be96fbe7
Merge branch 'master' into compile-python-calls
2019-10-11 14:24:26 -04:00
Rob Rix
6b9ba62c8c
Rename Core.Core.* to Core.*.
2019-10-11 13:50:40 -04:00
Patrick Thomson
089b45ff49
Merge branch 'compile-python-calls' into compile-python-function-decorators
2019-10-11 13:18:37 -04:00
Patrick Thomson
674833b2b7
Merge remote-tracking branch 'origin/master' into compile-python-calls
2019-10-11 13:15:49 -04:00
Rob Rix
85d09b5116
Rename Core.File to Analysis.File.
2019-10-11 12:37:11 -04:00
Rob Rix
91f46f5128
Correct another import.
2019-10-11 12:23:13 -04:00
Rob Rix
94fc6100d6
Correct a couple of instances.
2019-10-11 12:23:09 -04:00
Rob Rix
a05bb26c9f
Use Path.toString instead of show.
2019-10-11 12:13:57 -04:00
Patrick Thomson
2b3acea5fb
Add unit tests.
2019-10-11 11:50:22 -04:00
Patrick Thomson
1ee608750c
Merge remote-tracking branch 'origin/master' into compile-python-calls
2019-10-11 11:15:56 -04:00
Rob Rix
c31b6a072f
Fix the tests.
2019-10-10 18:08:25 -04:00
Rob Rix
ee673336e5
Fix up the tests.
2019-10-10 18:00:53 -04:00
Rob Rix
d2c1d879c0
Merge branch 'master' into core-factoring
2019-10-10 17:14:42 -04:00
Patrick Thomson
ad385c93ae
Merge fallout.
2019-10-10 16:12:16 -04:00
Patrick Thomson
e21d35d98e
Merge remote-tracking branch 'origin/master' into separate-file-and-span-annotations
2019-10-10 15:42:53 -04:00
Rob Rix
7df71e359e
Replace Core.Term with Syntax.Term.
2019-10-10 15:17:22 -04:00
Rob Rix
d7dc440a30
Move all the Data.* modules into Core.* instead.
2019-10-10 15:07:49 -04:00
Rob Rix
13907fd269
Correct the semantic-python tests.
2019-10-10 14:18:56 -04:00
Patrick Thomson
ccfa49aaee
Merge branch 'proper-continuations' into compile-python-calls
2019-10-09 14:52:50 -04:00
Patrick Thomson
e419e33a50
Make compile interface use a more powerful continuation.
2019-10-09 14:50:53 -04:00
Patrick Thomson
ae1430c6a2
Merge branch 'standardize-compilation-names' into compile-python-calls
2019-10-09 12:57:38 -04:00
Patrick Thomson
3f539abfb6
Make compile interface internal and provide toplevelCompile instead.
2019-10-09 12:47:03 -04:00
Patrick Thomson
dab8a04266
Merge remote-tracking branch 'origin/master' into compile-python-calls
2019-10-09 11:52:10 -04:00
Patrick Thomson
665429fa92
We have these JSON instances already.
2019-10-07 20:16:54 -04:00
Patrick Thomson
7eaf7423e0
Fix the generators and kill some unused imports.
2019-10-07 17:45:53 -04:00
Patrick Thomson
d380aabe89
spruce up the unit test
2019-10-07 12:17:52 -04:00
Patrick Thomson
e62ec09c62
[semantic-python] Compile function calls.
...
Though this does not work with keyword arguments, list/dictionary
splats, or generator expressions, it suffices for the simple case.
2019-10-02 15:56:25 -04:00
Patrick Thomson
90f5c78b0d
Merge branch 'master' into json-and-core-are-breaking-up
2019-10-02 13:50:12 -04:00
Patrick Thomson
b33b98e75c
Remove FileCheck conversion of Core to JSON.
...
Converting Core into JSON and querying it turned out to be an exercise
in frustration, since Core does not map naturally onto JSON. Indeed,
we have given up using it entirely thanks to the `CHECK-TREE`
directive, which is much more natural. This means we can drop it from
the test harness and remove the orphan instances that allowed it.
2019-10-02 11:23:33 -04:00
Patrick Thomson
7d93f390a6
Merge branch 'master' into abstract-actions-over-terms
2019-10-02 11:20:31 -04:00
Patrick Thomson
87a658d45b
Fix tests and squash warnings.
2019-10-02 10:59:54 -04:00
Rob Rix
eb922e7e01
🔥 a redundant binding.
2019-10-02 09:59:26 -04:00
Rob Rix
7312997f29
🔥 a redundant import.
2019-10-02 09:59:21 -04:00
Rob Rix
ad3a810e17
Merge branch 'master' into semantic-tags
2019-09-30 13:52:14 -04:00
Patrick Thomson
b1611e13e8
Initial stab at folding over multiple assignments.
2019-09-27 17:35:51 -04:00
Rob Rix
379b9d4f75
Fix the tests.
2019-09-27 15:15:37 -04:00
Patrick Thomson
18a1a0d8b7
Avoid 'head', which is partial.
2019-09-24 00:57:22 -04:00
Patrick Thomson
1731df8bd8
Stray import.
2019-09-23 22:16:25 -04:00
Patrick Thomson
3926742c1d
Improve parsing of FileCheck-style tags.
...
This used to operate via some fast-and-loose (ab)use of the Trifecta
API. A simpler way to do things is to use streaming-bytestring to load
a file line by line and parse directives until we encounter program text.
2019-09-23 22:00:44 -04:00
Patrick Thomson
e98e483c13
Define Compile interface in terms of compileCC.
2019-09-23 13:30:23 -04:00
Patrick Thomson
a556e1d9ff
fix typo
2019-09-23 13:02:50 -04:00
Patrick Thomson
54b5d379ea
Fix Compile instance for ExpressionStatement and Assignment.
2019-09-23 12:31:25 -04:00
Patrick Thomson
dccc1942aa
Break toplevel assignment case because it's wrong.
2019-09-23 12:13:40 -04:00
Patrick Thomson
375c975338
Use compileCC to build a record of toplevel bindings.
2019-09-23 11:56:40 -04:00
Patrick Thomson
4174fce11c
Add Bindings type and reader effect.
2019-09-23 11:06:10 -04:00
Patrick Thomson
611877ad00
An infix fmap is cleaner here.
2019-09-19 15:35:25 -04:00
Patrick Thomson
a89cd0dad9
Eliminate inefficient RelPath->String->Text conversion.
2019-09-19 15:31:04 -04:00
Patrick Thomson
aaa73b20f2
Merge branch 'master' into provide-path-info
2019-09-19 08:22:04 -04:00
Patrick Thomson
d9f88fc046
Add a CHECK-TREE directive and simplify esoteric jq tests.
...
Due to the problems outlined in #245 , the tests for return statements
were complicated and not testing useful properties. This patch adds a
new `CHECK-TREE` directive which lets you embed a Core expression
as a string, which is parsed and then compared against the result of
compiling the containing module.
2019-09-18 18:07:43 -04:00
Patrick Thomson
0dc0a534c6
Start using typed paths in tests.
2019-09-18 14:41:58 -04:00
Patrick Thomson
2aea021890
Use some tree information in a unit test.
2019-09-18 13:05:10 -04:00
Patrick Thomson
99a7806c20
Fix tests.
2019-09-18 12:35:54 -04:00
Patrick Thomson
7d0f817409
Merge branch 'bump-to-tree-sitter-0.2.1' into sempy-early-returns
2019-09-17 10:49:12 -04:00
Patrick Thomson
05d84ea500
Update to latest round of tree-sitter packages.
2019-09-17 10:46:20 -04:00
Patrick Thomson
9728ef0199
Check that returns work within if-clauses.
2019-09-11 12:22:24 -04:00
Patrick Thomson
584e8721f1
Show more and prettier information in the failure dump.
2019-09-11 11:45:21 -04:00
Patrick Thomson
1cd1068323
Add test cases for translating early returns.
2019-09-11 11:44:46 -04:00
Patrick Thomson
245e5055f3
Forgot a liftToEncoding.
2019-09-04 23:10:54 -04:00
Patrick Thomson
a9328c3671
Derive JSON instances for the Core trees.
2019-09-04 23:10:54 -04:00
Patrick Thomson
a7bbd173d0
Formatting/includes.
2019-09-03 13:34:00 -04:00
Patrick Thomson
8369298101
Remove globally-specified default-extensions.
2019-09-03 13:33:45 -04:00
Patrick Thomson
25be284ad2
fix warnings
2019-08-29 09:32:39 -04:00
Patrick Thomson
efa949d402
better naming
2019-08-29 09:30:58 -04:00
Patrick Thomson
973490b5d4
Decomplect this whole thing by lifting it into IO.
2019-08-29 09:20:13 -04:00
Patrick Thomson
31fbc386e9
Enable multiple directives.
2019-08-29 08:52:38 -04:00
Patrick Thomson
1472fc87e7
kill ugly MonadFail hack
2019-08-27 11:34:24 -04:00
Patrick Thomson
a1b7eb9d5d
remove otiose boolean check
2019-08-27 11:29:12 -04:00
Patrick Thomson
1c5ac83791
Corral orphan instances.
2019-08-27 11:27:53 -04:00
Patrick Thomson
80df9c1f1d
pass the scope graph explicitly
2019-08-27 10:47:45 -04:00
Patrick Thomson
7ddbee0006
Remove tests for future milestones for now to keep diffs small.
2019-08-27 10:33:53 -04:00
Patrick Thomson
102ba23513
Reformat comment so it's easier to read in diffs.
2019-08-27 10:25:21 -04:00
Patrick Thomson
811f693051
Use Analysis.ScopeGraph instead of my bad reimplementation
2019-08-16 15:54:17 -04:00
Patrick Thomson
655fdbf3f3
Clean up language pragmas
2019-08-16 14:55:03 -04:00
Patrick Thomson
daa36360a6
add failing tests
2019-08-16 13:24:11 -04:00
Patrick Thomson
dde59eb626
jq-based test suite works
2019-08-16 13:20:08 -04:00
Patrick Thomson
90dd0b4d33
Trying to bring up this test harness
2019-08-16 12:34:56 -04:00
Patrick Thomson
3fb642c06d
Experiment with LLVM-style directives for test assertions
2019-08-13 16:35:11 -04:00
Patrick Thomson
dc47e90c00
Minimum viable patch such that all stage-1 fixtures compile
2019-08-13 16:19:20 -04:00
Patrick Thomson
5acd975b1b
trying to get test cases in shape
2019-08-13 14:01:50 -04:00
Patrick Thomson
b4e24720d4
sections 3 and 4
2019-08-13 11:48:02 -04:00
Patrick Thomson
c95befdb22
Add tests for wave 2
2019-08-12 15:01:55 -04:00
Patrick Thomson
b8ba99ff12
Move these down a directory.
2019-08-12 14:52:43 -04:00
Patrick Thomson
4229e81dd3
Rename and reorg so that these are in line with the roadmap
2019-08-12 13:17:55 -04:00
Patrick Thomson
c578f767e7
some ideas
2019-08-08 13:23:36 -04:00