1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 12:51:52 +03:00
Commit Graph

158 Commits

Author SHA1 Message Date
Patrick Thomson
c67a72e531 Fix tests. 2020-01-15 10:50:55 -05:00
Patrick Thomson
d26ff76a9f First pass over the specs. 2019-11-08 22:48:26 -05:00
Rob Rix
a8a3bca972
Fix some missed language extensions. 2019-10-30 13:16:17 -04:00
Rob Rix
17c61c19d1
Switch everything over to using Source.Span. 2019-09-20 14:38:03 -04:00
Rob Rix
b1fe3e6073
🔥 a bunch of redundant imports. 2019-07-15 15:23:29 -04:00
Patrick Thomson
43e3fb4533 Remove unnecessary use of parallel. 2019-06-19 17:22:09 -04:00
Patrick Thomson
8ae90e53c5 Quiet debug spew in specs.
This console barf makes reading though backscrolls unpleasant. Using
Shelly rather than an abomination of a `system` call and adding a
helper function to parse files quietly improved the situation greatly.

This also contains changes to Util that make the file significantly
easier to navigate, thanks to the power of `PartialTyepSignatures`.

Fixes #140.
2019-06-19 12:09:37 -04:00
Patrick Thomson
6a15695195 Even more unused imports. 2019-06-12 13:16:34 -04:00
Timothy Clem
70ea830460 Fix up test for ModuleInfo changes 2019-03-27 15:57:55 -07:00
Patrick Thomson
79ae590376 compiles 2019-03-06 10:12:10 -05:00
joshvera
88c172c984 update tests 2019-02-20 15:45:52 -05:00
joshvera
be4250707d Merge remote-tracking branch 'origin/indexer-prototype' into deploy-to-moda 2019-02-20 14:23:18 -05:00
joshvera
a4d892811f Merge remote-tracking branch 'origin/master' into indexer-prototype 2019-02-01 16:03:16 -05:00
joshvera
3e1c9bd4a5 Merge remote-tracking branch 'origin/master' into indexer-prototype 2019-01-29 13:26:45 -05:00
Patrick Thomson
25f54b1851 tests compile again 2019-01-18 16:12:56 -05:00
Rick Winfrey
d4abe75456 Merge branch 'master' into visibility-resolution 2019-01-16 18:31:44 -08:00
Rick Winfrey
bf3ff6154a Update tests for new AccessControl / Relation split 2019-01-16 18:20:33 -08:00
Rick Winfrey
8431d62b5f Update Evaluator.Spec with new Visibility 2018-12-20 17:03:32 -08:00
Rob Rix
f37b417fd9 Correct the EvaluatorSpec. 2018-12-18 11:19:47 -05:00
Rob Rix
6bce2b117f Merge branch 'master' into factor-abstract-value-as-value-effects 2018-12-18 11:15:58 -05:00
Rick Winfrey
dd0a85a1db Update to use new Relation for declare 2018-12-13 14:17:39 -08:00
Rob Rix
6f25df9080 🔥 reference to the Symbol constructor. 2018-12-13 11:07:18 -05:00
joshvera
de1719c128 Merge remote-tracking branch 'origin/master' into new-expressions 2018-12-12 15:59:41 -05:00
Patrick Thomson
e329cbe89a unify the last spec 2018-12-11 17:36:42 -05:00
Patrick Thomson
1f44f81acc Unify Control.Rewriting and Control.Matching. 2018-12-11 17:12:24 -05:00
joshvera
18367e0ffb fix type errors in tests 2018-12-11 16:51:21 -05:00
Rob Rix
c8682806ef 🔥 a redundant import. 2018-12-10 10:48:34 -05:00
Rob Rix
cde42e1c64 Spacing. 2018-12-10 10:48:25 -05:00
Rob Rix
111b9ec1c9 Fix up the evaluator spec. 2018-12-07 15:20:55 -05:00
Rob Rix
df4413f2a4 Calls return values. 2018-12-07 14:46:41 -05:00
Rob Rix
80ce9ab357 Functions return values. 2018-12-07 14:30:47 -05:00
Rob Rix
36a7c31166 LoopControl operates on values, not ValueRefs. 2018-12-07 12:52:51 -05:00
Rob Rix
09d616788e Return holds a value, not a ValueRef. 2018-12-07 12:38:16 -05:00
Rob Rix
f9c124f303 Replace the address pair Reader with separate CurrentFrame/Scope Readers. 2018-12-06 12:03:07 -05:00
joshvera
781e52f843 Format and remove Environment 2018-12-05 10:14:16 -05:00
joshvera
9f6579edaf Fix call function test to test the value
Co-Authored-By: Rob Rix <rob.rix@github.com>
2018-12-04 17:14:50 -05:00
Rob Rix
f75c2b14a1 Build function scopes in the Evaluatable instances. 2018-12-04 14:55:25 -05:00
joshvera
b35e1a0718 change Address to Slot in tests 2018-11-29 20:16:29 -05:00
joshvera
65a8949a06 Fix the shape of scope and heap outputs in testEvaluating
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-28 18:47:10 -05:00
joshvera
2b11d7aa2a Fix up python test and function args 2018-11-26 20:07:37 -05:00
joshvera
393da1897b Test position of slots
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-15 14:39:41 -05:00
joshvera
c7040f6131 fix test type errors
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:46:30 -05:00
joshvera
ce91cf71db Remove self argument from call effect
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-09 13:04:52 -05:00
joshvera
eebcc9c9ee Fix up runFunction carriers
function effect now takes parameters as terms

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-08 20:47:04 -05:00
joshvera
0c35a8a95c Start fixing up tests
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-07 18:27:56 -05:00
joshvera
1a6d7e77f3 Remove EnvironmentError from Evaluator/Spec
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-07 14:09:01 -05:00
Patrick Thomson
bdc5db555b rename and prune 2018-11-05 16:56:49 -05:00
Patrick Thomson
7ea52dbfe3 Give Control.Matching API better ergonomics.
Given that @tclem and I have found the matcher API frustrating, I've
taken a stab at improving its ergonomics, and I've found some success
in separating composition of matchers from predicate-based narrowing
thereof.

The biggest change here is the elimination of the old `match`
combinator, which proved to be clumsy in that it complected narrowing
and composition. Top-down matching combinators are now written with
the `need` combinator and the `>>>` combinator, which is more readable
and more versatile. Here's a matcher that accepts functions with
Python docstrings:

```haskell
docstringMatcher :: ( Decl.Function :< fs
                    , [] :< fs
                    , Lit.TextElement :< fs
                    , term ~ Term (Sum fs) ann
                    ) => Matcher term term
docstringMatcher = target <*
               (need Decl.functionBody
                >>> narrow @[]
                >>> mhead
                >>> narrow @Lit.TextElement
                >>> ensure Lit.isTripleQuoted))
```

Pretty readable, right? Each step of the tree regular expression -
choosing function bodies, ensuring said bodies are lists, examining
the first element, and choosing only TextElements containing
triple-quoted strings - is made implicit. The old way would have
looked something like this:

```haskell
docstringMatcher = target <* match Decl.functionBody
                           $ narrow
                           $ matchM listToMaybe
                           $ target <* ensure Lit.isTripleQuoted
```
which is a good deal more disorganized and less flexible
in the quite-common case of applying functions during a
matching pass. Separating the act of composition from
function application is a big win here.

Further comments are inline.
2018-11-02 19:25:29 -04:00
Patrick Thomson
c4698ff96c Merge branch 'master' into add-data-coerce-to-prologue 2018-10-30 15:40:14 -04:00
Patrick Thomson
3caa753808 Add Data.Coerce to the Prologue.
This is ubiquitous enough that we should just export it.
2018-10-30 15:12:45 -04:00