Rob Rix
87209d3eee
🔥 MiniPython & MiniRuby.
2019-06-05 17:05:14 -04:00
Rob Rix
eb6d12d661
Fail on incompatible parser versions.
2019-06-05 14:56:09 -04:00
joshvera
33e267151a
WIP
2019-06-05 14:17:12 -04:00
Patrick Thomson
9509ec37b8
absolutely massive patch that touches everything
2019-05-21 22:05:23 -04:00
Max Brunsfeld
d153b6090b
Remove redundant import
2019-03-19 10:40:32 -07:00
Max Brunsfeld
3249307ccd
Use Tree-sitter's built-in timeout API instead of a separate timeout thread
2019-03-18 16:30:15 -07:00
Rick Winfrey
8f57b5d08b
Don't need _ <-
pattern
2019-02-05 13:56:55 -08:00
Rick Winfrey
7b9ca2a0b0
Split over two lines
2019-02-05 10:43:16 -08:00
Rick Winfrey
3d125791ab
Wait and block on the async parsing thread
...
If we timeout an async parsing thread and return, but the parsing thread is still running, we can force a race condition in which we delete the parser before it's completed on the async thread. This patch blocks on the parsing thread until it is complete before we clean up the parser. But this might have unintended consequences for the downstream consumer (i.e. github/github).
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2019-02-04 16:23:36 -08:00
joshvera
41b8f0ae9c
Merge remote-tracking branch 'origin/master' into javascript-assignment-fixes
2019-02-04 10:21:27 -05:00
joshvera
f8fa4faa88
Merge remote-tracking branch 'origin/master' into javascript-assignment-fixes
2019-02-01 16:55:03 -05:00
Timothy Clem
d3a4377f3f
Merge branch 'master' into servant-experiment
2019-02-01 13:17:17 -08:00
Josh Vera
37ea776107
Merge branch 'master' into javascript-assignment-fixes
2019-02-01 09:19:35 -05:00
Rick Winfrey
9fd2e3e20f
Add pythonASTParser
2019-01-31 17:20:59 -08:00
joshvera
77b1e6f234
Add annotatedExpression to typescript
2019-01-31 16:07:19 -05:00
Timothy Clem
f14412fe8f
Merge remote-tracking branch 'origin/master' into servant-experiment
2019-01-31 12:57:59 -08:00
joshvera
611b453617
Add goASTParser
2019-01-31 10:49:19 -05:00
Timothy Clem
1faff05a2b
Remove some un-used code
2019-01-25 10:12:38 -08: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
Rob Rix
91e747db8d
🔥 the HasPostlude constraints on SomeAnalysisParser.
2018-10-25 11:49:45 -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
034e2469ff
Bump higher-order-effects.
2018-10-22 10:26:15 -04:00
Rob Rix
3ef2efa73a
Merge branch 'master' into higher-order-effects
2018-10-22 09:45:57 -04:00
Patrick Thomson
eb10ece4a7
lints
2018-10-21 15:35:18 -04:00
Patrick Thomson
d0c8fdf935
Fix massive slowdown when copying large AST nodes.
...
As per https://github.com/tree-sitter/haskell-tree-sitter/pull/67 , we
weren't using the right tree-sitter APIs to copy node children into a
Haskell-compatible data structure. This bumps tree-sitter-haskell and
adjusts the change in signature of ts_node_copy_child_nodes.
2018-10-21 15:19:38 -04:00
Patrick Thomson
d56badfb29
Use upstream Resource effect.
2018-10-16 20:11:38 -04:00
Rob Rix
c9e6912068
Port most of the system over to higher-order-effects.
2018-10-16 18:48:08 -04:00
Patrick Thomson
1dfb4981cc
warnings
2018-10-16 17:10:34 -04:00
Patrick Thomson
75bf696e47
Fix crash/race associated with bracket
( #2207 )
...
The bracket that I wrote inside effects does not properly handle
asynchronous exceptions, as it has no way to call the mask function.
As such, because the asynchronous exception is rethrown by both
`bracket` and `wait`, the exception handler will trigger twice. This
is what is causing the crash: `bracket` is passing the TSParser we
create in parseToAST to ts_parser_delete twice.
The best thing to do here is to create the new `Resource` effect,
which is interpreted down to `Control.Exception.bracket`, which has
the correct asynchronous-masking behavior, unlike the `bracket` in
`Control.Monad.Effect.Exception`, which I propose to remove in a patch
to `effects`.
This also bumps haskell-tree-sitter so that the
`ts_node_copy_child_nodes` function is considered `interruptible`.
To test:
1. Download [this file](https://gist.ghe.io/tclem/c2ffe3d20b248fdac59588aa98f168ae )
2. Run `TREE_SITTER_PARSE_TIMEOUT=1000 stack exec semantic -- --log-level=debug parse lexer.rb`
Before applying this patch, you will see a crash associated with a
double-free; afterwards, it should time out normally.
2018-10-16 17:05:29 -04: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
Timothy Clem
aea6e81ad7
This can use our timeout effect now
2018-09-14 14:01:15 -07:00
Timothy Clem
a6ce4f672f
Docs and sort out a common Duration datatype
2018-09-13 14:51:32 -07:00
Timothy Clem
f0d164f952
Rework control flow graph data types
2018-09-06 15:12:12 -07:00
Timothy Clem
4d8050d450
Clean up MiniRuby assignment naming
2018-08-28 09:13:56 -07:00
Timothy Clem
2c71853c39
Fix minipython parser
2018-08-28 09:13:43 -07:00
Timothy Clem
57f32c77bd
MiniRuby in its own module
2018-08-27 15:06:51 -07:00
Timothy Clem
8f6d1ee873
Merge branch 'master' into source-aware-reprinter
2018-08-23 07:47:48 -07:00
Timothy Clem
3e0a6b95cc
Lints, formatting, docs, cleanup
2018-08-22 13:35:40 -07:00
Patrick Thomson
7f5783abb0
Fix Haddock generation.
...
Bumps gRPC-haskell and removes an invalid (and unilluminating) comment.
To test, run `stack haddock --fast --open`.
2018-08-21 12:40:16 -04:00
Timothy Clem
1d751ef79a
Mini Ruby
2018-08-20 11:23:37 -07:00
Patrick Thomson
e33cc897a6
Haddock stuff.
2018-07-30 21:36:41 -04:00
Rob Rix
be526492ff
Generalize everything we can to PureEffects.
2018-07-23 11:02:54 -04:00
Timothy Clem
b4c6593a12
Capture method decls and identifiers as vertices
2018-07-17 15:15:28 -07:00
Rick Winfrey
d3c4f82241
Merge branch 'master' into module-exports
2018-07-11 14:03:17 -07:00
Rick Winfrey
c9f12de7d1
Add HasPostlude constraints
...
Co-Authored-By: Rob Rix <rob.rix@github.com>
2018-07-10 14:38:51 -07:00
Rob Rix
98cc30705d
Bump effects for https://github.com/joshvera/effects/pull/55 .
2018-07-10 12:53:56 -04:00
Timothy Clem
205a54514e
Little more detail on tree-sitter parse tracing
2018-07-06 10:41:06 -07:00
Rob Rix
ddbd2690bb
Merge branch 'master' into higher-order-effects
2018-07-04 10:53:04 -04:00
Rob Rix
c36f319a50
Merge branch 'master' into more-languages
2018-07-04 10:12:44 -04:00
Rob Rix
8152d01c6a
🔥 redundant parens.
2018-07-03 13:47:07 -04:00
joshvera
7eb207dace
Merge remote-tracking branch 'origin/master' into more-languages
2018-07-03 12:34:26 -04:00
Rob Rix
986b92c184
Define a JSON AST parser.
2018-07-03 10:44:40 -04:00
joshvera
46f6583504
Add support for JSON and TypeScript responses
2018-07-02 18:02:48 -04:00
Rob Rix
a84c920848
Roll toTerm into Assigning.
2018-06-29 20:13:34 -04:00
Rob Rix
bae6780460
Build an IntMap table.
2018-06-28 18:23:37 -04:00
Rob Rix
444a496899
Assign JSON deterministically.
2018-06-28 14:08:37 -04:00
Rob Rix
e6a97a929c
Add support for running deterministic assignments.
2018-06-28 14:08:27 -04:00
Rob Rix
d1ad4bef08
Merge branch 'master' into higher-order-effects
2018-06-26 09:48:11 -04:00
Rick Winfrey
03e291c52e
🔥 NBSP
2018-06-22 17:26:23 -07:00
Rob Rix
a4d8b481be
Merge branch 'master' into higher-order-effects
2018-06-21 10:11:59 -04:00
Rob Rix
e1f6a423c9
Allow the use of a separate JS prelude.
2018-06-18 15:19:39 -04:00
Rob Rix
d39171e9d7
Determine Preludes from the language.
2018-06-18 11:09:01 -04:00
Patrick Thomson
09ffcc0af1
Bump effects
version.
2018-06-15 11:12:08 -04:00
Rob Rix
9765160297
Lift IO to the right kind.
2018-06-12 15:26:38 -04:00
Ayman Nadeem
94e2c36657
sort deriving clauses
2018-06-05 10:28:42 -07:00
Patrick Thomson
c0f31c9531
fix warning
2018-06-04 18:46:05 -04:00
Patrick Thomson
6e273d8b6e
Fix lints
2018-06-04 18:31:53 -04:00
Patrick Thomson
6abb7b9a2a
tighten up some Maybes now that Unknown is a thing
2018-06-04 18:17:02 -04:00
Patrick Thomson
16066c1f7d
fewer spurious changes
2018-06-04 18:10:00 -04:00
Patrick Thomson
2a8e02856b
tentative commit to move from Maybe Language to Language.
...
should fix a lot of issues around decoding Maybe Language fields.
2018-06-04 14:54:30 -04:00
Ayman Nadeem
e030824d52
fix conflicts with new haskell additions
2018-05-31 15:32:10 -07:00
Rob Rix
44da174cf9
🔥 a couple more uses of Members.
2018-05-29 12:14:46 -04:00
Patrick Thomson
9b68986a93
warnings
2018-05-25 12:36:48 -04:00
Patrick Thomson
3e02366d14
don't use Eff in toAST
since it's just being called from IO.
2018-05-25 12:34:04 -04:00
Patrick Thomson
b2aa29e6c6
🔥 dbg and just use trace
.
2018-05-25 12:28:56 -04:00
Patrick Thomson
6bd6e71d75
Implement a correct bracket.
2018-05-25 11:37:16 -04:00
Patrick Thomson
0254ad676a
WIP: this works, but doesn't bracket or rethrow correctly.
2018-05-25 10:57:19 -04:00
Rick Winfrey
7bc88d088c
Boilerplate and minimal syntax for Haskell assignment
2018-05-23 11:32:15 -07:00
Patrick Thomson
dd23a2c513
Seconds -> milliseconds
2018-05-22 16:38:18 -04:00
Patrick Thomson
1721c67aa5
lint
2018-05-22 13:07:36 -04:00
Patrick Thomson
f2a55e5b0c
Switch to using timeout and running the parser asynchronously.
2018-05-22 13:03:37 -04:00
Patrick Thomson
1b2e9c9893
remove otiose lock and add explicit timeout
2018-05-22 12:45:07 -04:00
Patrick Thomson
cf04b5e602
avoid possible race condition
2018-05-22 11:41:18 -04:00
Patrick Thomson
4be15ea6bc
remove otiose C calls
2018-05-22 11:40:10 -04:00
Patrick Thomson
234e0bbc99
Add infrastructure for testing cancellation.
2018-05-22 11:17:04 -04:00
Patrick Thomson
d1618fe94d
Add what seems like correctly-working timeout functionality.
2018-05-22 11:01:23 -04:00
Rick Winfrey
a01ed11736
Restrict import of Foreign.C.Types to CBool type
2018-05-21 16:27:43 -07:00
Rick Winfrey
ae316a3d7c
Release TSTree after building the AST
2018-05-21 16:18:28 -07:00
Max Brunsfeld
1023097082
Update to use the new Tree-sitter API
...
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-21 12:57:24 -07:00
Ayman Nadeem
9bd78b4123
add typeclasses to deal with recent merge
2018-05-17 11:08:37 -07:00
Ayman Nadeem
8aad81b775
Merge branch 'master' into java-assignment
2018-05-17 10:42:00 -07:00
Timothy Clem
72917bc3e7
Stub out JavaScript prelude
2018-05-16 10:55:58 -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
fbb7b4ef60
Strengthen the constraints on ASTParser.
2018-05-14 13:00:36 -04:00
Rob Rix
d3fa821425
Redefine SomeParser as a constructor on Parser.
2018-05-11 16:59:27 -04:00
Rob Rix
f4eb1bbc2b
Define a helper to abstract over operations on SomeTerm.
2018-05-11 16:58:35 -04:00
Rob Rix
010a101de2
Define an existentially-quantified abstraction over term types.
2018-05-11 16:48:33 -04:00
Rob Rix
bcb889f85d
Use type applications to supply the list of typeclasses for someParser.
2018-05-11 16:43:53 -04:00
Rob Rix
e6c665ae36
Remove a redundant quantifier.
2018-05-11 15:52:14 -04:00
Rob Rix
4f69f5e3de
Merge branch 'master' into scope-effects-to-evaluation
2018-05-06 22:50:04 -04:00
Rob Rix
ebc8e01cc4
Use our own local definition of Sum.
2018-05-02 12:00:15 -04:00
Ayman Nadeem
b1c05d6755
Merge remote-tracking branch 'origin/master' into java-assignment
2018-05-01 10:57:21 -07:00
Timothy Clem
91961a6bec
Support rendering raw tree-sitter ASTs
2018-05-01 09:51:34 -07:00
Timothy Clem
19157b0bcb
Amazing this works for specialized tree parsing
2018-05-01 08:42:26 -07:00
Timothy Clem
4904dcda92
WIP - not compiling
2018-05-01 08:42:26 -07:00
Rob Rix
81a69905a4
Revert "Module table entries have to be non-empty."
...
This reverts commit 9a5e83caec105358018b05c75095743cbbe80905.
2018-04-30 17:13:03 -04:00
Rob Rix
7c9c975071
Module table entries have to be non-empty.
2018-04-30 17:11:34 -04:00
Timothy Clem
402172c0fb
Don't carry extensions in here
2018-04-20 14:15:51 -07:00
Timothy Clem
7ef36ea18f
Slowly start to rework reading, parsing of a project to a package
2018-04-20 13:30:17 -07:00
Timothy Clem
5c6535608e
Docs and formatting
2018-04-12 08:24:58 -07:00
Timothy Clem
8dc79708be
Don't need these
2018-04-11 14:49:01 -07:00
Timothy Clem
13a0daea98
Handle evaluating preludes as part of import graph analysis
2018-04-11 14:48:30 -07:00
Timothy Clem
3a000ca7c0
Lost this formatting
2018-04-10 15:16:52 -07:00
Timothy Clem
64744014fd
Formatting
2018-04-10 14:57:31 -07:00
Timothy Clem
8c2f3c1131
Formatting
2018-04-09 10:56:46 -07:00
Timothy Clem
0cc8ca856b
New SomeAnalysisParser GADT and a type family to support import graph analysis
2018-04-06 16:54:20 -07:00
Ayman Nadeem
06475e0304
wiring up parser for Java
2018-03-16 17:00:43 -07:00
Josh Vera
786c92d94a
Merge branch 'master' into prologue
2018-02-28 12:36:29 -05:00
Patrick Thomson
7df92c2828
Comment fixes to ensure stack haddock
works.
...
There were a couple of typeclasses that were bamboozling the Haddock
parser. I was able to fix `subalgorithmFor`, but the vaguaries of
per-argument comments in type families appear to have escaped me—if
you can figure out how to get them picked up in the definition of
AssignmentParser, shout. I tried it all the ways I could think of and
came up empty.
But now we have nice Haddocks, which are intensely helpful!
2018-02-28 09:03:41 -08:00
joshvera
9963f4a2b0
expose Monoid typeclass
2018-02-28 11:27:25 -05:00
joshvera
49c1026a5d
export phpParser
2018-01-23 17:40:38 -05:00
joshvera
19b3b78cf6
Add PHP to Parser
2018-01-12 12:27:40 -05:00
Rob Rix
f1c4b58797
Merge branch 'musical-modules' into 🔥 -monolithic-syntax
2017-11-28 11:59:38 -05:00
Rob Rix
87d533cc2b
Rename Language to Data.Language.
2017-11-27 14:17:48 -05:00
Rob Rix
3ebb972bd8
Move the Node datatype & AST synonym into Data.AST.
2017-11-27 13:45:37 -05:00
Rob Rix
dbb1a33fca
Rename Parser to Parsing.Parser.
2017-11-27 13:24:45 -05:00