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

8059 Commits

Author SHA1 Message Date
Timothy Clem
28a3313d12 Rename constructorLabelWithSource => constructorNameAndConstantFields 2017-07-18 11:33:28 -07:00
Timothy Clem
31a2e6a08d Return a ConstructorLabel instead of a ByteString 2017-07-18 11:32:59 -07:00
Timothy Clem
b0e98bd6b5 Reduce language pragmas needed 2017-07-18 11:23:37 -07:00
Timothy Clem
49100a7479 Use Generic1 to get conName for syntax constructor labels 2017-07-18 10:03:32 -07:00
Timothy Clem
a6f375859f Update Parser to use Either instead of Result 2017-07-17 14:39:08 -07:00
Timothy Clem
039e019551 Track errors in AssignmentState, Result => Either 2017-07-17 14:39:03 -07:00
Timothy Clem
902aa213f5 Assign HTMLInline in markdown 2017-07-17 10:50:02 -07:00
Rob Rix
9370addba1 Print the source in white. 2017-07-17 12:58:41 -04:00
Rob Rix
1c1349ef82 Apply the ShowS in putStrErr. 2017-07-17 12:56:40 -04:00
Rob Rix
1b117ef8b0 Add a newline after the callstack. 2017-07-17 12:55:39 -04:00
Rob Rix
dcb1794cfa Print the callstack in white. 2017-07-17 12:55:13 -04:00
joshvera
3f6c71b3a4 Add json grammar module 2017-07-17 12:52:50 -04:00
Rob Rix
d997779bdf Traverse the Maybe directly. 2017-07-17 12:52:17 -04:00
Rob Rix
36801584e0 Prefer the later error. 2017-07-17 12:51:42 -04:00
Rob Rix
a07726fcf3 Preserve errors through repetitions. 2017-07-17 12:22:27 -04:00
Rob Rix
8354b701ae Alternating results preserves errors. 2017-07-17 12:20:02 -04:00
Rob Rix
3a7c4a238f Produce errors at the current node’s location instead of the end of the previous node.
This gives us better localization of errors, pointing at the start of the (guaranteed extant) current node instead of the state’s current location (which can be an arbitrary distance earlier in the source).
2017-07-17 12:19:15 -04:00
Rob Rix
b66cfcc52c Select the lesser of the node symbol & the parse error symbol.
This effectively clamps the ERROR symbol (65535) to the maximal constructor.
2017-07-14 14:43:36 -04:00
Rick Winfrey
921be5bfca Assign Let statements in Except clauses 2017-07-13 15:52:03 -07:00
Rick Winfrey
af8b0ffd2f Add Catch record fields 2017-07-13 15:49:33 -07:00
Rick Winfrey
9c9f43d4e9 Assign Decorators with no ArgumentList 2017-07-13 15:22:01 -07:00
Rick Winfrey
08560875b6 uncurry and swap 2017-07-13 15:15:36 -07:00
Rick Winfrey
c0e47ffd8a 🔥 old comment 2017-07-13 15:15:17 -07:00
Rick Winfrey
8a0e952a11 Merge branch 'master' into python-slice-expressions 2017-07-13 10:03:53 -07:00
Rick Winfrey
0999f42b96 Merge branch 'master' into python-slice-expressions 2017-07-13 10:02:57 -07:00
Rick Winfrey
8b2f608221 🔥 toEnumeration 2017-07-13 09:50:19 -07:00
Rob Rix
8546dc80b7 Merge branch 'master' into parse-error-symbols 2017-07-13 11:03:15 -04:00
Rob Rix
b264246b93 Merge branch 'master' into nested-decorators 2017-07-13 11:01:10 -04:00
Rob Rix
7b888cd760 Merge branch 'master' into parse-error-symbols 2017-07-13 10:58:28 -04:00
Rick Winfrey
0e5a22da2b Assign nested decorators 2017-07-12 18:51:14 -07:00
Rick Winfrey
91d15699ce Assign slice expressions 2017-07-12 15:31:41 -07:00
Rick Winfrey
6da98f3d34 Rename Literal.Range -> Expression.Enumeration 2017-07-12 15:28:05 -07:00
Rob Rix
47e8fdeef5 Represent Markdown nodes with the Node/AST types. 2017-07-12 17:03:57 -04:00
Rob Rix
3bd4fe5665 Assign parse errors in Ruby statements. 2017-07-12 16:20:42 -04:00
Rob Rix
d229ec2310 Assign parse errors in Python. 2017-07-12 16:20:37 -04:00
Rob Rix
1e4eb2d24e Remove the error parameter from Syntax.Error. 2017-07-12 16:20:24 -04:00
Rob Rix
e050a44cf4 Define a Node type for the intermediate representation of metadata. 2017-07-12 15:55:21 -04:00
Rob Rix
c4fc6e5c4a Use the AST synonym. 2017-07-12 15:40:54 -04:00
Rob Rix
00221d421f 🔥 the ParseError ErrorCause. 2017-07-12 15:35:00 -04:00
Rob Rix
cf8148f804 Merge branch 'master' into parse-error-symbols 2017-07-12 14:58:40 -04:00
Timothy Clem
7fff9cc64a Merge branch 'master' into ruby-assignment 2017-07-12 10:49:19 -07:00
Rick Winfrey
83fcc206f3 Merge branch 'master' into par-arg-eters 2017-07-12 10:09:06 -07:00
Rick Winfrey
934cb445b0 🔥 the >>=! 2017-07-12 10:02:55 -07:00
Rob Rix
230570c42b Obviate the need for Maybe around symbols. 2017-07-12 12:55:57 -04:00
Timothy Clem
b3ef7cbded Fix up unary defined?, thanks @robrix 2017-07-12 09:06:50 -07:00
Timothy Clem
f87a5039a7 Go back to original Syntax.Empty 2017-07-12 08:18:03 -07:00
Timothy Clem
4d70e1c358 Merge branch 'master' into markdown-headings 2017-07-12 08:12:47 -07:00
Rick Winfrey
10a0efcf0b Move literal assignment to top 2017-07-11 16:20:30 -07:00
Rick Winfrey
f1e9e215ce Collapse parameter assignments 2017-07-11 16:08:49 -07:00
Rick Winfrey
be2969b153 Collapse argument assignments 2017-07-11 16:08:28 -07:00
Rick Winfrey
6bfb27adcc Reflow literals and 🔤 2017-07-11 16:07:35 -07:00
Rick Winfrey
4419502a2c Collapse argument assignments 2017-07-11 16:07:20 -07:00
Rick Winfrey
b1405f90dd 🔥 no longer valid comment 2017-07-11 16:06:41 -07:00
Rick Winfrey
ad681cc3a0 Collapse import assignments 2017-07-11 16:06:17 -07:00
Rick Winfrey
240ebbfdfe Combine keyword parameter and argument assignments 2017-07-11 15:43:44 -07:00
Rick Winfrey
a83a6a7e49 Combine list splat parameter and arguments assignments 2017-07-11 15:43:26 -07:00
Rick Winfrey
e61251f589 Assign dictionary splat arguments 2017-07-11 15:42:59 -07:00
Rick Winfrey
aaf2ce089e Assign dictionary splat parameters 2017-07-11 15:31:19 -07:00
Timothy Clem
2c5b12f8de Merge branch 'master' into ruby-assignment 2017-07-11 14:19:20 -07:00
Rick Winfrey
3f4d47030b Assign list splat parameters 2017-07-11 13:53:25 -07:00
Rick Winfrey
821c6813ec Assign typedDefaultParameter 2017-07-11 13:43:35 -07:00
Timothy Clem
210417a9d7 Explain why binary minus is a challenge 2017-07-11 13:23:19 -07:00
Timothy Clem
7c513d3e01 Assign heredocs as TextElement for now 2017-07-11 13:23:05 -07:00
Timothy Clem
c314330e14 Handle === style markdown headings 2017-07-11 09:37:24 -07:00
Rick Winfrey
d6e1017117 Assign wildcard (*) in import from statements 2017-07-10 16:11:03 -07:00
Rick Winfrey
b35091f754 Assign aliased imports 2017-07-10 15:58:41 -07:00
Rick Winfrey
c46a0bd615 📝 2017-07-10 15:58:29 -07:00
Timothy Clem
bd684d0ed6 Merge remote-tracking branch 'origin/master' into ruby-assignment 2017-07-10 14:09:00 -07:00
Rick Winfrey
9f0a7c2c94 Merge branch 'master' into python-assignment-improvements 2017-07-10 13:59:55 -07:00
Rick Winfrey
a64d85410c Assign default parameters 2017-07-10 13:53:42 -07:00
Rick Winfrey
c4206016e9 Reflow declaration rule 2017-07-10 13:53:33 -07:00
Timothy Clem
f715e6fdf1 Show 'Heading N' instead of 'Section' for md toc summaries 2017-07-10 11:15:03 -07:00
Timothy Clem
2e6ae403bd ReservedIdentifiers and minor cleanup 2017-07-10 08:32:39 -07:00
Timothy Clem
39a457ceaf Introduce blocks 2017-07-07 15:17:15 -07:00
Timothy Clem
96910c7d55 Any statement as parameter 2017-07-07 15:16:51 -07:00
Timothy Clem
2235b5a614 Streamline literal 2017-07-07 15:16:36 -07:00
Timothy Clem
4a553ff4fa Slightly different ForEach structure 2017-07-07 15:13:32 -07:00
Timothy Clem
61e0d8b83e Merge remote-tracking branch 'origin/master' into ruby-assignment 2017-07-07 14:43:32 -07:00
Timothy Clem
fbe6e451f4 Keywords as identifiers 2017-07-07 14:23:38 -07:00
Timothy Clem
39b7c05e50 case/when/else 2017-07-07 14:22:17 -07:00
Timothy Clem
7d8978f764 Uninterpreted 2017-07-07 13:53:16 -07:00
Timothy Clem
cf17c77a5e Rescue modifiers 2017-07-07 13:47:50 -07:00
Rick Winfrey
1e84cc3f8e Add comment for python grammar version 2017-07-07 13:03:42 -07:00
Rick Winfrey
9634dcb94a Add comment about decorator 2017-07-07 12:21:16 -07:00
Rick Winfrey
6563d4ce2b Rework functionDefinition assignment 2017-07-07 12:07:13 -07:00
Timothy Clem
b63e86a9a5 Alias and undef just as function calls 2017-07-07 10:51:18 -07:00
Rick Winfrey
fbd5b57137 Remove case for function and async function assignments 2017-07-07 10:38:02 -07:00
Rick Winfrey
e563a0908b 🔥 unnecessary $ 2017-07-07 10:37:42 -07:00
Timothy Clem
d470d3218d No longer need this import 2017-07-07 10:34:17 -07:00
Timothy Clem
10a2238952 Bring in String literal changes 2017-07-07 10:31:20 -07:00
Timothy Clem
9904a39fb2 Fix up rescue, allow in methods 2017-07-07 10:04:49 -07:00
Timothy Clem
277c6114ff Force template haskell to re-generate 2017-07-07 10:03:44 -07:00
Rick Winfrey
c3e4c82be5 🔥 old comment 2017-07-07 09:48:22 -07:00
Timothy Clem
2fcc566542 Clean up argument/parameter parsing 2017-07-07 09:15:24 -07:00
Timothy Clem
60c932acd3 Singleton methods 2017-07-07 08:46:06 -07:00
Rick Winfrey
6c2e7500c4 Assign keyword argument 2017-07-06 18:31:37 -07:00
Timothy Clem
1a0445b49c Singleton classes 2017-07-06 15:57:31 -07:00
Timothy Clem
cedb1905be One level of statement 2017-07-06 15:57:14 -07:00
Timothy Clem
94311623d0 Add Statement.Retry - support retry and redo 2017-07-06 15:41:04 -07:00
Timothy Clem
c53256e720 Fix typo now that ruby grammar is updated 2017-07-06 15:40:45 -07:00
Timothy Clem
5cebfd3b6c First pass at begin, rescue, ensure, else 2017-07-06 14:43:49 -07:00
Timothy Clem
40a2fc6820 Bring in Else and changes to Try 2017-07-06 14:43:34 -07:00
Rick Winfrey
352d090ce0 Assign decoratedDefinitions 2017-07-06 12:58:09 -07:00
Rick Winfrey
b4e81ab360 Fix names for Decorator instances 2017-07-06 12:57:34 -07:00
Timothy Clem
1acbd78108 Assignment 2017-07-06 12:56:16 -07:00
Rick Winfrey
9267ba91df Add Data.Syntax.Declaration.Decorator 2017-07-06 12:02:10 -07:00
Rick Winfrey
a3c22babce Update classScope -> classBody for consistency 2017-07-06 12:01:56 -07:00
Rick Winfrey
5010d8962d Simplify Data.Syntax.Literal.String 2017-07-06 11:02:55 -07:00
Timothy Clem
06e0e07920 Subscripts 2017-07-06 09:54:54 -07:00
Timothy Clem
a4c0c93b2b Method calls 2017-07-06 09:45:03 -07:00
Timothy Clem
0ef935eb2b Hash literal 2017-07-06 09:44:43 -07:00
Timothy Clem
83642f15e6 Duplicate Symbol 2017-07-06 09:44:31 -07:00
Timothy Clem
0aa0c614b7 For 2017-07-06 09:44:10 -07:00
Timothy Clem
2d1596de3c Multiple bindings allowed in ForEach 2017-07-06 09:43:19 -07:00
Rick Winfrey
97d6cefb0b Assign withStatements 2017-07-05 18:37:16 -07:00
Rick Winfrey
64b2845138 Assign multiple identifiers for except clauses and many expressions 2017-07-05 17:49:02 -07:00
Rick Winfrey
84cd43a1ff Assign tryStatements with except clauses 2017-07-05 17:34:09 -07:00
Rick Winfrey
64538daa3a Update Data.Syntax.Statement.Catch to require two terms 2017-07-05 17:32:38 -07:00
Timothy Clem
7cdddebfce Class and Module 2017-07-05 15:41:54 -07:00
Timothy Clem
dd464f01d5 Assign lambdas and methods (with parameters) 2017-07-05 14:51:12 -07:00
Timothy Clem
3e9827a890 s/keywords/keyword 2017-07-05 14:48:57 -07:00
Timothy Clem
a6820d12a8 Merge remote-tracking branch 'origin/master' into ruby-assignment 2017-07-05 12:21:21 -07:00
Rick Winfrey
6d1ac8af87 🔥 unused function 2017-06-30 18:00:54 -07:00
Rick Winfrey
b1a7dba4ec Rename arguments 2017-06-30 18:00:45 -07:00
Rick Winfrey
19dcdc3fd9 Assign while statements with else clauses 2017-06-30 18:00:35 -07:00
Rick Winfrey
9ab480a90d Assign for statements with else clauses 2017-06-30 17:52:13 -07:00
Rick Winfrey
2bbec1e6e6 Add Data.Syntax.Statement.Else for handling Python for else, and while else statements 2017-06-30 17:25:43 -07:00
Rick Winfrey
48141cbe0a Add Data.Syntax.Statement.Let 2017-06-30 17:23:06 -07:00
Rick Winfrey
1e05fbf754 Update functionDefinition and asyncFunctionDefinition assignments 2017-06-30 17:21:04 -07:00
Rick Winfrey
c2800edd0b Favor pure over return 2017-06-29 16:45:44 -07:00
Rick Winfrey
29bdbaf52c Assing lambda with Type.Annotation
- Maintain consistency with functionDefinition and asyncFunctionDefinition assignments
2017-06-29 16:45:30 -07:00
Rick Winfrey
b585c01b32 Assign functionDefinition and asyncFunctionDefinition
- Uses Data.Syntax.Type.Annotation to capture the function definition type

- Uses Data.Syntax.Type.Annotation to capture if function definition is async
2017-06-29 15:52:41 -07:00
Rick Winfrey
4c4e61e000 Update TOC renderer 2017-06-29 15:04:23 -07:00
Rick Winfrey
246f2b8c74 🔥 functionType field on Data.Syntax.Declaration.Function 2017-06-29 15:03:57 -07:00
Rick Winfrey
8df150fa17 Update Language.Python.Syntax typedParameter to use Data.Syntax.Type.Annotation 2017-06-29 13:33:16 -07:00
Rick Winfrey
150a0c2461 Add Eq1 and Show instances for Data.Syntax.Type.Annotation 2017-06-29 13:32:44 -07:00
Rick Winfrey
9d0cef141a 🔥 Data.Syntax.TypedIdentifier 2017-06-29 13:32:23 -07:00
Rick Winfrey
b362e8f7b4 Merge branch 'master' into python-conditional-expressions 2017-06-28 11:49:06 -07:00
Rob Rix
006dac8f68 Inline run. 2017-06-26 12:12:46 -04:00
Rob Rix
af3038fc1f Evaluate the spine of the list strictly. 2017-06-26 11:44:20 -04:00
Rob Rix
89ec9e11c0 Avoid slicing down the source when advancing through the state. 2017-06-26 11:44:08 -04:00
Rob Rix
10e81996fa 🔥 Empty. 2017-06-26 10:03:08 -04:00
Rob Rix
2be307e967 many participates in committed choice. 2017-06-24 17:16:57 -04:00
Rob Rix
eaa4423dec Define a Many rule. 2017-06-24 17:10:04 -04:00
Rob Rix
7df59da281 Frame the <|> rule in terms of the choices along each side. 2017-06-24 16:51:00 -04:00
Rob Rix
1bbb252738 Return is the left-identity of alternation. 2017-06-24 16:44:00 -04:00
Rob Rix
4a00ee3e23 Make sure the end column makes sense. 2017-06-24 15:55:51 -04:00
Rob Rix
f2b6cdb223 Deal with nonsensical end lines. 2017-06-24 15:46:07 -04:00
Rob Rix
5d75659c6e Define spanToRange tacitly. 2017-06-24 15:22:58 -04:00
Rob Rix
d44684cd4e Simplify how sections and code blocks are projected. 2017-06-24 15:01:00 -04:00
Rob Rix
3278506866 Simplify how images and links are projected. 2017-06-24 14:59:00 -04:00
Rob Rix
7d7e41221e Reformat a little. 2017-06-24 14:37:34 -04:00
Rob Rix
81b8ab22b9 🔥 some redundant parens. 2017-06-24 14:36:41 -04:00
Rob Rix
04bde799fd Eta-reduce. 2017-06-24 14:33:10 -04:00
Rob Rix
854e4fbcc2 Change how some comments are listed. 2017-06-24 14:28:31 -04:00
Rob Rix
a182406b6b Fewer parens. 2017-06-24 14:25:43 -04:00
Rob Rix
78b607ddbc 🔥 redundant parens. 2017-06-24 14:22:31 -04:00
Rob Rix
1beabcdbdc The line by line parser is pure. 2017-06-24 12:44:11 -04:00
Rob Rix
af48c1d684 Simplify the line by line parser. 2017-06-24 12:44:00 -04:00
Rob Rix
6b3f35c046 Compute spanToRangeInLineRanges in constant time. 2017-06-24 12:32:43 -04:00
Rob Rix
8284540ba0 Quote the reference to ByteString. 2017-06-24 12:10:37 -04:00
Rob Rix
aed530b79b Correct some misalignment. 2017-06-24 12:03:27 -04:00
Rob Rix
8e57a0b88b 🔥 breakSource. 2017-06-24 12:02:38 -04:00
Rob Rix
b9143d40ea Define sourceLines in terms of sourceLineRanges. 2017-06-24 12:02:27 -04:00
Rob Rix
35baa874d5 Define sourceLineRangesWithin without constructing intermediate sources. 2017-06-24 11:58:17 -04:00
Rob Rix
3b1c2644f2 Use ord to define sourceLines. 2017-06-24 11:47:38 -04:00
Rob Rix
eaece7951a Define sourceLineRanges in terms of sourceLineRangesWithin. 2017-06-24 11:35:13 -04:00
Rob Rix
b7ea75a9bd Define Source abstractly. 2017-06-24 11:32:04 -04:00
Rob Rix
ed1533f7fc Rename Data.Source.{drop,take,break} to disambiguate. 2017-06-24 11:26:08 -04:00
Rob Rix
9c0d9c30fb Define sourceLines in terms of Data.Source.break. 2017-06-24 11:22:27 -04:00
Rob Rix
43f9e70517 🔥 the export of Data.Source.break. 2017-06-24 11:17:17 -04:00
Rob Rix
0bcb40bd81 Spacing. 2017-06-24 11:14:07 -04:00
Rob Rix
323347446d Rename actualLine* to sourceLine*. 2017-06-24 11:13:22 -04:00
Rob Rix
d2e4ce8dc3 🔥 the export of Data.Source.take. 2017-06-24 11:11:10 -04:00
Rob Rix
48f911485e Explicitly list Data.Source’s exports. 2017-06-24 11:09:21 -04:00
Rob Rix
4886a4585c Rearrange and group Data.Source’s functions. 2017-06-24 11:08:14 -04:00
Rob Rix
fc004385b2 List Data.Span’s exports explicitly. 2017-06-24 10:59:21 -04:00
Rob Rix
ed140c9937 🔥 Spans. 2017-06-24 10:59:09 -04:00
Rob Rix
d87aa706aa 🔥 unionSpan. 2017-06-24 10:59:03 -04:00
Rob Rix
e3b697af1a 🔥 unionSpansFrom. 2017-06-24 10:58:56 -04:00
Rob Rix
1be293ec79 Avoid copying the underlying ByteString. 2017-06-24 10:55:07 -04:00
Rob Rix
ca49dec207 Avoid another trip through Text. 2017-06-24 10:54:03 -04:00
Rob Rix
4ff3d9e8ec Rename sourceText to sourceBytes. 2017-06-24 10:50:28 -04:00
Rob Rix
21878f2e80 Explicitly list Data.Range’s exports. 2017-06-24 10:46:45 -04:00
Rob Rix
062a7ca2bb 🔥 unionRange. 2017-06-24 10:45:55 -04:00
Rob Rix
59b18baa9c 🔥 unionRangesFrom. 2017-06-24 10:45:15 -04:00
Rob Rix
d368e44a57 🔥 intersectionRange. 2017-06-24 10:44:21 -04:00
Rob Rix
09dd48f994 🔥 divideRange. 2017-06-24 10:43:27 -04:00
Rob Rix
1bbc0a503a 🔥 maybeLastIndex. 2017-06-24 10:42:48 -04:00
Rob Rix
ed9b00cc90 🔥 rangesAndWordsFrom. 2017-06-24 10:41:32 -04:00
Rob Rix
7da94d77f6 Fix up a couple of comments. 2017-06-24 10:39:55 -04:00
Rob Rix
2c113280bc Explicitly unpack Range’s fields. 2017-06-24 10:38:31 -04:00
Rob Rix
08c2c87fe0 Explicitly strictify Range’s fields. 2017-06-24 10:38:11 -04:00
Rob Rix
0d67e6acc9 🔥 a redundant GHC flag. 2017-06-24 10:37:39 -04:00
Rob Rix
7575c0b559 Explicitly list the exports for Data.Blob. 2017-06-24 10:37:17 -04:00
Rob Rix
d720532537 🔥 idOrEmptyBlob. 2017-06-24 10:37:01 -04:00
Rob Rix
a106d27eb9 Rename Source.length to sourceLength. 2017-06-24 10:32:26 -04:00
Rob Rix
2cc9f28e37 Rename Source.null to nullSource. 2017-06-24 10:28:39 -04:00
Rob Rix
0979106e50 🔥 Data.Source.empty. 2017-06-24 10:24:35 -04:00
Rob Rix
8e3d3cb1e1 🔥 a redundant space. 2017-06-24 10:23:48 -04:00
Rob Rix
0d1967edb3 Rename the blob fields. 2017-06-24 10:21:54 -04:00
Rob Rix
bed2c473b2 Rename SourceBlob to Blob. 2017-06-24 10:15:31 -04:00
Rob Rix
fc51c92425 Move SourceBlob into Data.Blob. 2017-06-24 10:09:50 -04:00
Rob Rix
84c7029dd8 Stub in a Blob module. 2017-06-24 10:00:40 -04:00
Rob Rix
fc09d74b73 Rename the Source module to Data.Source. 2017-06-24 09:59:41 -04:00
Rob Rix
1edc6a2718 Rename the Range module to Data.Range. 2017-06-24 09:46:28 -04:00
Rob Rix
6e7122e09a Rename the SourceSpan module to Data.Span. 2017-06-24 09:41:51 -04:00
Rob Rix
4097d4bfc0 Rename SourceSpan to Span and SourcePos to Pos. 2017-06-24 09:30:34 -04:00
Rob Rix
c2d835e43a Compute Markdown ranges within the known line ranges. 2017-06-23 19:30:02 -04:00
Rob Rix
4ee9ff6332 Define a SourceSpan -> Range computation parameterized by the line ranges. 2017-06-23 19:28:10 -04:00
Timothy Clem
e416c018ee Regex 2017-06-23 13:49:23 -06:00
Timothy Clem
8cdb0bf213 Keywords 2017-06-23 13:49:18 -06:00
Timothy Clem
95011b42ea Floats and integers 2017-06-23 13:42:08 -06:00
Timothy Clem
212814872e Symbols and subshells 2017-06-23 13:39:56 -06:00
Timothy Clem
d46bd67515 Hash literals 2017-06-23 13:35:47 -06:00
Timothy Clem
e6079c7752 Add in array and string literals 2017-06-23 13:28:28 -06:00
Rob Rix
62e1fba9be Merge branch 'master' into ruby-assignment 2017-06-22 12:24:09 -04:00
Rob Rix
54f2d84934 Merge branch 'master' into python-conditional-expressions 2017-06-22 12:24:04 -04:00
Rob Rix
21508fb6c3 Resume the unqualified import of !. 2017-06-21 17:05:13 -04:00
Rob Rix
47a33a7916 Rename ! to !?. 2017-06-21 17:02:29 -04:00
Rob Rix
3bf95e05f4 Tighten up moveDownFrom/moveRightFrom. 2017-06-21 16:33:47 -04:00
Rob Rix
a084544487 Evaluate endpoints eagerly. 2017-06-21 16:07:42 -04:00
Rob Rix
d822c138b3 Use bang patterns for strictness. 2017-06-21 16:06:20 -04:00
Rob Rix
676cfaa68e Try to inline !. 2017-06-21 16:02:56 -04:00
Rob Rix
4cdd66b12b Mark moveDownFrom and moveRightFrom for inlining. 2017-06-21 15:50:56 -04:00
Rob Rix
9337631149 Safe array subscripting.
This halves our heap consumption. I don’t know how.
2017-06-21 15:46:36 -04:00
Rob Rix
139c9513d1 Align moveDownFrom/moveRightFrom. 2017-06-21 15:33:26 -04:00
Rob Rix
8131dfaf75 Move moveDownFrom/moveRightFrom/slideFrom out a scope. 2017-06-21 15:33:06 -04:00
Rob Rix
2ed1926f94 🔥 moveDown/moveRight. 2017-06-21 15:32:07 -04:00
Rob Rix
6947a56501 Use BangPatterns to denote strictness. 2017-06-21 15:27:08 -04:00
Rob Rix
9fa104fb23 Factor out the downward/rightward moves. 2017-06-21 15:04:11 -04:00
Rob Rix
74c301f7da Define searchAlongK with guard clauses. 2017-06-21 15:01:49 -04:00
Rob Rix
922569fbe6 Simplify the search along k logic again. 2017-06-21 14:46:57 -04:00
Rob Rix
c4f45522af 🔥 getK. 2017-06-21 14:02:06 -04:00
Rob Rix
0bf24a86db Force the evaluation of the state array. 2017-06-21 14:01:33 -04:00
Rob Rix
231a746d58 Use unary - instead of negate. 2017-06-21 14:00:13 -04:00
Rob Rix
f0147ae513 Prioritize the upper/right extent. 2017-06-21 13:58:19 -04:00
Rob Rix
c736d2527c Revert "Simplify the search logic."
This reverts commit 008658c2bfb06da29d56278b4b48f5b76d0dd211.
2017-06-21 13:54:59 -04:00
Rob Rix
c45b5a32b0 Revert "Avoid refetching the bounds."
This reverts commit de7739b5cf19f93a1ae697350e3332c9a1ea3034.
2017-06-21 13:53:27 -04:00
Rob Rix
6a627255c9 Revert "Save the initial bounds computation."
This reverts commit e062aa06676723be75c47d376fcf66457d9d39aa.
2017-06-21 13:53:15 -04:00
Rob Rix
8a2c0bf6c2 Less strict evaluation of the edit script. 2017-06-21 13:45:16 -04:00
Rob Rix
d71f97d1b5 Save the initial bounds computation. 2017-06-21 13:20:25 -04:00
Rob Rix
c2daf3af07 Avoid refetching the bounds. 2017-06-21 13:17:44 -04:00
Rob Rix
e532f7d2fb Simplify the search logic. 2017-06-21 13:13:40 -04:00
Rob Rix
05ec4dda63 k is already bounded. 2017-06-21 12:02:34 -04:00
Rob Rix
6a4148fd6f s/negate/-/ 2017-06-21 11:57:50 -04:00
Rob Rix
f395d5c144 Rename prev/next to left/up. 2017-06-21 11:54:39 -04:00
Rob Rix
51e05c39d3 Align moveDownFrom/moveRightFrom. 2017-06-21 11:52:48 -04:00
Rob Rix
30b9e85ed3 Use minimal Arrays for the state. 2017-06-21 11:36:26 -04:00
Rob Rix
0d22eabf5b Store Endpoints in the state.
This uses a word of extra space but saves some time moving things around.
2017-06-21 11:31:38 -04:00
Rob Rix
e505b532a9 Use the inRange method to bounds check x/y. 2017-06-21 11:28:57 -04:00
Rob Rix
158b6387a3 🔥 redundant parens. 2017-06-21 11:26:43 -04:00
Rob Rix
7ff6e1252c Don’t export Endpoint. 2017-06-21 11:26:25 -04:00
Rob Rix
25d66ede5f 🔥 MyersState. 2017-06-21 11:25:57 -04:00
Rob Rix
854b2b1c62 🔥 EditGraph. 2017-06-21 11:24:12 -04:00
Rob Rix
c4992ff950 🔥 runSES. 2017-06-21 11:20:44 -04:00
Rob Rix
3cbc2b3505 Close over the state. 2017-06-21 11:18:32 -04:00
Rob Rix
7aaff0b634 🔥 Diagonal. 2017-06-21 11:17:06 -04:00
Rob Rix
7eb9c6c834 Exhaustiveness has been restored. 2017-06-21 11:15:48 -04:00
Rob Rix
635c3fc00d No need to allocate a list of envelopes. 2017-06-21 11:14:28 -04:00
Rob Rix
b1fff9bf52 Rename extents to endpoints. 2017-06-21 11:08:17 -04:00
Rob Rix
105cd7b1ec Replace Extent with Endpoint. 2017-06-21 11:07:53 -04:00
Rob Rix
9308e7f64a Search edit envelopes tail-recursively. 2017-06-21 10:07:59 -04:00
Rob Rix
2a23d86e32 searchAlongK produces strict results. 2017-06-21 09:47:39 -04:00
Timothy Clem
f58d69c70b mkNot helper function 2017-06-19 11:07:40 -06:00
Timothy Clem
e2c2bedde2 Moving things around 2017-06-19 11:07:22 -06:00
Timothy Clem
1d2bd7342a Add in binary operators for Ruby assignment 2017-06-19 10:14:07 -06:00
Timothy Clem
6abfe6cc07 Fix unary minus (sort of) 2017-06-19 09:11:16 -06:00
Timothy Clem
0282ebab55 Partially add unary 2017-06-19 08:27:44 -06:00
Timothy Clem
f8ba1d203b Add Range back in 2017-06-19 07:52:17 -06:00
Timothy Clem
e7e1898c66 Add conditional 2017-06-19 07:49:57 -06:00
Timothy Clem
0285cf4939 Merge remote-tracking branch 'origin/master' into ruby-assignment 2017-06-16 15:55:06 -06:00
Timothy Clem
054e8a07f8 Sort out some literals and if/until 2017-06-16 15:52:47 -06:00
Timothy Clem
ef9886972d Two version of empty 2017-06-16 15:52:11 -06:00
Josh Vera
6a38e8ed12 Merge branch 'master' into log-errors-to-stderr 2017-06-16 16:55:10 -04:00
joshvera
83394e4dae remove double logging 2017-06-16 16:47:29 -04:00
joshvera
4c409f8364 export withSGRCode 2017-06-16 16:45:54 -04:00
joshvera
c866596955 print colorized errors to stderr if attached to a tty 2017-06-16 15:56:14 -04:00
Rob Rix
c63621c903 Merge branch 'master' into table-of-blobtents 2017-06-16 15:46:00 -04:00
joshvera
8d103fe844 Revert "Remove color highlighting and move other instances of putStrLn error to stderr"
This reverts commit 22d62ed464441ba0abb53f23f9d357df03ef9f52.
2017-06-16 14:55:47 -04:00
Timothy Clem
e29a17b26b while and break 2017-06-16 12:39:56 -06:00
Timothy Clem
7a7c04debc Rework identifiers and literals 2017-06-16 12:39:49 -06:00
Timothy Clem
ccc1146656 Call it scope entry/exit instead 2017-06-16 12:38:52 -06:00
Timothy Clem
f761f62f8a Empty statement 2017-06-16 11:57:13 -06:00
Timothy Clem
a68bf4ee97 These don't work yet, comment them out 2017-06-16 11:57:02 -06:00
joshvera
b3e14926a1 Remove import 2017-06-16 13:50:12 -04:00
joshvera
ff0cbca96e Remove color highlighting and move other instances of putStrLn error to stderr 2017-06-16 13:49:26 -04:00
joshvera
225a40fc7d Log errors to stderr 2017-06-16 13:30:25 -04:00
Timothy Clem
7083499ad4 Build up from scratch a bit 2017-06-16 11:30:17 -06:00
Timothy Clem
37d6bef898 Add Undef statement 2017-06-16 11:29:42 -06:00
Rob Rix
1bf7863186 Define recordSummary at the top level. 2017-06-16 13:00:46 -04:00
Rob Rix
fa74d323a9 tableOfContentsBy employs termTableOfContentsBy. 2017-06-16 12:57:23 -04:00
Rob Rix
b91d1754c7 Add a --toc flag for blobs. 2017-06-16 12:32:52 -04:00
Rob Rix
26d1b600be Render Markdown blobs to ToCs. 2017-06-16 12:32:44 -04:00
Rob Rix
1bdec36140 Render Python blobs to ToCs. 2017-06-16 12:32:39 -04:00
Rob Rix
203d97d126 Define a ToC renderer. 2017-06-16 12:32:26 -04:00
Rob Rix
a9dd289aae Define a ToC rendering function for parse trees. 2017-06-16 12:26:14 -04:00
Rob Rix
87082918a4 Return term ToCs without a wrapping Entry. 2017-06-16 12:25:20 -04:00
Rob Rix
8fdd1bdf0d Define a function computing the table of contents for a term. 2017-06-16 12:21:40 -04:00
Rob Rix
8941b23246 🔥 the ParseArguments' wrappers. 2017-06-16 12:09:22 -04:00
Rob Rix
7c5ba48e2f 🔥 the DiffArguments' wrappers. 2017-06-16 12:06:27 -04:00
Rob Rix
e392ac01da Rename renderToC to renderToCDiff 2017-06-16 12:03:39 -04:00
Rob Rix
8a7f8fcd8c Merge branch 'master' into single-method-generically-derived-typeclasses 2017-06-16 11:16:50 -04:00
Rob Rix
e11b56127f Take the range of headings’ children instead of the whole heading.
We don’t want to include the ## in a section entry, so we union the ranges of the children (if any).
2017-06-16 10:59:23 -04:00
Timothy Clem
810a573c66 Add BEGIN/END blocks and alias statements for Ruby 2017-06-16 07:44:01 -06:00
Rob Rix
185e1ffa19 Define gliftShowList as a function, not a method. 2017-06-15 18:26:24 -04:00
Rob Rix
04cffd7bb3 Define galign as a function, not a method. 2017-06-15 18:24:02 -04:00
Rob Rix
2dfd3322a2 Merge branch 'master' into optimize-for-large-nested-branches 2017-06-15 11:02:00 -04:00
Rob Rix
60d822f9bc Use a strict & partially unpacked structure for mapping terms. 2017-06-15 10:10:48 -04:00
Rob Rix
2b46a7a347 Reverse the generated lists. 2017-06-15 10:04:48 -04:00
Rob Rix
1f4eb8e475 Avoid the indirection through Maybe. 2017-06-15 09:44:09 -04:00
Rob Rix
b5cb522d62 Unpack a few fields. 2017-06-15 09:36:04 -04:00
Rob Rix
7e05cec95f Unbox feature vectors. 2017-06-15 09:20:31 -04:00
Rob Rix
c12a2465a5 RWS employs strict state. 2017-06-15 09:10:58 -04:00
Rob Rix
e15f5ad7ab Fold strictly. 2017-06-15 08:57:07 -04:00
Rob Rix
11859c9b51 Generate the lists of terms & diffs purely. 2017-06-15 08:55:23 -04:00
Rob Rix
655fab9277 Implement RWS directly. 2017-06-15 08:46:40 -04:00
Rob Rix
1aba30158b Re-export the whole module. 2017-06-15 08:32:50 -04:00
Rob Rix
60323b7f5c Simplify Command to just be Command.Files. 2017-06-15 08:32:08 -04:00
Rob Rix
a7a39a6e49 🔥 showsQuaternaryWith. 2017-06-14 17:49:28 -04:00
Rob Rix
f7c3f1153c 🔥 a couple of redundant imports. 2017-06-14 17:48:05 -04:00
Rob Rix
992ef93c0b Git gone. 2017-06-14 17:47:31 -04:00
Rob Rix
826461e8e2 🔥 text-icu. 2017-06-14 17:34:26 -04:00
Rob Rix
17f577b3f3 Merge branch 'master' into optimize-for-large-nested-branches 2017-06-14 16:56:09 -04:00
Rob Rix
cc26137954 Unpack Endpoint coordinates. 2017-06-14 16:09:48 -04:00
Rob Rix
9cef2b2cd6 Slide down diagonals along both axes. 2017-06-14 16:04:04 -04:00
Rob Rix
e1f2e988ed Moving/sliding doesn’t need to close over anything in searchAlongK. 2017-06-14 14:55:34 -04:00
Rob Rix
36392ca0f9 Avoid a let binding in searchAlongK. 2017-06-14 14:44:22 -04:00
Rob Rix
7a8780f8e8 🔥 the cost centres for prev/next. 2017-06-14 14:41:54 -04:00
Rob Rix
cc72a864e0 Bind getK, prev, & next in the where clause. 2017-06-14 14:41:28 -04:00
Rob Rix
641653bb5e Factor the k pairing into searchAlongK. 2017-06-14 13:03:59 -04:00
Rob Rix
6971dc8220 Factor out the predicate on endpoints. 2017-06-14 13:03:09 -04:00
Rob Rix
7937ad4569 Replace state and update at most once per envelope. 2017-06-14 12:58:07 -04:00
Timothy Clem
f8ecbda145 Just ready in a lazy bytestring for aeson's decode 2017-06-14 10:33:38 -06:00
Timothy Clem
8f6d25b9d8 Properly slice source for root node
Fixes a nasty bug where source files that begin with a newline weren't
getting properly sliced at the root node (code was erroneously assuming
that the first node starts at byte 0). If a file starts with a newline
the program node ends up starting at byte 1 and everything afterward was
offset by one.
2017-06-14 10:29:11 -06:00
Rob Rix
c3b0e95c0f Rename the cost centre for the insert. 2017-06-14 10:40:23 -04:00
Rob Rix
e43882e056 Use the standard definition of for. 2017-06-14 10:07:17 -04:00
Rob Rix
6b30cadb66 Give a simpler definition of for. 2017-06-14 10:06:35 -04:00
Rob Rix
a9bd12115e Revert "Inline the rightward/downward moves."
This reverts commit a0078718556c3590de47ac79afb120de61aafb47.
2017-06-14 10:03:48 -04:00
Rob Rix
a48ee6aa99 Revert "Rename prev to up and next to left."
This reverts commit 6d37db67bc5917c50c8d5d405c324971fbe72e2a.
2017-06-14 10:03:13 -04:00
Rob Rix
a86101d203 Revert "Rename the cost centres for the up/left endpoints."
This reverts commit f3b6a973fe060d619743f69472f39c811f2964f9.
2017-06-14 10:03:03 -04:00
Rob Rix
5fef78a739 Revert "🔥 Diagonal and Distance."
This reverts commit 7944ab5fb6e38fb54f81620ecca19911e6238add.
2017-06-14 10:02:53 -04:00
Rob Rix
7e272594de Revert "Swap up/left."
This reverts commit 790b53f306710a2607026d21a563208be0d57966.
2017-06-14 10:02:40 -04:00
Rob Rix
04f13ab227 Swap up/left. 2017-06-14 09:51:34 -04:00
Rob Rix
182aea8fa6 🔥 Diagonal and Distance. 2017-06-14 09:34:50 -04:00
Rob Rix
3044292140 Derive Eq & Show instances for Endpoint. 2017-06-14 09:33:32 -04:00
Rob Rix
a599a903d7 🔥 the Step synonym. 2017-06-14 09:33:13 -04:00
Rob Rix
b95c17bce6 Rename the cost centres for the up/left endpoints. 2017-06-14 09:28:17 -04:00
Rob Rix
334c066b48 🔥 Haddock markers. 2017-06-14 09:27:54 -04:00
Rob Rix
59183dda18 Rename prev to up and next to left. 2017-06-14 09:26:47 -04:00