1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
Commit Graph

9157 Commits

Author SHA1 Message Date
Rob Rix
7ada1dea20 🔥 liftShowsPrecBoth & liftShowListBoth. 2017-09-10 19:41:13 +01:00
Rob Rix
90496bdc1c Copy holds a TermF. 2017-09-10 19:40:48 +01:00
Rob Rix
1ccff72b08 Define a Pretty1 instance for Join. 2017-09-10 19:36:22 +01:00
Rob Rix
13c0b6d496 Define a Show1 instance for Join. 2017-09-10 19:34:49 +01:00
Rob Rix
bb11787db9 Define an Eq1 instance for Join. 2017-09-10 19:33:57 +01:00
Rob Rix
62a6235161 Define lifted showing for Both. 2017-09-10 19:32:25 +01:00
Rob Rix
4490297bb5 Derive an Enum instance. 2017-09-10 19:16:29 +01:00
Rob Rix
92e157cfb0 Use the newtype deriving strategy to define the ToJSON instance for Metavar. 2017-09-10 19:15:55 +01:00
Rob Rix
8b6b4dcc00 Define metavariables as Ints. 2017-09-10 19:14:44 +01:00
Rob Rix
8b1eb1e8be Compute the set of free metavariables in a diff. 2017-09-10 19:07:14 +01:00
Rob Rix
b4ca3be640 Simplify with a foldMap. 2017-09-10 18:34:42 +01:00
Rob Rix
36ac6a4104 Rename MetaVar to Metavar. 2017-09-10 18:28:21 +01:00
Rob Rix
a0de82e88e Simplify the non-Copy evalDiffR cases. 2017-09-10 18:01:55 +01:00
Rob Rix
f33cf1a3c5 Pull the extension of the environment into a helper. 2017-09-10 17:48:49 +01:00
Rob Rix
7020f5ffaa Parens. 2017-09-10 17:47:07 +01:00
Rob Rix
606b89772e Simplify evalDiffRM. 2017-09-10 17:46:54 +01:00
Rob Rix
80994e27dc 🔥 the helper function. 2017-09-10 17:46:25 +01:00
Rob Rix
49fd598b92 Define a getter for bindings. 2017-09-10 17:45:41 +01:00
Rob Rix
ebcaa3fb27 Simplify the Copy case. 2017-09-10 17:43:35 +01:00
Rob Rix
dbc79d8ab0 Simplify the non-Copy cases. 2017-09-10 17:43:12 +01:00
Rob Rix
472363e3e9 Define an effectful evaluator using Reader for the environment. 2017-09-10 17:41:48 +01:00
Rob Rix
65c7a5ae0b Produce multiple entries inside patches. 2017-09-10 17:12:44 +01:00
Rob Rix
6ee5c2d261 Force the after branch of replacements onto the next line. 2017-09-10 16:11:07 +01:00
Rob Rix
a2d9decbf0 Reformat replacements in sexpression rendering. 2017-09-10 16:03:36 +01:00
Rob Rix
5f7adb59be Dedupe replacements. 2017-09-10 15:54:40 +01:00
Rob Rix
b330eb45eb Produce only a single entry for patches. 2017-09-10 15:38:09 +01:00
Rob Rix
cc1f75cb1a Place entries for patch nodes above the body of the patch. 2017-09-10 15:25:38 +01:00
Rob Rix
fd05f7cb80 Patches count as changes. 2017-09-10 15:23:22 +01:00
Rob Rix
e5d345dca7 Simplify the selection of patches. 2017-09-10 15:15:14 +01:00
Rob Rix
d678048dfd Fix tables of contents for patches. 2017-09-10 10:46:04 +01:00
Rob Rix
8fff046b02 Correct s-expression output on the first line. 2017-09-09 23:16:24 +01:00
Rob Rix
760955c120 Apply padding to terms in renderSExpressionTerm. 2017-09-09 23:06:31 +01:00
Rob Rix
b7fa780060 Simplify some folds. 2017-09-09 23:01:51 +01:00
Rob Rix
e57beaeb9f Tweaks to s-expression rendering. 2017-09-09 22:56:41 +01:00
Rob Rix
66fc464357 Get rid of the other padding mechanism. 2017-09-09 22:27:46 +01:00
Rob Rix
5baab6ea6b Avoid extra newlines on the first line. 2017-09-09 21:48:40 +01:00
Rob Rix
ad6f618f56 Move the environment/metavar stuff down. 2017-09-09 21:37:11 +01:00
Rob Rix
da5bdac3d8 🔥 patchSum. 2017-09-09 21:36:22 +01:00
Rob Rix
987dcb7839 Patches recur through Diff. 2017-09-09 21:36:18 +01:00
Rob Rix
67cb8799ba Define an operator producing a Term from a SplitDiff. 2017-09-09 21:32:22 +01:00
Rob Rix
f064360d8c Rename some type parameters. 2017-09-09 21:32:12 +01:00
Rob Rix
114d5aa2d9 Derive some more instances for SplitPatch. 2017-09-09 21:24:46 +01:00
Rob Rix
a80ee2cdb4 Derive hella instances for Env. 2017-09-09 19:03:15 +01:00
Rob Rix
7374994127 Simplify the Eq1 instance for Term. 2017-09-09 18:58:56 +01:00
Rob Rix
345a96eca0 Simplify the Foldable, Functor, & Traversable instances for Term. 2017-09-09 18:57:58 +01:00
Rob Rix
280e3b2084 Specialize the Pretty instances over TermF for Unions. 2017-09-09 18:56:47 +01:00
Rob Rix
6eb0f7cff6 Add bindings & variables to diffs. 2017-09-09 18:14:05 +01:00
Rob Rix
19febc23aa Define diffCost as a catamorphism. 2017-09-09 18:03:07 +01:00
Rob Rix
0bfd29fddc Merge branch 'relocate-json-fields' into directed-acyclic-diffs 2017-09-09 17:49:12 +01:00
Rob Rix
d0a2687edc 🔥 all the LANGUAGE pragmas in Renderer.JSON. 2017-09-09 17:46:35 +01:00
Rob Rix
7404b41717 Renderer.JSON no longer contains orphan instances. 2017-09-09 17:46:08 +01:00
Rob Rix
c83746e74e Move the Output instance for [Value] to Data.Output. 2017-09-09 17:45:49 +01:00
Rob Rix
f6f1b21d94 Move the Output instance for maps to Data.Output. 2017-09-09 17:45:01 +01:00
Rob Rix
5be89f11ee 🔥 Renderer.JSON’s export of ToJSONFields. 2017-09-09 17:41:24 +01:00
Rob Rix
44aab0edcf Renderer.JSON is decidable. 2017-09-09 17:39:46 +01:00
Rob Rix
c6a111b71d 🔥 the ToJSON instance for Both. 2017-09-09 17:39:08 +01:00
Rob Rix
f30a5d0754 Move the ToJSON/ToJSONFields instances for Diff into Diff. 2017-09-09 17:37:26 +01:00
Rob Rix
c449ad481e Move the ToJSON/ToJSONFields instances for Term into Term. 2017-09-09 17:36:35 +01:00
Rob Rix
8ce60eecb8 Lift the Term/Diff ToJSONFields instances to * -> *. 2017-09-09 17:35:45 +01:00
Rob Rix
3231d85347 Define a lifting of ToJSONFields to * -> *. 2017-09-09 17:31:45 +01:00
Rob Rix
aa78f3eaeb Move the ToJSONFields instance for Category into Category. 2017-09-09 17:30:34 +01:00
Rob Rix
0845687d51 Move the ToJSONFields instance for Syntax into Syntax. 2017-09-09 17:25:55 +01:00
Rob Rix
4e3c34d8f7 Move the ToJSONFields instance for Patch into Patch. 2017-09-09 17:24:56 +01:00
Rob Rix
41ecede023 🔥 the ToJSONFields instance for unpopulated Unions. 2017-09-09 17:23:58 +01:00
Rob Rix
5b62e4bf5c Move the ToJSONFields instance for populated Unions into Data.JSON.Fields. 2017-09-09 17:23:49 +01:00
Rob Rix
7bb92dfd98 Move the ToJSONFields instance for [] into Data.JSON.Fields. 2017-09-09 17:23:28 +01:00
Rob Rix
c1b521ab9b Move the ToJSONFields instance for Maybe into Data.JSON.Fields. 2017-09-09 17:23:14 +01:00
Rob Rix
d7a5ea152d Move the ToJSONFields instance for Span into Data.Span. 2017-09-09 17:20:43 +01:00
Rob Rix
42c1795c0a Move the ToJSONFields instance for Range into Data.Range. 2017-09-09 17:19:46 +01:00
Rob Rix
62603c803c Move the ToJSONFields/ToJSON instances for Records into Data.Record. 2017-09-09 17:18:24 +01:00
Rob Rix
7a88cad094 Move the ToJSONFields instance for Both into the Data.JSON.Fields module. 2017-09-09 17:18:10 +01:00
Rob Rix
3e12a91359 Move ToJSONFields into its own module. 2017-09-09 17:16:00 +01:00
Rob Rix
c69e3383e3 Define a module for JSONFields. 2017-09-09 17:15:22 +01:00
Rob Rix
acff088e68 Define printTerm as a catamorphism. 2017-09-09 16:58:41 +01:00
Rob Rix
9765775242 Define printDiff as a catamorphism. 2017-09-09 16:55:32 +01:00
Rob Rix
1801fdc1a8 Define a diff evaluator. 2017-09-09 16:52:06 +01:00
Rob Rix
1637fa62a4 Define diffSum as a simpler catamorphism. 2017-09-09 16:09:55 +01:00
Rob Rix
9f795e0c54 Define an environment type. 2017-09-09 16:08:54 +01:00
Rob Rix
4c2ce050de Define a metavariable type. 2017-09-09 15:52:33 +01:00
Rob Rix
24914eeb05 Move the remaining Listable instances into the tests. 2017-09-09 14:51:37 +01:00
Rob Rix
3ad5374b94 Move all the Listable stuff into the tests. 2017-09-09 14:44:57 +01:00
Rob Rix
f01c65a0a2 Define a function computing the list of patches in a diff. 2017-09-09 14:23:20 +01:00
Rob Rix
0282bf1dae Define a Listable instance for Diff. 2017-09-09 13:48:48 +01:00
Rob Rix
63f2961e4b Define a Listable1 instance for Diff. 2017-09-09 13:48:25 +01:00
Rob Rix
32984965f8 Add Patch to the Listable2 instance for DiffF. 2017-09-09 13:47:51 +01:00
Rob Rix
a4e98d4318 Define a Listable instance for DiffF. 2017-09-09 13:46:21 +01:00
Rob Rix
6c744336a8 Define a Listable1 instance for DiffF. 2017-09-09 13:45:52 +01:00
Rob Rix
923a39faae Define Listable instances for TermF & Term. 2017-09-09 13:45:22 +01:00
Rob Rix
fa5aeb6ee6 Define a Listable2 instance for DiffF. 2017-09-09 13:44:07 +01:00
Rob Rix
1e6bd6e27e Define a Traversable instance for Diff. 2017-09-09 13:41:10 +01:00
Rob Rix
ff1cc394c4 Define a Foldable instance for Diff. 2017-09-09 13:40:07 +01:00
Rob Rix
a9ac82819c Give a different instance of Functor for Diff. 2017-09-09 13:39:04 +01:00
Rob Rix
8df8b345e7 Define a Bitraversable instance for DiffF. 2017-09-09 13:37:11 +01:00
Rob Rix
e42152dca8 Define a Bifoldable instance for DiffF. 2017-09-09 13:35:59 +01:00
Rob Rix
2094dd059b Derive Foldable & Traversable instances for DiffF. 2017-09-09 13:34:08 +01:00
Rob Rix
48175bb9b0 Define a Show instance for Diff. 2017-09-09 12:35:20 +01:00
Rob Rix
0df5175798 Define a Show1 instance for Diff. 2017-09-09 12:34:47 +01:00
Rob Rix
e7735ad131 Define an Eq instance for Diff. 2017-09-09 12:33:35 +01:00
Rob Rix
b4e02d41fd Define an Eq1 instance for Diff. 2017-09-09 12:33:09 +01:00
Rob Rix
03eb93db31 Define an Eq instance for DiffF. 2017-09-09 12:31:58 +01:00
Rob Rix
2f63aca72f Define an Eq1 instance for DiffF. 2017-09-09 12:31:30 +01:00
Rob Rix
f65fb137fa Define a Show instance for DiffF. 2017-09-09 12:31:04 +01:00
Rob Rix
e68d46081c Define a Show1 instance for DiffF. 2017-09-09 12:30:33 +01:00
Rob Rix
6837ee44e4 Define a Show2 instance for DiffF. 2017-09-09 12:30:06 +01:00
Rob Rix
33192c3ce0 Define lifted showing of Both. 2017-09-09 12:28:54 +01:00
Rob Rix
cd154559c4 Reformat the exports from Both. 2017-09-09 12:28:47 +01:00
Rob Rix
af31840ee9 Define an Eq2 instance for DiffF. 2017-09-09 12:24:55 +01:00
Rob Rix
221cf89b5b Derive Eq1 & Show1 instances for Patch. 2017-09-09 12:24:48 +01:00
Rob Rix
dab0e4d044 Define a Show1 instance for Syntax. 2017-09-09 12:15:54 +01:00
Rob Rix
7ca2e9ed4d Define a Traversable instance for Term. 2017-09-09 12:04:37 +01:00
Rob Rix
748ecbb104 Define a Bitraversable instance for TermF. 2017-09-09 12:03:55 +01:00
Rob Rix
ce02539dab Define a Foldable instance for Term. 2017-09-09 12:02:11 +01:00
Rob Rix
a358be60cc 🔥 a redundant Functor constraint. 2017-09-09 12:01:17 +01:00
Rob Rix
cfd583cd51 Define a Bifoldable instance for TermF. 2017-09-09 12:00:28 +01:00
Rob Rix
2454096b2b Spacing. 2017-09-09 12:00:21 +01:00
Rob Rix
3e496176cc Use the copy helper widely. 2017-09-09 11:57:56 +01:00
Rob Rix
30fe4d520b Define a copy helper. 2017-09-09 11:54:29 +01:00
Rob Rix
69cba8430f 🔥 wrapTermF. 2017-09-09 11:53:57 +01:00
Rob Rix
9d1d1717d9 Rename tailF to termSyntax. 2017-09-09 11:51:41 +01:00
Rob Rix
e2ffba2401 Rename headF to termAnnotation. 2017-09-09 11:50:29 +01:00
Rob Rix
b7e211c9c2 Redefine Term as a wrapper for TermF. 2017-09-09 11:47:10 +01:00
Rob Rix
1267fe5ea7 Rename the In constructor to Copy. 2017-09-09 11:27:04 +01:00
Rob Rix
9e40e9a09a Give our own definition of Diff. 2017-09-09 11:23:57 +01:00
Rob Rix
adf884def0 Rename expr to syntax. 2017-09-08 17:41:31 +01:00
Rob Rix
14e8bb46ec 🔥 UndecidableInstances in Assignment. 2017-09-08 17:40:54 +01:00
Rob Rix
e4c5d6bb82 Rename the Term/TermF type parameters. 2017-09-08 17:40:35 +01:00
Rob Rix
20758f1c31 🔥 the orphan instance disabling in Diff. 2017-09-08 17:38:51 +01:00
Rob Rix
c551923eff 🔥 some unnecessary extensions. 2017-09-08 17:38:35 +01:00
Rob Rix
d5af300094 Specialize the Pretty1 instance for Term to only apply to Terms of Unions. 2017-09-08 17:38:12 +01:00
Rob Rix
07bef3f75e 🔥 deepseq. 2017-09-08 17:35:55 +01:00
Rob Rix
d1ced22ce8 🔥 the NFData instances for Term. 2017-09-08 17:32:24 +01:00
Rob Rix
0ce48d5248 🔥 the NFData instances for Diff. 2017-09-08 17:32:05 +01:00
Rob Rix
ec8f535b2a Define decidable NFData instances. 2017-09-08 17:31:17 +01:00
Rob Rix
9e4ae0ee34 Rename cofree to term. 2017-09-08 17:23:16 +01:00
Rob Rix
dfccae778a Rename hoistCofree to hoistTerm. 2017-09-08 17:21:39 +01:00
Rob Rix
a16c6e4f75 Extract union pretty-printing to the top level. 2017-09-08 17:20:55 +01:00
Rob Rix
053954cc97 🔥 alignTermWith. 2017-09-08 17:18:46 +01:00
Rob Rix
ee27d73747 🔥 zipTerms. 2017-09-08 17:18:03 +01:00
Rob Rix
fe3fa0e811 Define Pretty, Pretty1, & Pretty2 instances for TermF. 2017-09-08 17:02:30 +01:00
Rob Rix
c358bfad08 Define a Show1 instance for TermF. 2017-09-08 17:00:09 +01:00
Rob Rix
0ca7a4bdcf Define a Show2 instance for TermF. 2017-09-08 16:59:40 +01:00
Rob Rix
3231b16399 Define Term printing via Show1. 2017-09-08 16:58:15 +01:00
Rob Rix
a8f0a965c3 Give fixity for :<<. 2017-09-08 16:56:29 +01:00
Rob Rix
d572c64b32 Define Term equality via Eq1. 2017-09-08 16:55:36 +01:00
Rob Rix
ea5107c484 Define Listable instances for Term/TermF. 2017-09-08 16:50:21 +01:00
Rob Rix
185818d8bd Rename runCofree to unTerm. 2017-09-08 16:46:35 +01:00
Rob Rix
f2cd05d5fc Rename Cofree/CofreeF to Term/TermF. 2017-09-08 16:45:08 +01:00
Rob Rix
aa9d4c4f19 Give our own definition of CofreeF. 2017-09-08 16:40:23 +01:00
Rob Rix
1a6af2179b Give our own definition of Cofree. 2017-09-08 16:24:11 +01:00
Rob Rix
a296ec4ca3 Re-enable the orphan instance warning in Term. 2017-09-08 15:54:35 +01:00
Rob Rix
426a4922d4 Avoid expensive tests whenever possible. 2017-09-08 13:40:34 +01:00
Rob Rix
46e258ffd8 🔥 the Advance combinator. 2017-09-08 13:13:10 +01:00
Rob Rix
3ca3e65b11 Bind the choice operation at the top level to avoid recomputing it. 2017-09-08 09:28:36 +01:00
Rob Rix
ebc13c5b39 Clean up fromListWith with <$>. 2017-09-08 01:01:45 +01:00
Rob Rix
1ab6f5f8d5 🔥 distribution of <|> through continuations. 2017-09-08 00:44:43 +01:00
Rob Rix
f111c1edc9 Move the Fail case up. 2017-09-08 00:43:37 +01:00
Rob Rix
1468743832 Revert "Match comments with expression."
This reverts commit b7bc1d7ced4ecea66022292a0c340e3aed22af5d.
2017-09-01 14:29:49 -04:00
Rob Rix
f5abaa351c Revert "🔥 the top-level handleError."
This reverts commit 9b7e394bfa8aacc266d8301c95aef1eefbce0c91.
2017-09-01 14:18:03 -04:00
Rob Rix
160fc8bbfa Revert "Define a Result type synonym."
This reverts commit 62d7855fe830b394af3ea0b536685f369863cb8d.
2017-09-01 14:10:32 -04:00
Rob Rix
3be8948e2e Correct the file util’s selection of the blob language. 2017-09-01 14:08:02 -04:00
Rob Rix
bbc20dc6ab Don’t log the blob language when we don’t have one. 2017-09-01 14:07:42 -04:00
Rob Rix
a7fd575ea8 Define a Result type synonym. 2017-09-01 13:46:44 -04:00
Rob Rix
8d4889f124 Use the token rule to match parse errors. 2017-09-01 13:37:31 -04:00
Rob Rix
e0ca2e87dd 🔥 the top-level handleError. 2017-09-01 13:33:43 -04:00
Rob Rix
c799303aa0 Match parse errors at the top level. 2017-09-01 13:21:13 -04:00
Rob Rix
d408f286c7 Match parse errors explicitly. 2017-09-01 13:20:14 -04:00
Rob Rix
12d7a0d57f Match comments with expression. 2017-09-01 13:05:58 -04:00
Rob Rix
2317d56355 📝 choice. 2017-09-01 12:41:05 -04:00
Rob Rix
826adc829f 🔥 the Array table module. 2017-09-01 12:37:02 -04:00
Rob Rix
c8798c6ea7 Rename the IntMap table module to Table. 2017-09-01 12:36:35 -04:00
Rob Rix
7bb025ed76 🔥 the Table module. 2017-09-01 12:35:57 -04:00
Rob Rix
25230f8c2f Don’t bother with a shared thunk. 2017-09-01 11:11:33 -04:00
Rob Rix
aa15d3e0fd Unique the symbols with an IntSet. 2017-09-01 11:01:11 -04:00
Rob Rix
2e51edbc97 Unique the symbols with a Set. 2017-09-01 10:57:59 -04:00
Rob Rix
5a94cc1a8a Use a uniqued list of symbols. 2017-09-01 10:56:03 -04:00
Rob Rix
7e3000bc5a Chain error handlers on after continuations. 2017-09-01 10:51:11 -04:00
Rob Rix
9b7f335a9d Implement MonadError in terms of Choose error handlers. 2017-09-01 10:49:49 -04:00
Rob Rix
a6b1d4e9a9 Add a Fail rule & MonadFail instance. 2017-09-01 10:36:32 -04:00
Rob Rix
d6c8947350 Store the addresses in an IntSet. 2017-09-01 10:16:15 -04:00
Rob Rix
4c852dd107 Array-backed jump tables hold a set of indices. 2017-09-01 10:12:07 -04:00
Rob Rix
aed5ba4c76 Revert "foldMap tables together directly."
This reverts commit 7e17b36f199e9bc464d1c4bc912a062ab60eef05.
2017-09-01 10:02:36 -04:00
Rob Rix
761fdaef30 foldMap tables together directly. 2017-09-01 10:02:28 -04:00
Rob Rix
baf20927f4 Define a Semigroup instance for Assignment. 2017-09-01 09:59:03 -04:00
Rob Rix
d06927f604 Define a Monoid instance for Assignment. 2017-09-01 09:58:54 -04:00
Rob Rix
ddb5518878 Define a Monoid instance for IntMap-based jump tables. 2017-09-01 09:56:21 -04:00
Rob Rix
1c79fc59cc Unique the symbols. 2017-09-01 09:48:26 -04:00
Rob Rix
cb73a6c55e Merge branch 'master' into explicit-choice 2017-09-01 09:27:01 -04:00
Rob Rix
8f9efc83d4 Use the IntMap jump table. 2017-08-31 23:28:00 -04:00
Rob Rix
81f89f8dcd Replace Bounded constraints with Enum constraints wherever necessary. 2017-08-31 23:27:39 -04:00
Rob Rix
6da1cf9a0e List the exports explicitly. 2017-08-31 23:22:25 -04:00
Rob Rix
6929b6955d Define a Show1 instance for IntMap-based Table. 2017-08-31 23:22:18 -04:00
Rob Rix
216381fb4c Define table lookup. 2017-08-31 23:22:04 -04:00
Rob Rix
5906f85c61 Define table elimination. 2017-08-31 23:21:57 -04:00
Rob Rix
2161284541 Define merging table construction. 2017-08-31 23:21:34 -04:00
Rob Rix
5de3acd374 Define singleton table construction. 2017-08-31 23:21:01 -04:00
Rob Rix
93a990ce43 Stub in a datatype for an IntMap-based jump table. 2017-08-31 23:20:48 -04:00
Rob Rix
fcbefe2a11 Derive Eq & Show instances for Table. 2017-08-31 23:12:29 -04:00
Rob Rix
4d07a6d7f2 Define Choose in terms of Table. 2017-08-31 23:10:38 -04:00
Rob Rix
8bbf7e0c5e Define a function to lookup a branch in a Table. 2017-08-31 23:09:08 -04:00
Rob Rix
d742af2c28 Define a function to produce a list of associations from a Table. 2017-08-31 23:08:54 -04:00
Rob Rix
aede0519c5 Define a fromListWith constructor. 2017-08-31 22:56:18 -04:00
Rob Rix
f1b406fc16 Rename tableSingleton to singleton. 2017-08-31 22:43:11 -04:00
Rob Rix
90b0475b1a Define a function to construct singleton tables. 2017-08-31 22:40:50 -04:00
Rob Rix
a827e8d331 Derive Foldable, Functor, & Traversable instances. 2017-08-31 22:40:40 -04:00
Rob Rix
238d0fdb4a Only show the populated branches. 2017-08-31 22:32:56 -04:00
Rob Rix
ea01aa9e2b Define a Show1 instance for Table. 2017-08-31 22:29:42 -04:00
Rob Rix
207db7c0a1 Explicitly export the Table datatype & its addresses selector. 2017-08-31 22:15:27 -04:00
Rob Rix
9c94c36c3e Stub in a datatype for the array-based jump table. 2017-08-31 22:15:13 -04:00
Rob Rix
20e10ff3a4 Re-export the Array module. 2017-08-31 22:08:17 -04:00
Rob Rix
e0d2debad5 Stub in a module for IntMap-based jump tables. 2017-08-31 22:07:38 -04:00
Rob Rix
e0a9b5681e Stub in a module for array-based jump tables. 2017-08-31 22:07:12 -04:00
Rob Rix
d89d82924a Stub in a module for jump tables. 2017-08-31 22:04:49 -04:00
Rob Rix
14dfcfa170 Attach the error handler to the choice. 2017-08-31 17:34:55 -04:00
Rob Rix
7df83715dd catchError adds handlers to choices. 2017-08-31 16:04:13 -04:00
Rob Rix
3f00e0a1af Add a committed failure handler to choices. 2017-08-31 16:01:52 -04:00
Rob Rix
c82cb8c9e9 Choose holds full assignments. 2017-08-31 15:49:00 -04:00
Rob Rix
0d492cc899 Unpack Alt rules in choices. 2017-08-31 15:16:01 -04:00
Rob Rix
ca16c9c0c3 Rename Jump to Choose. 2017-08-31 14:55:24 -04:00
Rob Rix
7c01239a0d 🔥 Choose nodes. 2017-08-31 14:54:53 -04:00
Rob Rix
3cd2d2b4c2 Always construct Alt nodes in <|>. 2017-08-31 14:53:36 -04:00
Rob Rix
d655429fc0 Only map over populated cells. 2017-08-31 12:38:04 -04:00
Rob Rix
38ec3182e8 symbol constructs Jump nodes. 2017-08-31 12:33:24 -04:00
Rob Rix
3e5953c0c2 Construct jump arrays in choice. 2017-08-31 12:21:38 -04:00
Rob Rix
682dfb41e1 Merge overlapping entries in choice. 2017-08-31 11:52:30 -04:00
Rob Rix
9531432789 Use some1 in the Python assignment. 2017-08-31 11:42:41 -04:00
Rob Rix
6ca0bc8077 Avoid dropping rules when merging choices. 2017-08-31 11:40:28 -04:00
Rob Rix
0eab75c320 foldMap the symbols/choices/atEnd. 2017-08-31 11:33:09 -04:00
Rob Rix
e6ccc0106b Select from all the alternatives at end. 2017-08-31 11:14:25 -04:00
Rob Rix
1cec072932 Factor labels in. 2017-08-31 11:05:11 -04:00
Rob Rix
2e671db7e3 Factor catchError in. 2017-08-31 11:03:58 -04:00
Rob Rix
2d65031643 Factor repetitions in. 2017-08-31 11:02:34 -04:00
Rob Rix
0715f8a0b2 Construct a Choose node from a list of Choose nodes. 2017-08-31 11:02:18 -04:00
Rob Rix
90ea2e5193 Use choice to construct the expression table. 2017-08-31 10:53:54 -04:00
Rob Rix
e06a8f1fbc Use asum to construct infix context. 2017-08-31 10:52:49 -04:00
Rob Rix
7b16cd4ddf Build the expression choice with the choose operator. 2017-08-31 10:11:47 -04:00
Rob Rix
52248fcbd4 Add an operator to explicitly construct a Choose node. 2017-08-31 10:02:52 -04:00
Rob Rix
b0710ccfb8 Define the MonadError instance in terms of SomeException. 2017-08-29 18:22:40 -04:00
Rob Rix
568fce81d3 Use MonadError in runParser. 2017-08-29 18:20:03 -04:00
Rob Rix
04593870e7 Define an Exception instance for Error. 2017-08-29 17:33:30 -04:00
Rob Rix
e0ad055522 Derive a Typeable instance for Error. 2017-08-29 17:33:19 -04:00
Rob Rix
a542607dd7 Add a MonadError instance to Task. 2017-08-29 17:20:21 -04:00
Rob Rix
d420f1460e Add Throw/Catch primitives to Task. 2017-08-29 17:20:15 -04:00
Rob Rix
500afcad42 📝 LiftIO. 2017-08-29 17:04:05 -04:00
Rob Rix
4c38049e2f Merge branch 'master' into update-python-assignment 2017-08-25 13:21:32 -04:00
Rob Rix
84aaba64d9 Add a convenience to read a file and guess its language. 2017-08-25 12:25:18 -04:00
Rob Rix
c7b7d1516e Define a pretty-printing convenience. 2017-08-25 12:23:22 -04:00
Rob Rix
b318e31b2b Stub in a Semantic.Util module. 2017-08-25 12:22:22 -04:00
Rob Rix
9a370137df Define prettyBytes once for all syntax modules. 2017-08-25 12:20:17 -04:00
Rick Winfrey
0afabb1183 Bump Python grammar 2017-08-24 16:34:31 -07:00
Rick Winfrey
b6bf941ae9 🔥 no longer valid symbols 2017-08-24 16:23:13 -07:00