Rob Rix
97400fba94
Define a class abstracting DOT graphing.
2019-10-01 15:24:21 -04:00
Rob Rix
0cc79bb866
Define a class abstract s-expression serialization.
2019-10-01 15:23:13 -04:00
Rob Rix
2f77374b9b
Define a class abstracting term showing.
2019-10-01 15:21:58 -04:00
Rob Rix
12a07c252b
Factor the parse out of dotGraphTerm.
2019-10-01 15:15:53 -04:00
Rob Rix
8c6bf14d8f
Factor the parse out of showTerm.
2019-10-01 15:13:34 -04:00
Rob Rix
41a61e37ad
Specialize sexpTerm to Term.
2019-10-01 15:11:49 -04:00
Rob Rix
197ffdd404
Refactor sexpTerm to eliminate the parse.
2019-10-01 15:09:22 -04:00
Rob Rix
e727b3c81b
Eliminate the terms directly in doParse.
2019-10-01 15:05:19 -04:00
Rob Rix
19ac4d2c9a
Align the blobs.
2019-10-01 15:02:09 -04:00
Rob Rix
6f5e2ff8e4
Eliminate the term directly in doParse.
2019-10-01 15:00:33 -04:00
Rob Rix
a060a15d43
Align all the blobs.
2019-10-01 14:56:36 -04:00
Rob Rix
710173303e
Reformat the doParse signature.
2019-10-01 14:54:49 -04:00
Rob Rix
5e1b21c773
Export ToSExpression.
2019-10-01 13:00:38 -04:00
Rob Rix
13e3788422
Reformat the signature for doParse.
2019-10-01 12:53:47 -04:00
Rob Rix
02f46c650d
Define TermConstraints as a class.
2019-10-01 12:52:42 -04:00
Rob Rix
7aaaa6433c
🔥 redundant parens.
2019-10-01 12:47:40 -04:00
Rob Rix
cca474b0e9
🔥 the Declarations1 obligation.
2019-10-01 12:46:43 -04:00
Rob Rix
5c6df16782
Move SomeTerm/withSomeTerm into Semantic.Api.Terms.
2019-10-01 12:45:01 -04:00
Rob Rix
a97e42a19e
Simplify the Traversable obligation down to just Foldable/Functor.
2019-10-01 12:42:56 -04:00
Rob Rix
5de3d14bcc
🔥 the HasTextElement & Taggable obligations from TermConstraints.
2019-10-01 12:39:55 -04:00
Rob Rix
05e0086c82
Factor out the term construction.
2019-10-01 12:38:59 -04:00
Rob Rix
598dce7fc8
🔥 ParseEffects.
2019-10-01 12:35:06 -04:00
Rob Rix
0f8da488b0
Don’t specialize parseSymbols for the PerLanguageModes.
2019-10-01 12:33:26 -04:00
Rob Rix
152e94a844
doParse handles the PerLanguageModes.
2019-10-01 12:32:13 -04:00
Rob Rix
785d52314a
Copy in our own version of doParse & SomeTerm.
2019-10-01 12:29:56 -04:00
Rob Rix
11091cf249
Generalize renderToSymbols for legacy tagging.
2019-10-01 12:14:40 -04:00
Rob Rix
371e0c0945
renderToSymbols is pure.
2019-10-01 12:11:52 -04:00
Rob Rix
f9c20bc462
Use ToTags for the legacy tagging API as well.
2019-10-01 12:10:51 -04:00
Rob Rix
f092a3017c
Parameterize ALaCarteTerm by the symbols to summarize.
2019-10-01 12:10:38 -04:00
Rob Rix
7259059b51
Combine the code paths.
2019-10-01 12:01:04 -04:00
Rob Rix
44b0614c7d
Define renderToSymbols using renderPreciseToSymbols.
2019-10-01 11:59:26 -04:00
Rob Rix
a43e947104
Render à la carte terms to symbols via ToTags.
2019-10-01 11:58:40 -04:00
Rob Rix
09f95d6cec
Define a helper to provide a ToTags instance for à la carte terms.
2019-10-01 11:58:04 -04:00
Rob Rix
1bc251183e
Generalize renderPreciseToSymbols to any term with a ToTags instance.
2019-10-01 11:57:00 -04:00
Rob Rix
937df795a1
Don’t pass the blob into runTagging.
2019-10-01 11:54:38 -04:00
Rob Rix
de5de5f936
Don’t pass the blob into contextualizing.
2019-10-01 11:51:28 -04:00
Rob Rix
e9fc6122c4
Don’t pass the blob into tagging.
2019-10-01 11:50:30 -04:00
Rob Rix
c0ecbb12b6
🔥 SomeParser.
...
It’s unused.
2019-10-01 11:31:16 -04:00
Rob Rix
2432ba82b9
Merge branch 'master' into semantic-java
2019-09-30 19:02:50 -04:00
Rob Rix
e19dc31c1e
Merge branch 'master' into parse-effect
2019-09-30 18:13:32 -04:00
Rob Rix
ddf5087fe2
📝 the Parse carrier modules.
2019-09-30 18:00:07 -04:00
Rob Rix
5b556eea3f
None of this did either.
2019-09-30 17:38:14 -04:00
Rob Rix
b37a8ae61c
None of this actually needed the TaskSession.
2019-09-30 17:37:07 -04:00
Rob Rix
58f23c0b7f
🔥 the TaskSession.
2019-09-30 17:23:32 -04:00
Rob Rix
6dc389fa34
.
2019-09-30 17:22:43 -04:00
Rob Rix
f1caf6beec
Pass the error up.
2019-09-30 17:20:35 -04:00
Rob Rix
9652ec9734
🔥 the Trace effect.
2019-09-30 17:19:46 -04:00
Rob Rix
b005ffb447
Don’t trace in Parsing.TreeSitter.
2019-09-30 17:14:11 -04:00
Rob Rix
9bd8ab260e
🔥 runAssignment.
2019-09-30 17:06:09 -04:00
Rob Rix
9295789b1d
🔥 a constructor we don’t check for.
2019-09-30 17:02:42 -04:00
Rob Rix
ee01643117
🔥 a bunch of redundant effects from the repl.
2019-09-30 17:00:49 -04:00
Rob Rix
8dcf0bef24
Use the simple carrier in util and the repl.
2019-09-30 16:57:51 -04:00
Rob Rix
afc4e46942
Simplify the simple carrier.
2019-09-30 16:57:42 -04:00
Rob Rix
b1832108ed
🔥 timings for most parsers.
2019-09-30 16:35:40 -04:00
Rob Rix
20e5bdd960
Duplicate the parse carrier.
2019-09-30 16:34:21 -04:00
Rob Rix
a99ef5f855
Rename Semantic.Parse to Control.Carrier.Parse.Measured.
2019-09-30 16:32:50 -04:00
Rob Rix
b783f94a32
Import just the effect where possible.
2019-09-30 16:32:37 -04:00
Rob Rix
d181a6228a
Move the Parse effect into its own module.
2019-09-30 16:26:52 -04:00
Rob Rix
001f47b42d
Stub in a module for the Parse effect.
2019-09-30 16:25:35 -04:00
Rob Rix
dc3a11c9ee
🔥 a redundant constraint.
2019-09-30 16:24:31 -04:00
Rob Rix
74acafecf8
Move the parse effect & carrier into Semantic.Parse.
2019-09-30 16:23:13 -04:00
Rob Rix
43b4de5b37
Simplify the errors helper.
2019-09-30 16:07:43 -04:00
Rob Rix
199372d0f3
Serializing requires only the config.
2019-09-30 16:00:21 -04:00
Rob Rix
e4587c6cb5
Add a Reader effect for the config alone.
2019-09-30 15:56:48 -04:00
Rob Rix
9e183cd46b
Rename TaskEff to TaskC.
2019-09-30 15:54:57 -04:00
Rob Rix
f1b4fa870b
🔥 TaskC.
2019-09-30 15:50:53 -04:00
Rob Rix
ab3d366471
🔥 Task.
2019-09-30 15:49:46 -04:00
Rob Rix
54f1bacbd2
Just call diffTermPair directly.
2019-09-30 15:49:38 -04:00
Rob Rix
6ebfb5c9ac
🔥 runTaskF.
2019-09-30 15:42:01 -04:00
Rob Rix
b5177fc94e
🔥 Serialize.
2019-09-30 15:39:23 -04:00
Rob Rix
17f4226eea
🔥 render.
2019-09-30 15:33:14 -04:00
Rob Rix
884fb7c909
🔥 Render.
2019-09-30 15:30:55 -04:00
Rob Rix
ae40db0ab5
🔥 decorate.
2019-09-30 15:29:10 -04:00
Rob Rix
b298e3a42c
Rearrange slightly.
2019-09-30 15:22:54 -04:00
Rob Rix
c06a7807c7
🔥 Decorate.
2019-09-30 15:22:09 -04:00
Rob Rix
626777b190
Split parsing out of Task.
2019-09-30 15:20:30 -04:00
Rob Rix
08601d17db
Extract errors & runAssignment to the top level.
2019-09-30 14:42:09 -04:00
Patrick Thomson
896024902c
Merge branch 'master' into abolish-the-handle-binary
2019-09-30 14:40:20 -04:00
Rob Rix
af33c0865d
Export the Parse carrier.
2019-09-30 14:35:27 -04:00
Rob Rix
7a7228636e
🔥 redundant constraints.
2019-09-30 14:32:55 -04:00
Rob Rix
7c91a7d08f
Define a parse carrier.
2019-09-30 14:29:39 -04:00
Rob Rix
856189ed15
Define a smart constructor for parse.
2019-09-30 14:28:40 -04:00
Rob Rix
bba02fe178
Define an Effect instance for Parse.
2019-09-30 14:27:31 -04:00
Rob Rix
fca3027fc7
Define an HFunctor instance for Parse.
2019-09-30 14:27:24 -04:00
Rob Rix
ef05ef941a
Derive a Functor instance for Parse.
2019-09-30 14:27:15 -04:00
Rob Rix
a91b6c1e49
Define a Parse effect.
2019-09-30 14:27:07 -04:00
Rob Rix
1dbc84d122
Stub in a module for a parse effect.
2019-09-30 14:25:51 -04:00
Rob Rix
90306d439c
Merge branch 'master' into semantic-java
2019-09-30 14:21:13 -04:00
Rob Rix
fb1e99e6a7
📝 the Send/Call thing.
2019-09-30 14:03:46 -04:00
Patrick Thomson
d7b76d3be4
Don't set the handles to binary mode.
2019-09-29 18:57:35 -04:00
Rob Rix
76cb8480a0
Use the correct parser.
2019-09-27 19:51:45 -04:00
Rob Rix
f03000a6fb
Generalize renderPreciseToSymbols.
2019-09-27 19:42:37 -04:00
Rob Rix
9585226bb7
Add precise tagging support for Java.
2019-09-27 19:09:09 -04:00
Rob Rix
c81f9660f4
Define a precise Java parser.
2019-09-27 19:08:14 -04:00
Rob Rix
5db7c6a6ee
Rename the import of Language.Python.
2019-09-27 19:07:05 -04:00
Rob Rix
ac0f15103f
Add a field for a Java mode.
2019-09-27 19:06:19 -04:00
Rob Rix
1ec65b4858
Define a constructor for the default language modes.
2019-09-27 19:02:14 -04:00
Rob Rix
a415d856d7
Merge branch 'master' into semantic-tags
2019-09-27 17:31:26 -04:00
Patrick Thomson
65060868bc
Make benchmarks operate and switch to gauge
.
...
I find myself wanting to benchmark some I/O code, so I decided to look
at our benchmark suite, to find that it had bitrotted somewhat. This
patch brings it back up to working status, switches to `gauge` (which
is more accurate than `criteron` and incurs fewer dependencies), and
sprinkles some typed paths on there.
2019-09-27 13:18:30 -04:00
Rob Rix
cf1320586d
🔥 Data.Tag.
2019-09-27 12:04:24 -04:00
Rob Rix
b99366fc37
Tag using the precise AST when requested.
2019-09-27 11:56:45 -04:00
Rob Rix
e25d5e1d7d
Perform renderToSymbols out of the monad.
2019-09-27 11:53:31 -04:00
Rob Rix
958c66a275
Use Tags.Tag.
2019-09-27 11:49:16 -04:00
Rob Rix
3659912e41
Tags always have a line.
2019-09-27 11:34:08 -04:00
Rob Rix
65eed49ecc
slice/firstLine are total.
2019-09-27 11:33:13 -04:00
Rob Rix
bbb583de55
ContextTokens always have Ranges.
2019-09-27 11:30:33 -04:00
Rob Rix
376ea3e165
Tokens always have Ranges.
2019-09-27 11:28:14 -04:00
Rob Rix
53f3e5e9cc
🔥 the context field from Data.Tag.Tag.
2019-09-27 11:17:41 -04:00
Rob Rix
ed85a4483f
🔥 the HasSpan instance for Tag.
2019-09-27 11:16:14 -04:00
Rob Rix
7406910b4a
🔥 the ToJSON instance for Tag.
2019-09-27 11:15:26 -04:00
Rob Rix
661e582794
Pull symbolsToSummarize & tagToSymbol out to the top level.
2019-09-27 11:00:48 -04:00
Rob Rix
4a1b8e80c0
Reformat slightly.
2019-09-27 10:59:55 -04:00
Rob Rix
cf940ff595
precisePythonParser produces a Py.Term.
2019-09-27 10:53:26 -04:00
Rob Rix
9b704006b4
🔥 an obsolete pragma.
2019-09-27 10:49:20 -04:00
Rob Rix
3fafa4f556
Tidy up with type applications.
2019-09-27 10:45:59 -04:00
Rob Rix
6a40b9a6cd
🔥 a redundant Element constraint.
2019-09-27 10:45:12 -04:00
Rob Rix
0c3e754eea
Alignment.
2019-09-27 10:43:31 -04:00
Rob Rix
e84da318a3
🔥 ApplyAll'.
2019-09-27 10:43:11 -04:00
Rob Rix
ed7d152169
Use the shared blobLanguage computation.
2019-09-27 10:41:22 -04:00
Rob Rix
6538f4d885
Revert "Bring the language modes into scope."
...
This reverts commit 8ca3d7b277
.
2019-09-27 10:40:37 -04:00
Rob Rix
3058646b44
Update for * -> * Unmarshal.
2019-09-27 10:36:56 -04:00
Rob Rix
fe349fc3f0
Merge branch 'master' into semantic-tags
2019-09-27 10:00:56 -04:00
Rob Rix
374dae0229
🔥 a redundant language extension.
2019-09-27 09:57:12 -04:00
Timothy Clem
15cd4857ce
Remove FILE:LANG argument from CLI
2019-09-26 14:17:24 -07:00
Rob Rix
8ca3d7b277
Bring the language modes into scope.
2019-09-26 14:04:46 -04:00
Rob Rix
3c564eb7a5
Add a FIXME.
2019-09-26 13:51:33 -04:00
Rob Rix
a17a53fb19
Turn off orphan instance warnings in Parsing.Parser.
2019-09-26 13:50:58 -04:00
Rob Rix
f4d89746d1
Define a precise Python parser.
2019-09-26 13:50:20 -04:00
Rob Rix
ead0253c73
Define orphan Unmarshal instances for Loc, Span, and Range.
2019-09-26 13:49:45 -04:00
Rob Rix
94f6f8e29f
Define an UnmarshalParser constructor.
2019-09-26 13:27:19 -04:00
Rob Rix
957f8abdd4
Add a helper to parse to precise ASTs.
2019-09-26 13:24:24 -04:00
Rob Rix
8210639d35
Allow the action to report failures.
2019-09-26 13:23:49 -04:00
Rob Rix
a74490cc15
Factor the conditional leftward.
2019-09-26 13:03:40 -04:00
Rob Rix
07ddc7699e
Kleisli composition.
2019-09-26 12:58:40 -04:00
Rob Rix
d4eefbf04b
Factor the action-agnostic portion of parseToAST into a runParse function.
2019-09-26 12:57:15 -04:00
Rob Rix
661805e6da
withRootNode already copies into the pointer.
2019-09-26 12:54:20 -04:00
Rob Rix
7c40ca0753
Correct the docs for parseToAST.
2019-09-26 12:51:10 -04:00
Rob Rix
81fca0f6bb
🔥 runParserToAST.
2019-09-26 12:50:35 -04:00
Rob Rix
3f4c89d09b
Return errors from runParseToAST.
2019-09-26 12:47:33 -04:00
Rob Rix
2745c69aa1
Rely on the TS definition of withParser.
2019-09-26 12:45:50 -04:00
Rob Rix
c399f0d637
Use withParser to define parseToAST.
2019-09-26 12:35:21 -04:00
Rob Rix
b563f20edb
Define a helper to run an action with a parser.
2019-09-26 12:25:22 -04:00
Rob Rix
0b0b2ef427
🔥 Result.
2019-09-26 12:20:25 -04:00
Rob Rix
aafe9f47bc
Reformat an if statement.
2019-09-26 12:19:02 -04:00
Rob Rix
1a05c46bf0
Dedent.
2019-09-26 12:17:59 -04:00
Rob Rix
c8baf4a4ba
🔥 more do blocks.
2019-09-26 12:17:50 -04:00
Rob Rix
fc6d4091d6
Spacing.
2019-09-26 12:17:18 -04:00
Rob Rix
70c9b865f0
🔥 redundant do blocks.
2019-09-26 12:16:45 -04:00
Rob Rix
726329d659
Rename runParser to runParserToAST.
2019-09-26 12:16:05 -04:00
Rob Rix
a05f91cede
Pass the language mode around with a Reader effect.
2019-09-25 11:55:31 -04:00
Rob Rix
44f9a11a62
Define a helper to look up the mode for a given language.
2019-09-25 11:48:07 -04:00
Rob Rix
b394bcd816
Pass the modes to parseSymbols.
2019-09-25 11:46:16 -04:00
Rob Rix
10093b1088
Pass the language modes to parseTermBuilder.
2019-09-25 11:43:17 -04:00
Rob Rix
f68c710a58
Pass the language modes to parseSymbolsBuilder.
2019-09-25 11:42:14 -04:00
Rob Rix
d066b31081
Fix the help text for the protobuf symbols output.
2019-09-25 11:38:42 -04:00
Rob Rix
b6ca57e87a
Combine the flags for JSON symbols output.
2019-09-25 11:38:24 -04:00
Rob Rix
58c5eac144
Rename the language mode types.
2019-09-25 11:34:08 -04:00
Rob Rix
d773ca8282
Move LanguageModes & ASTMode into Data.Language.
2019-09-25 11:32:57 -04:00
Rob Rix
95b83e983c
🔥 the completer.
...
It doesn’t seem to work anyway.
2019-09-25 11:20:38 -04:00
Rob Rix
ea6184367b
Reformat the Python mode parser.
2019-09-25 11:20:21 -04:00
Rob Rix
c7b611cc52
Define an option for the Python mode.
2019-09-25 11:19:42 -04:00
Rob Rix
2b650143cb
Derive Bounded & Enum instances for ASTMode.
2019-09-25 11:19:36 -04:00
Rob Rix
a20063353e
Derive a Read instance for ASTMode.
2019-09-25 10:48:38 -04:00
Rob Rix
fc153ec593
Define a datatype representing the selection of a mode for a given language.
2019-09-25 10:38:22 -04:00
Rob Rix
5f449f479e
Define a datatype representing the types of ASTs we can operate over.
2019-09-25 10:38:06 -04:00
Rob Rix
7ca39de45d
Merge branch 'master' into semantic-tags
2019-09-25 10:10:27 -04:00
Rob Rix
19e9d7f61b
Reformat the parse command flags.
2019-09-25 10:09:59 -04:00
Patrick Thomson
c0ba458d54
Merge branch 'master' into more-path-safety
2019-09-24 18:16:27 -04:00
Patrick Thomson
fa1f07bb1e
remove unnecessary Path.toString call
2019-09-24 17:49:32 -04:00
Patrick Thomson
9a6185e095
Make readBlobsFromDir use a typed path.
2019-09-24 17:03:45 -04:00
Timothy Clem
46fa12303b
Include real build sha in production logs
2019-09-24 13:23:37 -07:00
Patrick Thomson
a96a0e105a
Revert "Remove special case from Files.readBlobs."
...
This reverts commit 6fe879d908
.
2019-09-24 01:18:13 -04:00
Patrick Thomson
6fe879d908
Remove special case from Files.readBlobs.
2019-09-24 01:17:11 -04:00
Patrick Thomson
bcedb937db
Merge branch 'master' into speed-up-foldMapA
2019-09-21 08:56:52 -04:00
Rob Rix
918bfb4e24
Apparently this should not exist.
2019-09-20 17:56:29 -04:00
Rob Rix
52bc7e640e
Rename locByteRange/locSpan to byteRange/span.
2019-09-20 17:32:52 -04:00
Rob Rix
955174211c
Use point to define emptyTerm.
2019-09-20 17:04:03 -04:00
Rob Rix
0312300a40
Rename the spanStart/spanEnd fields to start/end.
2019-09-20 16:59:04 -04:00
Patrick Thomson
56e0c27846
Stray whitespace.
2019-09-20 16:52:34 -04:00
Patrick Thomson
aa61e7f565
We don't even need to define our own #.
2019-09-20 16:50:25 -04:00
Patrick Thomson
803817bc92
Whoops, forgot a plugin entry.
2019-09-20 16:47:07 -04:00
Rob Rix
7d1567e70a
🔥 a bunch of redundant hidden imports.
2019-09-20 16:45:12 -04:00
Patrick Thomson
8bf42329a4
Speed up foldMapA.
...
Some research in https://github.com/fused-effects/diffused-effects/pull/1
revealed that GHC sometimes fails to optimize newtype-unwrappers of
the foldMapA style sufficiently, and that you get better Core if you
rub some `coerce` on it. Since we use `foldMapA` in a lot of places,
this should have a positive impact.
2019-09-20 16:44:44 -04:00
Rob Rix
d59a44bc69
Rename the HasSpan span lens to span_.
2019-09-20 16:43:12 -04:00
Rob Rix
1e6ebd21a3
Rename posLine/posColumn to line/column.
2019-09-20 16:36:36 -04:00
Rob Rix
a00a78e522
Merge branch 'master' into semantic-source
2019-09-20 16:16:34 -04:00
Patrick Thomson
86682d8cfe
De-suffix sourceBytes.
2019-09-20 16:03:45 -04:00
Patrick Thomson
f0567fdd20
De-suffix dropSource and takeSource.
2019-09-20 15:56:43 -04:00
Patrick Thomson
a422061bbd
Delete Data.Source.
2019-09-20 15:52:00 -04:00
Patrick Thomson
7b599a6499
Use Source.Source instead of Data.Source.
2019-09-20 15:51:49 -04:00
Patrick Thomson
948deb489f
Fixup remaining test cases.
2019-09-20 15:47:08 -04:00
Patrick Thomson
d929a8c78a
Make Data.Source reexport Source.Source.
2019-09-20 15:39:39 -04:00
Rob Rix
f6e4864836
Move the span/range stuff into CMark.
2019-09-20 15:03:26 -04:00
Rob Rix
0f8e69c72f
Switch everything over to using Source.Loc.
2019-09-20 14:51:48 -04:00
Rob Rix
17c61c19d1
Switch everything over to using Source.Span.
2019-09-20 14:38:03 -04:00
Rob Rix
1d5e15010f
Switch everything over to using Source.Range.
2019-09-20 14:28:25 -04:00
Rob Rix
81f43c9881
Move the ToJSONFields instance for Location into Data.JSON.Fields.
2019-09-20 14:08:41 -04:00
Patrick Thomson
6f525467c8
Merge branch 'master' into typed-paths
2019-09-20 13:00:55 -04:00
Patrick Thomson
2e7a236f82
Fix weird spacing and overly complicated callGraphPythonProject.
2019-09-20 12:41:05 -04:00
Patrick Thomson
090b014eed
Remove filepath dependency from tests.
2019-09-20 12:26:49 -04:00