1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
Commit Graph

20155 Commits

Author SHA1 Message Date
Rob Rix
1c03f9c4d9 Define a Location instance for Located. 2018-03-29 09:31:45 -04:00
Rob Rix
438c19dd50 Derive Eq, Ord, & Show instances for LocatedValue. 2018-03-29 09:31:08 -04:00
Rob Rix
e51d095372 Derive Eq, Ord, & Show instances for Located. 2018-03-29 09:30:48 -04:00
Rob Rix
8de38e0f73 Spell out Provenance’s definition. 2018-03-29 09:30:39 -04:00
Rob Rix
f85cf50f7a Define an AbstractValue instance for LocatedValue. 2018-03-29 09:28:32 -04:00
Rob Rix
3466a6d3ff Define a LocatedValue value type. 2018-03-29 09:28:20 -04:00
Rob Rix
6850aba2a4 Define a Located location type. 2018-03-29 09:28:07 -04:00
Rob Rix
d49bc17aa7 Define LocationFor as an associated type family on an AbstractValue typeclass. 2018-03-29 09:18:10 -04:00
Rob Rix
095ece3182 Define a Location typeclass of which Cell is an associated type. 2018-03-29 09:07:53 -04:00
Rob Rix
9ce0fb1fef Define Cell as an open type family. 2018-03-29 09:05:55 -04:00
Rob Rix
49a74de758 We don’t need injectivity for Cell. 2018-03-29 09:04:50 -04:00
Rob Rix
aa233f17e1 Note that we’ll need to handle dependencies. 2018-03-29 09:01:20 -04:00
Rob Rix
cebcd5daaa Add a type synonym for the provenance of a symbol. 2018-03-29 09:00:48 -04:00
Rob Rix
fb38332849 Stub in a module for located names/values/whatever. 2018-03-29 09:00:25 -04:00
joshvera
281af6e231 hlint 2018-03-28 13:19:16 -04:00
joshvera
e8db080923 Merge remote-tracking branch 'origin/master' into less-fail 2018-03-28 13:12:20 -04:00
joshvera
af0793a7ad Add Eq1 error instances and fix tests 2018-03-28 12:58:12 -04:00
Josh Vera
4b751034a5 Merge pull request #1687 from github/combined-state-effects
Combined State effects
2018-03-28 12:02:29 -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
c27633534a Merge pull request #1688 from github/matching
Introduce tree-automata DSL for filtering and matching ASTs.
2018-03-28 11:56:08 -04:00
Josh Vera
c79f178fc1 Merge branch 'master' into matching 2018-03-28 11:45:57 -04:00
Josh Vera
7c59ff0344 Merge pull request #1693 from github/merge-newer
s/overwritingUnion/mergeNewer
2018-03-28 11:45:47 -04:00
Timothy Clem
fa53d2e080 s/overwritingUnion/mergeNewer 2018-03-28 08:33:06 -07:00
Patrick Thomson
c4a408eb90 Move embedTerm to Data.Algebra. It's useful. 2018-03-28 10:07:01 -04:00
Rob Rix
1d3c09a9d2 Use .= to define localEvaluatingState. 2018-03-28 08:56:02 -04:00
Rob Rix
5ae24ddc89 Merge branch 'master' into combined-state-effects 2018-03-28 08:33:19 -04:00
Rob Rix
f7afd2c4b4 Only reset a single field using localEvaluatingState. 2018-03-28 08:22:04 -04:00
Rob Rix
e1dabed456 Derive Eq, Ord, & Show instances for EvaluatingState. 2018-03-28 07:56:11 -04:00
Charlie Somerville
713e0f1301 add evaluateRubyBadVariables helper function in Semantic.Util 2018-03-28 12:06:47 +11:00
Charlie Somerville
3fe504c97e add BadVariable analysis catching FreeVariableError 2018-03-28 12:06:33 +11:00
Charlie Somerville
d5baf53ebd throw FreeVariableError rather than failing in identifier eval 2018-03-28 11:24:58 +11:00
Charlie Somerville
b1a195f7e7 add EvalError type with FreeVariableError constructor 2018-03-28 11:24:37 +11:00
Charlie Somerville
7abffcf7bc rename EvalError type to LoadError 2018-03-28 11:12:38 +11:00
Timothy Clem
ea28aee67e Merge pull request #1684 from github/you-get-a-namespace
Ruby modules also behave like namespaces
2018-03-27 16:03:01 -07:00
Timothy Clem
5c1e5514f7 Merge branch 'master' into you-get-a-namespace 2018-03-27 15:40:30 -07:00
Timothy Clem
3d56947e82 Fix typos 2018-03-27 15:18:38 -07:00
joshvera
4eaffa9f49 Catch LoadErrors in ImportGraph analysis and inject them into the Import Graph 2018-03-27 17:00:25 -04:00
joshvera
9ca6b66665 hide catchError 2018-03-27 16:59:51 -04:00
joshvera
ac14425fdc Add an evaluateRubyImportGraph function 2018-03-27 16:59:40 -04:00
joshvera
ff54bb7475 Export Resumable from Analysis 2018-03-27 16:59:23 -04:00
Patrick Thomson
89be1f1f1f kind signatures not needed 2018-03-27 16:35:38 -04:00
Patrick Thomson
85d064bf95 Merge remote-tracking branch 'origin/master' into matching 2018-03-27 16:34:31 -04:00
Patrick Thomson
97df7beba1 fix lints 2018-03-27 16:34:09 -04:00
joshvera
a3399f92f5 remove FreeVariableError for now 2018-03-27 16:17:38 -04: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
joshvera
68423dd298 Store enough information in LoadError 2018-03-27 16:11:43 -04:00
Rob Rix
bf2bab5255 Modify the state strictly. 2018-03-27 15:41:43 -04:00
Rob Rix
107274d4dd 🔥 some redundant imports. 2018-03-27 15:25:57 -04:00
Rob Rix
e9cac9d0c2 🔥 find*, in favour of EvaluatingState fields. 2018-03-27 15:24:28 -04:00