1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 01:42:43 +03:00
Commit Graph

727 Commits

Author SHA1 Message Date
joshvera
b5af73c088 Merge remote-tracking branch 'origin/master' into add-references-to-indexer-prototype 2019-01-04 15:00:43 -05:00
Patrick Thomson
955f30617c Depend on hostname instead of Network.BSD. 2018-12-29 15:02:42 -05:00
Patrick Thomson
d32f5cd5ca Merge branch 'master' into lts-13.0 2018-12-29 14:17:48 -05:00
Patrick Thomson
9852155a77 Upgrade to LTS 13.0 and GHC 8.6.3.
Bumps most of our dependencies.

Code changes:
* algebraic-graphs-0.3 no longer provides a Foldable or Traversable
  implementation for `Graph`, so now neither does our `Graph` type.
* CMark parsing now uses safe rendering of raw HTML/URLs by default,
  so there is no reason to pass an `optSafe` anymore.
* algebraic-graphs now no longer requires an Eq constraint on the
  output type it generates, so we can ditch our Serializing.DOT
  module. (Andrey fixed this for us specifically!)
2018-12-29 14:02:24 -05:00
Rick Winfrey
960d56fdcf Add Visibilities instances 2018-12-19 19:11:02 -08:00
Rick Winfrey
3adaf47a4f Define a Visibilities type class 2018-12-19 19:10:49 -08:00
joshvera
9f86c1b7d1 Move Taggable instances to their own module 2018-12-19 16:27:33 -05:00
Patrick Thomson
5d46cb211e Split up typescript grammar even more 2018-12-18 16:25:32 -05:00
Rob Rix
594979543c 🔥 Located. 2018-12-13 12:04:24 -05:00
Rob Rix
595f0fa2a3 Whitespace error. 2018-12-13 12:04:06 -05:00
Patrick Thomson
684a752773 remove Semantic.Util.Rewriting 2018-12-11 17:47:13 -05:00
Patrick Thomson
e329cbe89a unify the last spec 2018-12-11 17:36:42 -05:00
Patrick Thomson
1de0e9ef09 move specs around 2018-12-11 17:21:39 -05:00
Patrick Thomson
1f44f81acc Unify Control.Rewriting and Control.Matching. 2018-12-11 17:12:24 -05:00
Rob Rix
fa950f3239 🔥 Data.Abstract.Ref. 2018-12-10 11:37:00 -05:00
joshvera
1914a94500 Add -dynamic in test debug builds as well 2018-12-05 11:28:21 -05:00
joshvera
9b8a93bc04 Replace -static with -dynamic in non-release builds
Improves performance in the repl since we don't have to link statically.
2018-12-05 11:25:12 -05:00
joshvera
03e5546ec1 Add -O0 to tests to reduce compilation times 2018-12-05 10:25:21 -05:00
joshvera
49e8a7004c Remove Exports 2018-12-05 10:23:42 -05:00
joshvera
26d3e5e449 Remove Environment 2018-12-05 09:42:00 -05:00
joshvera
70fa31f11e Fix expectation of sequence expression test 2018-11-29 18:38:32 -05:00
joshvera
f39da9578a Move ImportPath to Data.ImportPath 2018-11-16 16:09:11 -05:00
Timothy Clem
57f284f847 Streamline the declarations for toc summaries 2018-11-08 08:33:26 -08:00
Timothy Clem
343289f1c5 Merge remote-tracking branch 'origin/master' into docstrings-round2 2018-11-06 09:17:49 -08: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
Timothy Clem
0f56f33f24 Introduce some symbol/tags tests 2018-11-02 13:55:30 -07:00
Timothy Clem
63e13ee20c Merge remote-tracking branch 'origin/master' into docstrings-round2 2018-11-01 16:04:15 -07:00
Timothy Clem
1f6a7b9e48 Move HasTextElement 2018-11-01 14:49:35 -07:00
Patrick Thomson
b9cf8f73c6 Environment and App. 2018-10-31 15:47:30 -04:00
Timothy Clem
d4d19ea21f Some renaming, split out into two modules 2018-10-31 10:58:00 -07:00
Patrick Thomson
d473b9e1af add Data/Abstract/Name/Spec 2018-10-31 13:19:43 -04:00
Patrick Thomson
b0e6190dbf add Data/Range/Spec 2018-10-31 12:46:52 -04:00
Patrick Thomson
cd05aaa7a5 add Data/Graph/Spec 2018-10-31 12:30:56 -04:00
Timothy Clem
945ab01275 Introduce Taggable 2018-10-31 08:34:58 -07:00
Patrick Thomson
cb54dd7aed Merge remote-tracking branch 'origin/master' into repl-effect 2018-10-30 15:58:00 -04:00
Patrick Thomson
3cb8608703 Merge remote-tracking branch 'origin/master' into add-purely-to-matching 2018-10-30 15:00:37 -04:00
Patrick Thomson
da1704af56 Extract the REPL effect into its own module.
I need this for the refactoring OKR.
2018-10-30 14:55:23 -04:00
Patrick Thomson
6b476d0eb7 Add 'purely' combinator to Matching and rename it.
@tclem and I found ourselves wanting an arrow-like combinator that
promotes a given function to a Matcher. While I think an Arrow
instance is going a little overboard, there's no harm in adding a
'purely' function, the naming of which is commensurate with the
rewriting DSL.

This also renames the module, since there's not anything really
abstract about matching (indeed, it is quite concrete).
2018-10-30 11:04:11 -04:00
Rob Rix
636eec364e Update to fused-effects, replace \/ with handleSum and bundle Interpose. 2018-10-29 09:52:48 -04:00
Rob Rix
1414df368d Define a high-level Semantic.Analysis module. 2018-10-25 21:31:38 -04:00
Rob Rix
131cae4d7b Merge branch 'master' into higher-order-effects 2018-10-24 14:04:13 -04:00
Patrick Thomson
ef696d3c41 Split up Semantic.IO.
This looks like a big patch, but it's very straightforward: no
behavior has changed.

After the umpteenth time spent hitting a compile error because I
passed a `FilePath` rather than a `File` to `readBlobFromPath`, I
decided to finally make the needed refactors to Semantic.IO, and to
split off the `File` type and `Files` effect. This patch:

* adds the `MonadIO` class to `Prologue`'s export list
* moves `File` into `Data.File`
* moves `Handle` into `Data.Handle`
* moves `Files` into `Semantic.Task.Files`
* moves functions for reading blobs into `Data.Blob`
* keeps general IO helpers in Semantic.IO
* renames `readFile` to `readBlobFromFile`
* renames `readBlobFromPath` to `readBlobFromFile'`

This should have a positive effect on compile times and ease of
navigation throughout the codebase.
2018-10-23 15:37:49 -04:00
Rob Rix
314aff5d56 Bump higher-order-effects for Resource & some handler helpers. 2018-10-22 20:18:36 -04:00
Patrick Thomson
8800f7072e Turn on -XMonadFailDesugaring globally.
In the past few years, GHC has been moving to remove the `fail` method
from the definition of `Monad`, a longtime wart, and requiring monads
that fail due to an incomplete pattern match to implement `MonadFail`.
You can read about it[here](https://wiki.haskell.org/MonadFail_Proposal).
Though this move is still in progress, we can opt into it by turning
on the `-XMonadFailDesugaring` extension.

The matching and rewriting systems will both benefit from this, as the
incomplete pattern match in following rewrite rule will crash without
`-XMonadFailDesugaring`, even though the sensible and correct thing
for the rule to do is call out to its `MonadFail` instance:

```haskell
-- crashes the program without -XMonadFailDesugaring
getReceiver :: Rule a (Ruby.Send term) term
getReceiver = do
  (Ruby.Send (Just rec) _ _ _) <- target
  pure rec
```

In addition, turning on `MonadFailDesugaring` will warn you if you put
an incomplete pattern match in a monad that doesn't implement `MonadFail`.
This setting will become implicit in GHC 8.6, so this is a good chance
to make sure that we don't introduce any incomplete patterns going forward.
2018-10-22 14:07:48 -04:00
Rob Rix
3ef2efa73a Merge branch 'master' into higher-order-effects 2018-10-22 09:45:57 -04:00
Patrick Thomson
7c8e8c5bf5 Merge remote-tracking branch 'origin/master' into avoid-recompiling-git 2018-10-18 17:22:18 -04:00
Josh Vera
efde121720 Merge branch 'master' into avoid-recompiling-git 2018-10-18 11:28:18 -04:00
Patrick Thomson
f4b5f0d44e [Experiment] Improve compile speed with larger GHC allocation area 2018-10-17 21:27:22 -04:00
Patrick Thomson
379d75f284 Split up Language.Haskell.Syntax into child modules.
This was the longest (in terms of line count) file in the project.
Splitting it up will save on compile time, as it did for TypeScript.
I observe a ~20sec speedup from `stack clean semantic && stack build semantic:lib`
2018-10-17 18:57:29 -04:00
Patrick Thomson
b361c9ef79 Prevent unnecessary recompilation of Semantic.Version in dev mode.
Right now, Semantic.Version is recompiled on every invocation of
`stack build`, since we marked it as `-fforce-recomp` to ensure that
all deployments are tagged appropriately for haystack. However, this
entails a good deal of wasted time during development. With some
liberal application of `CPP`, we can make this recompilation only
happen on CI, thanks to the `release` flag and passing in a compiler
flag.

To test:

* apply the patch
* `stack build semantic`, then `stack exec semantic -- -v`. It should
  print `semantic version 0.4.0 (<development>)`.
* `stack clean semantic && stack build --ghc-options=-DCOMPUTE_GIT_SHA`.
  `stack exec semantic -- -v` should then print out the correct SHA.

Though it's probably not strictly necessary, I've marked the
`semantic` and `semanticd` executables to compile with
-DCOMPUTE_GIT_SHA, just in case.
2018-10-17 17:24:14 -04:00
Patrick Thomson
ac543651ee Add NFData instances to enable more accurate benchmarking.
Because we're getting serious about benchmarking in the run-up to
Windrose, it's time to bring in the `deepseq` package to ensure that
benchmarks can fully evaluate the result of a test case.

The `deepseq` package provides an `NFData` typeclass:

```
class NFData a where
  rnf :: a -> ()
```

Instances use the `seq` combinator to ensure that the argument to
`rnf` is fully evaluated, returning (). If there is a `Generic`
instance for `a`, the implementation can be omitted. This patch adds
NFData for every syntax node, graph vertex, environment data
structures, and exceptions. It is long, but the work is very
straightforward, so don't panick.

The benchmark suite (`stack bench`) now produces more accurate
results. The benchmarks previously mimicked `rnf` by calling `show` on
the result of an evaluation or graph construction; now that we have
actual `NFData` instances we can use the `nfIO` combinator from
criterion. This has sped up the evaluation benchmarks and reduced
their memory consumption, while it has slowed down the call graph
benchmarks, as those benchmarks weren't evaluating the whole of the
graph.

Unfortunately, this patch increases compile times, as we have to
derive a few more Generic instances. I wish this weren't the case, but
there's little we can do about it now. In the future I have some plans
for how to reduce compile time, and I bet that those gains will at
least nullify the speed hit from this patch.

Now that we have NFData instances for every data type, we can start
benchmarking assignments, in preparation for fixing #2205.

This patch also pulls in updates to `effects` and `fastsum` that add
appropriate NFData instances for the data they vend.
2018-10-17 14:08:47 -04:00
Rob Rix
c9e6912068 Port most of the system over to higher-order-effects. 2018-10-16 18:48:08 -04:00
Rob Rix
298d861a20 Add a dependency on higher-order-effects. 2018-10-12 14:08:49 -04:00
Patrick Thomson
d56377aea9 Prevent slowdowns when pretty-printing in ghci.
Right now, when opening a shell with `script/ghci`, you can encounter
a tremendous slowdown by turning on pretty-printing (with `pretty`)
then printing any value (`[0..3]` should work).

This stems from the fact that our `.ghci` specifies the `prettyShow`
function, defined in Semantic.Util, as its `-interactive-print`
function. While this is a good choice of a pretty-printer, the fact
that it is in Util, a file which imports many modules and uses fancy
types, is not good: pretty-printing cannot begin until Util is
recompiled and linked in. This explains why benchmarking this slowdown
revealed nothing but `dlsym` calls: we thought it was due to linking
in the tree-sitter libraries, but it was actually waiting for Util to
compile and link in.

The fix is simple: define `prettyShow` in another module. This should
provide significant speedups to our developer workflow.
2018-10-04 14:38:36 -04:00
Rob Rix
5c2dac35e8 Merge branch 'master' into first-order-closures 2018-09-27 13:37:25 -05:00
Timothy Clem
6b40e59c1d No SplitDiff! 2018-09-27 13:04:51 -05:00
Timothy Clem
c8dfe57a48 Remove Data.Record entirely 2018-09-26 14:05:29 -05:00
Timothy Clem
38a4bb38f2 WIP - replace Record across the project
Not quiet there with Diff and decorators yet
2018-09-21 13:46:25 -07:00
Rob Rix
038b56970e Parameterize Evaluator by the term type. 2018-09-20 12:43:59 -04:00
Patrick Thomson
ba18287311 Merge branch 'master' into reprinting-pipeline-rename 2018-09-19 13:08:52 -04:00
Patrick Thomson
8e1ca410bb Remove Hungarian-style T- prefix from tokens and scopes.
Prefixes on data constructors are generally an antipattern in Haskell:
if you're concerned about name collisions, have clients use qualified
imports for whatever modules they need. As such, this removes the T-
prefixes from the `Token` and `Context` types. This also renames
Context to Scope, which is a more exact and readable name.
2018-09-19 12:38:48 -04:00
Patrick Thomson
22cf72c20f Merge branch 'master' into term-rewriting-mk2 2018-09-19 11:51:28 -04:00
Patrick Thomson
d68c7975d7 Merge branch 'master' into new-take-on-parse-examples 2018-09-18 17:51:22 -04:00
Timothy Clem
6817193cbc Mark assignment timeouts as pending 2018-09-18 13:00:31 -07:00
Patrick Thomson
2dc8bb0041 Merge branch 'master' into term-rewriting-mk2 2018-09-18 15:18:21 -04:00
Rob Rix
13993af2c7 Merge branch 'master' into heap-widening 2018-09-18 14:46:36 -04:00
joshvera
906da72e54 Merge remote-tracking branch 'origin/master' into scopes-and-frames 2018-09-18 12:26:18 -04:00
Patrick Thomson
c2bfde5c95 move Fragment into its own file for clarity's sake 2018-09-18 11:38:10 -04:00
Rob Rix
f3d616fbd1 Merge branch 'master' into heap-widening 2018-09-18 11:17:21 -04:00
Rob Rix
87c609fa1c Duplicate the flow-sensitive caching module. 2018-09-18 10:27:47 -04:00
Rob Rix
58c22658d3 Rename the Caching module to note its flow-sensitivity. 2018-09-18 10:26:50 -04:00
Rob Rix
560c93784c Move the cache into the Caching module. 2018-09-18 10:21:25 -04:00
Rob Rix
86654a2dab Move Configuration into Data.Abstract.Cache. 2018-09-18 10:12:02 -04:00
Rob Rix
51be2081ae 🔥 Control.Abstract.Configuration. 2018-09-18 10:10:03 -04:00
Timothy Clem
38b692b17c Merge remote-tracking branch 'origin/master' into new-take-on-parse-examples 2018-09-17 16:47:00 -07:00
Timothy Clem
31ca888da7 Introduce datatype for these language examples 2018-09-17 16:46:45 -07:00
Timothy Clem
15f7e57571 First pass at doing parse-examples in haskell and hspec 2018-09-17 15:49:18 -07:00
Patrick Thomson
1ba38e3e57 Merge remote-tracking branch 'origin/master' into term-rewriting-mk2 2018-09-17 18:31:44 -04:00
Patrick Thomson
7c35cb524a Merge branch 'master' into bump-synopsis 2018-09-17 16:18:58 -04:00
joshvera
2d071e5090 Remove Data.Abstract.Frame for now 2018-09-17 13:05:24 -04:00
joshvera
5c96b3d6d7 Merge remote-tracking branch 'origin/master' into scopes-and-frames 2018-09-17 12:08:27 -04:00
Patrick Thomson
06b44c4fc9 Replace the "initial project from stack" synopsis.
I figure that since we're starting to show this to other teams, it
behooves our documentation to have a more meaningful description.
Happy to change this if y'all can come up with a snappier synopsis.
2018-09-17 11:21:21 -04:00
joshvera
68ca3b06bc Remove type-combinators dep 2018-09-14 19:04:09 -04:00
Timothy Clem
d2524e194d Merge branch 'master' into assignment-timeout 2018-09-14 14:03:37 -07:00
Patrick Thomson
d1cc400dc0 add spec file 2018-09-14 13:10:22 -04:00
Patrick Thomson
b8b8fe01c9 port over Control.Rewriting 2018-09-14 12:47:21 -04:00
Timothy Clem
a6ce4f672f Docs and sort out a common Duration datatype 2018-09-13 14:51:32 -07:00
Timothy Clem
7e1c7a1c84 Timeout effect 2018-09-13 14:20:42 -07:00
Patrick Thomson
7129435dc8 Merge remote-tracking branch 'origin/master' into simplify-reprinter
also incorporates a number of changes. oops.
2018-09-12 12:14:01 -04:00
Patrick Thomson
0802e0a9f2 Use a deep embedding for Tokenize. 2018-09-11 18:54:37 -04:00
Timothy Clem
2e48678e6b Rework diff grpc api as well, enable for all supported langauges 2018-09-11 10:32:29 -07:00
joshvera
1eac23ce2e Don't parameterize scopes by name 2018-09-10 18:50:40 -04:00
Timothy Clem
c806be4cfc Clean up, expand grpc support to larger language list 2018-09-10 11:43:42 -07:00
Timothy Clem
38e3cba57a Messy, but working multi-lang grpc parsing 2018-09-10 11:15:52 -07:00
Timothy Clem
a15155c4da Basics of TermVertex in grpc 2018-09-06 17:27:13 -07:00
Timothy Clem
f0d164f952 Rework control flow graph data types 2018-09-06 15:12:12 -07:00
joshvera
3ccdbdb692 Merge remote-tracking branch 'origin/master' into scopes-and-frames 2018-09-05 12:54:45 -04:00
joshvera
01af82bf53 WIP 2018-09-04 12:43:14 -04:00
joshvera
3d412f7d9e Add ScopeGraph 2018-08-29 13:47:44 -04:00
Timothy Clem
34648a263a Merge branch 'master' into source-aware-reprinter 2018-08-28 11:34:53 -07:00
Timothy Clem
5da417d01c Some basic pretty printing for mini Python 2018-08-28 09:14:48 -07:00
Timothy Clem
ea01f30de5 Put this back in order 2018-08-28 09:12:44 -07:00
Timothy Clem
8759225ac7 A mini-python 2018-08-28 09:12:29 -07:00
Timothy Clem
57f32c77bd MiniRuby in its own module 2018-08-27 15:06:51 -07:00
joshvera
bc6614aa12 Merge remote-tracking branch 'origin/master' into entry-points 2018-08-27 12:05:20 -04:00
Timothy Clem
e9e8edbebe Dedicated util for rewriting 2018-08-24 10:35:38 -07:00
Timothy Clem
17fbceb17a Remove need for lens 2018-08-23 15:53:43 -07:00
Timothy Clem
8f6d1ee873 Merge branch 'master' into source-aware-reprinter 2018-08-23 07:47:48 -07:00
Timothy Clem
67f652b4d7 Refactor to have 1 additional data representation in the pipeline 2018-08-22 11:30:03 -07:00
Timothy Clem
a1294e91f1 Docs and some renaming 2018-08-21 16:15:08 -07:00
Charlie Somerville
5f6961e737 move Analysis.Abstract.Configuration to Control.Abstract 2018-08-21 13:42:45 +10:00
Charlie Somerville
ec852844cb reshuffle module layout so that Environment can depend on Heap 2018-08-21 13:42:45 +10:00
Timothy Clem
cbdb932af8 Ruby translation step for the pipeline 2018-08-20 18:11:30 -07:00
Timothy Clem
58cf9925fa Not using this 2018-08-20 10:37:24 -07:00
Timothy Clem
3c53862e19 Merge remote-tracking branch 'origin/master' into source-aware-reprinter 2018-08-20 10:17:38 -07:00
Timothy Clem
1dc89961b2 Remove Rule 2018-08-20 09:52:03 -07:00
Timothy Clem
b49adc41fe Move splice to data, allow config for translation 2018-08-17 09:10:14 -07:00
Timothy Clem
f674e2dad1 WIP - translation with Eff interface 2018-08-16 16:51:07 -07:00
Rick Winfrey
1665df55aa Merge branch 'master' into interactive-debugger 2018-08-14 15:04:02 -07:00
Timothy Clem
cd65c8814a Some common matchers 2018-08-14 14:15:18 -07:00
Timothy Clem
487c78b854 Merge remote-tracking branch 'origin/master' into source-aware-reprinter 2018-08-13 15:56:26 -07:00
Rick Winfrey
bdeae17ff6 🔥 unneeded build-depends 2018-08-13 15:43:07 -07:00
joshvera
75365e9caa Merge remote-tracking branch 'origin/master' into interactive-debugger 2018-08-13 16:40:27 -04:00
Rob Rix
9c9fa333d6 🔥 Allocatable & Derefable. 2018-08-13 09:46:46 -04:00
Rob Rix
16964350b0 Stub in a module for the Hole address type. 2018-08-13 09:35:37 -04:00
joshvera
2732f17719 Merge remote-tracking branch 'origin/master' into interactive-debugger 2018-08-10 14:20:16 -04:00
Rob Rix
d05f3c6ae3 🔥 Data.Abstract.Address. 2018-08-10 13:46:24 -04:00
Rob Rix
53a9ca30aa Add modules for the address types. 2018-08-10 13:31:55 -04:00
Josh Vera
44ac28510c Merge branch 'master' into entry-points 2018-08-08 16:17:08 -04:00
Rick Winfrey
383b6208ee Rename ErrorContext -> BaseError 2018-08-07 16:50:55 -07:00
Rob Rix
3c976b3c7f Merge branch 'master' into interactive-debugger 2018-08-07 09:33:53 -04:00
joshvera
967803aae3 Merge remote-tracking branch 'origin/master' into entry-points 2018-08-06 18:57:18 -04:00
Rick Winfrey
823ae6ac51 Merge branch 'master' into error-context 2018-08-06 13:46:42 -07:00
Patrick Thomson
1d6346cb64 set ground for Control.Rule and Control.Rule.Engine 2018-08-06 16:33:50 -04:00
Patrick Thomson
8549440f21 even better names, and a helper script to narrow tests 2018-08-03 13:15:14 -04:00
Patrick Thomson
2ec082d92c implement the typesetting stage 2018-08-03 12:47:54 -04:00
Patrick Thomson
081d8eb6fa Reorganize and add microlens, at least for now. 2018-08-03 12:23:47 -04:00
Rob Rix
dfa3629db4 Add a dependency on haskeline. 2018-08-03 09:25:52 -04:00
Rob Rix
d8cf347822 🔥 the dependency on trifecta. 2018-08-02 16:33:19 -04:00
Rob Rix
9cdcd3c972 Depend on trifecta. 2018-08-02 14:45:55 -04:00
Patrick Thomson
f295632327 move some code around + ensure we can enforce History invariants 2018-08-02 13:03:55 -04:00
joshvera
d3cdda3dff Merge remote-tracking branch 'origin/master' into entry-points 2018-08-01 18:18:33 -04:00
Rob Rix
c6c17a1594 Stub in a module for Quieterm.
Co-Authored-By: Ayman Nadeem <aymannadeem@gmail.com>
2018-08-01 15:06:26 -04:00
Rob Rix
fb12fc3a29 Stub in a REPL module.
Co-Authored-By: Ayman Nadeem <aymannadeem@gmail.com>
2018-08-01 10:54:57 -04:00
Patrick Thomson
76727e07da rename 2018-07-31 17:49:03 -04:00
Patrick Thomson
dccea555ed Extremely ad-hoc renderer to Docs 2018-07-31 12:44:20 -04:00
Patrick Thomson
6823fb92b6 better module name 2018-07-31 10:43:46 -04:00
Patrick Thomson
a61fe301c4 Skeleton and initial test case 2018-07-30 16:00:09 -04:00
Rick Winfrey
4fbad824d9 Define ErrorContext 2018-07-30 11:11:18 -07:00
Rob Rix
3fa75423d6 Move Mergeable into the tests. 2018-07-20 09:52:43 -04:00
Patrick Thomson
c8ec92ceb4 Make L.TS.Syntax an exports-only module. 2018-07-19 17:23:44 -04:00
Patrick Thomson
c647a558c6 add Syntax.JSX and Resolution 2018-07-19 17:05:44 -04:00
Patrick Thomson
587b97ffa5 Add -Wmissing-export-lists to semantic. 2018-07-19 14:56:58 -04:00
Patrick Thomson
bdd75e6e7c Add export lists to modules missing them. 2018-07-19 14:45:04 -04:00
Patrick Thomson
361f62c812 Rename ImportGraph to AdjacencyList 2018-07-17 11:35:03 -04:00
Patrick Thomson
0ed48c7bbe Simplest test possible. 2018-07-16 11:07:40 -04:00
Timothy Clem
aa480be46d 🔥 old import graph summary
This hasn't been in the CLI for a while now
2018-07-06 13:35:09 -07:00
Rob Rix
2a6b1dd109 Move Data.Abstract.Type to Data.Abstract.Value.Type. 2018-07-04 10:46:13 -04:00
Rob Rix
de7ac163d6 Stub in a module for abstract value semantics. 2018-07-04 09:21:51 -04:00
Rob Rix
5100670e72 Rename Data.Abstract.Value to Data.Abstract.Value.Concrete. 2018-07-03 14:22:26 -04:00
Rob Rix
c338fca8b0 Stub in a module for deterministic assignments. 2018-06-27 14:27:15 -04:00
Josh Vera
5538c6b490 Merge branch 'master' into explicit-integer-parser 2018-06-26 17:10:21 -04:00
Patrick Thomson
98030486eb rename AdjList to ImportGraph 2018-06-26 16:54:09 -04:00
Patrick Thomson
bbf814acc1 Merge remote-tracking branch 'origin/master' into import-graph-mk2 2018-06-26 13:49:24 -04:00
Patrick Thomson
f9f0dd5e79 Use a hand-written integer parser.
Rather than relying on the `Read` instance for `Integer`, let's make
our assumptions about the format explicit. This was mostly a matter of
extracting internal functions from the `Scientific` parser.
2018-06-25 11:55:32 -04:00
Rob Rix
dda4c00cb5 🔥 Evaluating. 2018-06-21 13:26:22 -04:00
Patrick Thomson
de5792ef38 will this fix the cabal file? only time will tell 2018-06-18 19:22:42 -04:00
Rob Rix
d39171e9d7 Determine Preludes from the language. 2018-06-18 11:09:01 -04:00
Patrick Thomson
659500551c Merge remote-tracking branch 'origin/master' into import-graph-mk2 2018-06-15 19:30:50 -04:00
Timothy Clem
0ddf994a81 Merge branch 'master' into telemetry-and-config 2018-06-15 10:40:06 -07:00
Patrick Thomson
62d238df09 🔥 Preluded and make prelude paths simpler/explicit
Preluded was overengineered anyway.
2018-06-15 11:49:26 -04:00
Rob Rix
da19e87b80 Depend on semilattices in the tests. 2018-06-15 11:40:26 -04:00
Rob Rix
bf06d928c9 Replace Data.Semilattice.Lower with semilattices. 2018-06-15 11:37:49 -04:00
Rob Rix
54ea58fd79 Move the proto3 packages down. 2018-06-15 11:06:26 -04:00
Timothy Clem
a1949ae322 Re-order 2018-06-13 16:39:13 -07:00
Timothy Clem
bff74e55d1 Attempt to have buildVersion in it's own file 2018-06-13 16:39:01 -07:00
Timothy Clem
c3d3425600 Intermediate, but compiling refactor of config and telemetry 2018-06-13 14:23:55 -07:00
Patrick Thomson
dbb04d695d Revert "try adding preludes to extra-source-files"
This reverts commit 45b44bf90472ccde0708a2cf3e2830c16b1a32e1.
2018-06-13 16:30:48 -04:00
Patrick Thomson
921c697a25 try adding preludes to extra-source-files 2018-06-13 16:06:54 -04:00
Patrick Thomson
19e7ff7510 Reinstate import graph functionality. 2018-06-13 12:47:35 -04:00
Patrick Thomson
36d5b7562a Revert "gRPC import graph" 2018-06-13 12:34:35 -04:00
Patrick Thomson
e0b0e31d9e Merge branch 'master' into import-graph-mk2 2018-06-12 15:30:38 -04:00
Patrick Thomson
38be124258 Revert "split up Semantic.IO into Data.Handle and Semantic.Effect.Files"
This reverts commit c0064862e756a1064dc29631f94e007d9bdfb10b.
2018-06-12 11:40:53 -04:00
Patrick Thomson
25a3ad2e55 split up Semantic.IO into Data.Handle and Semantic.Effect.Files 2018-06-11 17:38:31 -04:00
Timothy Clem
5eeaaabf76 Start to extract common configuration 2018-06-11 13:12:19 -07:00
Timothy Clem
437b465f56 First pass at haystack reporting 2018-06-11 13:12:19 -07:00
Patrick Thomson
666524a07b Merge remote-tracking branch 'origin/master' into import-graph-mk2 2018-06-11 14:30:52 -04:00
Patrick Thomson
dd8c8b0762 Port AdjList and create the messages 2018-06-08 12:48:23 -04:00
Timothy Clem
0282529e88 Merge remote-tracking branch 'origin/master' into port-semiotic-http-interface 2018-06-06 16:22:49 -07:00
Timothy Clem
19f30f33cc Pull port and host from environment 2018-06-06 16:17:44 -07:00
Rob Rix
946ac38f0d Merge Control.Abstract.Configuration into Control.Abstract.Heap. 2018-06-06 08:04:58 -04:00
Patrick Thomson
871ebf49b8 Add a test to ensure no one breaks Enum instances for Language. 2018-06-05 12:32:24 -04:00
Patrick Thomson
e25791c1ca Roundtrip test for protobuf instances. 2018-06-05 12:14:24 -04:00
Ayman Nadeem
e030824d52 fix conflicts with new haskell additions 2018-05-31 15:32:10 -07:00
Rob Rix
6df9a1f174 Merge branch 'master' into protobuf-instances 2018-05-31 12:45:35 -04:00
Josh Vera
a342445b30 Merge branch 'master' into protobuf-instances 2018-05-31 11:33:19 -04:00
Rob Rix
6f9cfae147 Merge branch 'master' into env-effect 2018-05-30 18:57:52 -04:00
Rob Rix
11a92c0cb6 Move getExports & addExport into Control.Abstract.Environment. 2018-05-30 14:27:32 -04:00
joshvera
8d802f07df Merge remote-tracking branch 'origin/master' into protobuf-instances 2018-05-30 13:43:03 -04:00
Timothy Clem
d47a06d47f 🔥 IdentifierName 2018-05-29 13:49:55 -07:00
Rob Rix
dda2f9897b Merge branch 'master' into 🔥-galign 2018-05-29 12:48:34 -04:00
Rob Rix
54150552b3 Merge branch 'master' into 🔥-galign 2018-05-29 08:53:37 -04:00
Rob Rix
484b956ce7 Add a module for holes. 2018-05-28 15:09:10 -04:00
Rob Rix
b3b47a34df 🔥 Goto. 2018-05-28 14:42:46 -04:00
joshvera
84c3bef78e Add Identity and Product 2018-05-24 16:19:58 -04:00
joshvera
131ffe0fad Depend on proto3-suite and derive Named instances for Empty and Identifier 2018-05-24 13:43:51 -04:00
Timothy Clem
a15efb9327 Merge branch 'master' into deployment-setup 2018-05-24 10:13:25 -07:00
Josh Vera
38d438d540 Merge branch 'master' into deployment-setup 2018-05-24 11:52:40 -04:00
Rob Rix
3a8ee0dca2 Back out all of the effect decomposition stuff. 2018-05-24 11:26:42 -04:00
Rob Rix
37f7aa8ff8 Spike out a candidate implementation of embedEval. 2018-05-24 11:02:26 -04:00
Rob Rix
98a8f6050a Merge branch 'master' into decompose-values 2018-05-24 09:30:48 -04:00
Rob Rix
eeb604569d Merge branch 'master' into decompose-values 2018-05-24 09:11:19 -04:00
Rob Rix
ab3b353a0d Stub in a module for the Options. 2018-05-24 08:49:30 -04:00
Rob Rix
87b31ff772 Merge branch 'master' into pretty,-pretty-colours 2018-05-24 08:45:13 -04:00
Rick Winfrey
7bc88d088c Boilerplate and minimal syntax for Haskell assignment 2018-05-23 11:32:15 -07:00
Timothy Clem
b92f81d0b6 More sophisticated health server 2018-05-23 11:04:15 -07:00
Rob Rix
115e887739 Merge branch 'master' into decompose-values 2018-05-23 09:59:16 -04:00
Rob Rix
54a4f289f7 Produce colour output with the Show serializer. 2018-05-23 09:00:29 -04:00
Patrick Thomson
2edafbf1d1 Merge branch 'master' into fast-builds-by-default 2018-05-22 17:52:18 -04:00
Patrick Thomson
1f26db7a5e -O2 is ridiculously slow, let's hold off for now 2018-05-22 17:48:07 -04:00
Patrick Thomson
c1d3a041cc set -Werror when building release 2018-05-22 17:38:13 -04:00
Patrick Thomson
88d7d19bb8 Make builds run at -O0 by default, except for CI/deploy.
It's always been easy to forget the `--fast` flag. With the introduction of
`semanticd`, forgetting that carries a significant speed hit, as GHC
optimizes the resulting executable very thoroughly, which entails a
significant uptick in time spent building. For our collective sanity's
sake, this patch makes `stack build` operate without optimizations. CI
and deploy jobs pass `--flag semantic:release` to `stack`, which
specifies the `-O2` level of optimizations.

Timing `stack clean && stack build` (which rebuilds the tree-sitter
packages) went from 6m17s to 3m04s on my machine.  When building just
`semantic` by itself, standard builds take 1m06s, whereas builds with
`--flag semantic:release` take 4m12s. (GHC does a lot of
optimizations!)
2018-05-22 17:18:03 -04:00
Patrick Thomson
c8d5a8d231 add test for cancelling in-flight parsers 2018-05-22 17:01:17 -04:00
Rob Rix
fb5b903af7 Merge branch 'master' into decompose-values 2018-05-22 08:44:54 -04:00
Timothy Clem
42af0faae6 New approach for linting 2018-05-21 08:17:11 -07:00
Timothy Clem
8fe6f7e959 Bump the version so we can tell these are new style builds 2018-05-18 13:31:05 -07:00
Rob Rix
66d1f8286b Stub in a module for names. 2018-05-18 12:43:28 -04:00
Rob Rix
5a43ed60f4 Stub in a module for ValueRef. 2018-05-18 10:36:23 -04:00
Rob Rix
077335784a Stub in a module for primitives. 2018-05-18 10:11:19 -04:00
Ayman Nadeem
8aad81b775 Merge branch 'master' into java-assignment 2018-05-17 10:42:00 -07:00
Rob Rix
e9238d0ec7 Merge branch 'master' into package-dot-json-parsing 2018-05-16 19:12:08 -04:00
Rob Rix
b2e5ee6d31 The tests depend on hashable. 2018-05-16 16:19:08 -04:00
Timothy Clem
a60ed7bc16 Merge remote-tracking branch 'origin/master' into package-dot-json-parsing 2018-05-16 12:07:13 -07:00
Timothy Clem
f81ea4bff5 s/File/Project b/c that makes more sense to me 2018-05-16 08:38:00 -07:00
Rob Rix
2dd557064d Merge branch 'master' into fix-abstract-semantics 2018-05-16 09:20:00 -04:00
Rob Rix
ae74957342 🔥 the unused call graph analysis. 2018-05-16 09:08:07 -04:00
Timothy Clem
3e5b4d5dbb Merge remote-tracking branch 'origin/master' into package-dot-json-parsing 2018-05-15 15:58:19 -07:00
Rob Rix
47e92a766f Merge remote-tracking branch 'origin/master' into fix-abstract-semantics 2018-05-15 18:47:47 -04:00
Timothy Clem
4ef324f512 Merge remote-tracking branch 'origin/master' into package-dot-json-parsing 2018-05-15 15:04:13 -07:00
Rob Rix
70c28fa288 Stub in a module for term evaluators. 2018-05-15 11:40:10 -04:00
Rob Rix
16f07a17d1 🔥 Output. 2018-05-14 18:40:22 -04:00
Rob Rix
8d190c2930 Factor the ts-parse command into its own module. 2018-05-14 14:57:19 -04:00
Rob Rix
02e14169e9 🔥 Rendering.SExpression. 2018-05-14 10:59:47 -04:00
Rob Rix
68df562f23 Stub in a module for serializing to s-expressions. 2018-05-11 14:41:10 -04:00
Rob Rix
539c769ecc Stub in a module for the details of DOT serialization. 2018-05-11 14:07:53 -04:00
Rob Rix
eb82239f8d Stub in a module for serialization formats. 2018-05-11 13:27:09 -04:00
Rob Rix
ffd787a762 Rename Rendering.DOT to Rendering.Graph. 2018-05-11 12:57:20 -04:00
Rob Rix
53fab62a0e Stub in a module for graphs. 2018-05-11 12:04:26 -04:00
Rob Rix
db185d5e47 Move Located into Data.Abstract.Address. 2018-05-11 00:09:17 -04:00
Rob Rix
2abfd92678 Bump effects for https://github.com/joshvera/effects/pull/43 2018-05-10 18:27:10 -04:00
Timothy Clem
8e67479d09 Merge remote-tracking branch 'origin/master' into package-dot-json-parsing 2018-05-10 10:01:01 -07:00
Rob Rix
2b1d976f6a Rename Control.Abstract.ModuleTable to Control.Abstract.Modules. 2018-05-08 16:59:25 -04:00
Rob Rix
52cfb56f54 Rename the Label module to Goto. 2018-05-08 10:37:50 -04:00
Rob Rix
c427be3670 Stub in a spec for Evaluator. 2018-05-07 14:21:05 -04:00
Rob Rix
29c755a8dc Sort the test modules. 2018-05-07 14:20:56 -04:00
Rob Rix
eabb3b79a1 Move the evaluated module table accessors into their own module. 2018-05-07 12:20:23 -04:00
Rob Rix
f2288e3d69 Move the Environment accessors into their own module. 2018-05-07 12:17:32 -04:00
Rob Rix
3c73571b0c Move currentModule/currentPackage into their own module. 2018-05-07 12:14:14 -04:00
Rob Rix
de5a46dc6c Move JumpTable, Label, label, and goto into their own module. 2018-05-07 12:12:11 -04:00
Rob Rix
0d1b025823 Move the Exports accessors into their own module. 2018-05-07 12:04:12 -04:00
Rob Rix
5d91cfd843 Move the roots functionality into its own module. 2018-05-07 11:58:30 -04:00
Rob Rix
531f941692 Provide a module re-exporting all the various abstract interpretation machinery. 2018-05-07 11:51:56 -04:00
Rob Rix
57ddf31ec5 Move the Heap accessors into their own module. 2018-05-07 11:49:59 -04:00
Rob Rix
920ddd893f Move the configuration accessor into its own module. 2018-05-07 11:49:47 -04:00
Rob Rix
2a1c7f17b3 🔥 microlens. 2018-05-07 08:46:40 -04:00
Rob Rix
4f69f5e3de Merge branch 'master' into scope-effects-to-evaluation 2018-05-06 22:50:04 -04:00
Rob Rix
f9ed9766fb Link the tests against fastsum. 2018-05-06 17:22:32 -04:00
Rob Rix
5f0d80a6b1 🔥 the Bad* modules. 2018-05-06 17:16:10 -04:00
Rob Rix
71d5eebbab 🔥 Erroring. 2018-05-06 16:44:04 -04:00
Rob Rix
dcb771a29e 🔥 the TypeChecking module. 2018-05-06 16:41:36 -04:00
Rob Rix
63269866fc Merge pull request #1811 from github/add-fastsum
Add the fastsum package as a dependency.
2018-05-06 15:23:37 -04:00
Rob Rix
30b8002394 🔥 Origin altogether. 2018-05-06 13:25:28 -04:00
Rob Rix
93895186cf Imagine there’s no MonadAnalysis.
It’s easy if you try.
2018-05-04 18:37:37 -04:00
joshvera
9883948abd Add BadLoads 2018-05-03 19:53:36 -04:00
Timothy Clem
07399487fd Ability to get nodejs resolution info out of package.json files 2018-05-03 16:14:54 -07:00
joshvera
4ea1b7cf1a Stub a way to look up packages in python with a PythonPackage analysis 2018-05-03 13:32:31 -04:00
Patrick Thomson
b6f8853d5b Add the fastsum package as a dependency. 2018-05-02 15:59:22 -04:00
Rob Rix
50a3fecfe3 Rename our Union type to Sum. 2018-05-02 11:25:44 -04:00
Rob Rix
171d349eee Define our own Union type. 2018-05-02 10:59:30 -04:00
joshvera
19f0672f34 Separate import graphs into call graph and import graph analyses 2018-05-01 18:10:25 -04:00
joshvera
1f2e234549 Add CallGraph 2018-05-01 17:51:24 -04:00
Ayman Nadeem
b1c05d6755 Merge remote-tracking branch 'origin/master' into java-assignment 2018-05-01 10:57:21 -07:00
Rob Rix
013b5cb4b7 Merge branch 'master' into analyses-provide-and-handle-effects 2018-04-30 14:22:09 -04:00
Timothy Clem
da89a11fae Introduce place to put all these directives 2018-04-26 13:43:49 -07:00
Rob Rix
2066b33aaf Rename Empty to Lower. 2018-04-25 18:25:02 -04:00
Rob Rix
2267f24ea8 Merge branch 'master' into analyses-provide-and-handle-effects 2018-04-25 16:43:00 -04:00
Rob Rix
6646c8ca27 Rename Quietly to BadSyntax. 2018-04-25 15:44:44 -04:00
Patrick Thomson
35a85e6a06 Merge branch 'master' into resumable-type-errors 2018-04-25 15:19:36 -04:00
Timothy Clem
2da5acf57a Add ability to exclude directories from globbing 2018-04-25 09:55:05 -07:00
Rob Rix
0b0bd2a1a8 🔥 Control.Effect.Fresh in favour of Control.Monad.Effect.Fresh. 2018-04-25 10:40:58 -04:00
Rob Rix
1cedeac8e1 Move Erroring into its own module. 2018-04-24 18:44:23 -04:00
Patrick Thomson
89c1403f89 WIP 2018-04-24 14:12:28 -04:00
Timothy Clem
156246e477 Finding a need for a File datatype 2018-04-20 11:10:27 -07:00
joshvera
04428df6bd Return holes from uninitialized address errors 2018-04-19 13:12:51 -04:00
Timothy Clem
42f680fc47 Merge remote-tracking branch 'origin/fix-graph-errors' into typescript-graphs 2018-04-17 14:24:41 -07:00
Timothy Clem
8120b2af73 Merge remote-tracking branch 'origin/master' into typescript-graphs 2018-04-17 14:24:10 -07:00
Timothy Clem
95b7fd5888 Resolve module import paths that walk up directory structure (e.g. ../) 2018-04-17 14:13:01 -07:00
joshvera
3a19dae1f9 Add a Declarations class 2018-04-17 16:25:11 -04:00
Charlie Somerville
560642579f add Data.Empty typeclass 2018-04-17 16:31:08 +10:00
Ayman Nadeem
65b0afa477 Merge remote-tracking branch 'origin/master' into java-assignment 2018-04-10 14:06:07 -07:00
Rob Rix
d863d282b1 🔥 the Mergeable spec. 2018-04-09 16:38:28 -04:00
Rob Rix
bfd2c6b210 🔥 Data.Align.Generic. 2018-04-09 16:18:12 -04:00
Timothy Clem
bf5af4ec21 Move to Graph.hs 2018-04-09 10:57:12 -07:00
joshvera
1f441ec518 Merge remote-tracking branch 'origin/master' into repo-import-graph 2018-04-05 19:50:59 -04:00
Rob Rix
98084c5e81 Merge branch 'master' into task-in-eff 2018-04-05 09:18:32 -04:00
Rob Rix
9dc1d6e5f8 🔥 Semantic. 2018-04-04 15:43:46 -04:00
Patrick Thomson
faf246ff1e Merge remote-tracking branch 'origin/master' into fix-scientific-parsing 2018-04-04 15:40:51 -04:00
Rob Rix
8ae61645f8 Rename Semantic.Command.{Diff,Parse} to Semantic.{Diff,Parse}. 2018-04-04 15:17:01 -04:00
Rob Rix
113bbd1ed9 Merge branch 'master' into task-in-eff 2018-04-04 15:05:28 -04:00
Rob Rix
a5dd989db2 Stub in separate parse/diff command modules. 2018-04-04 13:14:25 -04:00
joshvera
7dd6bb1865 Merge remote-tracking branch 'origin/module-resolution' into repo-import-graph 2018-04-04 13:03:21 -04:00
Timothy Clem
a34cc8766f Merge remote-tracking branch 'origin/master' into module-resolution 2018-04-04 09:42:39 -07:00
Rob Rix
2d521ecaa6 Merge branch 'master' into task-in-eff 2018-04-04 11:58:58 -04:00
Rob Rix
ca87d9cff9 Move the Telemetry effect into its own module. 2018-04-04 11:23:32 -04:00
Rob Rix
6dd7dd78c1 Sort the modules. 2018-04-04 11:23:21 -04:00
Rob Rix
8a6d9bd879 Move Distribute into its own module. 2018-04-04 11:23:13 -04:00
Patrick Thomson
45a411f6ba Merge remote-tracking branch 'origin/master' into fix-scientific-parsing 2018-04-04 10:11:59 -04:00
joshvera
c759c065be Add another analysis to recover from RubyError 2018-04-03 19:59:39 -04:00
Patrick Thomson
c36256e943 Standardize and fix floating-point parsing.
The existence of #1705 showed me that it's time to remove the bandaid
of a fix that was `normalizeFloatString` in #1537. This patch
introduces a proper Attoparsec parser for Scientific values that
handles the vaguaries of cross-language floating-point syntax. We
already depended on Attoparsec indirectly, so adding it as an explicit
dependency is fine.

A unit test is included, with examples taken from the tree-sitter corpora.
2018-04-03 17:02:56 -04:00
joshvera
bc91a5f320 Merge remote-tracking branch 'origin/module-resolution' into repo-import-graph 2018-04-03 16:35:33 -04:00
joshvera
7b9de5d151 Merge remote-tracking branch 'origin/master' into repo-import-graph 2018-04-03 16:19:22 -04:00
Timothy Clem
208d16e131 Disable import-graph specs for now 2018-04-03 10:12:20 -07:00
Rob Rix
37cc2e36bb 🔥 Control.Effect.NonDet. 2018-04-02 10:14:57 -04:00
Rob Rix
228ec0ea59 Stub in a module for a package abstraction. 2018-03-30 11:34:42 -04:00
Rob Rix
366120bd24 Stub in a module for an Origin datatype. 2018-03-29 23:08:59 -04:00
Rob Rix
5ee3bf001e Merge branch 'simpler-analysis-types' into symbol-resolution 2018-03-29 20:00:01 -04:00
Rob Rix
fb38332849 Stub in a module for located names/values/whatever. 2018-03-29 09:00:25 -04:00
joshvera
233f7abfbd Add BadValues analysis 2018-03-28 17:42:11 -04:00
joshvera
e8db080923 Merge remote-tracking branch 'origin/master' into less-fail 2018-03-28 13:12:20 -04:00
joshvera
9043193e13 Merge remote-tracking branch 'origin/master' into less-fail 2018-03-28 12:01:58 -04:00
Josh Vera
6bb737c18f Merge branch 'master' into combined-state-effects 2018-03-28 11:56:17 -04:00
Josh Vera
c79f178fc1 Merge branch 'master' into matching 2018-03-28 11:45:57 -04:00
Rob Rix
5ae24ddc89 Merge branch 'master' into combined-state-effects 2018-03-28 08:33:19 -04:00
Charlie Somerville
3fe504c97e add BadVariable analysis catching FreeVariableError 2018-03-28 12:06:33 +11:00
Patrick Thomson
034bb562d4 Introduce tree-automata DSL for filtering and matching ASTs.
This patch adds the `Matcher` monad, which is capable of filtering any
recursive data structure, bottom-up, yielding a list of (or an
optional) result. These functions are probably going to be used over
`Term` values, so API is provided to wrap common projection functions.

The API was more or less copied directly from that of Clang's AST
matching facilities.

There are a lot of things we can do in the future:
* Binding results yielded in matchers to associated names, for future
  transformation stages to look up and modify.
* Actual transformation stages.
* Optimizations. This is not very fast.

A million thanks to @robrix, whose sage advice managed to turn my
kooky idea for an API into something really special and exciting.
2018-03-27 16:14:30 -04:00
Rob Rix
d596b0a7c6 🔥 the dependency on TH. 2018-03-27 15:01:35 -04:00
Timothy Clem
724d8f38aa Fix up pulling out go package name for import rendering 2018-03-26 12:02:27 -07:00
joshvera
859c4702b0 Merge remote-tracking branch 'origin/master' into default-typeapplications 2018-03-26 13:18:21 -04:00
Rob Rix
58b6c5ab04 Make lenses for EvaluatingState. 2018-03-26 13:13:59 -04:00
joshvera
126cdc5285 Make typeapplications a default extension 2018-03-26 12:00:19 -04:00
Rob Rix
44f03209c4 Stub in a module for a quiet analysis. 2018-03-26 10:02:20 -04:00
Rob Rix
598c02ce21 Merge branch 'master' into imports,-graphed 2018-03-26 09:46:08 -04:00
Rob Rix
b221649b75 Merge branch 'master' into evaluate-in-the-outer-analysis 2018-03-26 09:40:42 -04:00
Rob Rix
2e228604cf Merge branch 'master' into imports,-graphed 2018-03-24 00:35:50 -04:00
Josh Vera
745eb85ee7 Merge branch 'master' into preludes-and-subclassing 2018-03-23 15:26:41 -04:00
Rob Rix
85650c06df Merge branch 'master' into imports,-graphed 2018-03-23 15:26:11 -04:00
Rob Rix
9c0b5f7ab6 Merge branch '🔥-ghc-mod' into imports,-graphed 2018-03-23 10:26:13 -04:00
Josh Vera
7792356012 Merge branch 'master' into default-extensions 2018-03-22 15:43:31 -04:00
Patrick Thomson
1e2fc5f6d3 Merge remote-tracking branch 'origin/master' into preludes-and-subclassing 2018-03-22 12:50:16 -04:00
Josh Vera
3ef6366649 Merge branch 'master' into php-namespaces 2018-03-22 12:23:57 -04:00