1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 05:41:54 +03:00
Commit Graph

657 Commits

Author SHA1 Message Date
Rob Rix
4fdef93d72
Generalize the parser to arbitrary carriers for Core. 2019-07-29 11:24:22 -04:00
Rob Rix
e2db378be6
Fix the tests. 2019-07-29 11:18:19 -04:00
Rob Rix
e9b21f6ebf
Generate terms capable of annotation in the parser. 2019-07-29 11:18:15 -04:00
Rob Rix
01f1176348
Split out an Ann datatype representing locations. 2019-07-29 11:12:06 -04:00
Rob Rix
99a4f8ed5a
Write an empty scope graph into the heap during abstraction. 2019-07-26 15:45:52 -04:00
Rob Rix
16b1442b4b
Simplify deref slightly. 2019-07-26 15:35:43 -04:00
Rob Rix
0c106865f7
Record where names were bound. 2019-07-26 15:19:39 -04:00
Rob Rix
09f2362cd2
Abstract closures to their graphs. 2019-07-26 15:13:43 -04:00
Rob Rix
cb5b0fb2c4
Don’t allocate a pointless heap cell. 2019-07-25 13:28:02 -04:00
Rob Rix
b8f7bb06db
Don’t provide a current FrameId. 2019-07-25 13:11:07 -04:00
Rob Rix
3654aac2c8
🔥 the parent addr from the import & scope graph analyses. 2019-07-25 13:09:16 -04:00
Rob Rix
53e08b38ba
🔥 the specialization of String in the scope graph. 2019-07-25 13:03:05 -04:00
Rob Rix
f6cd84eba7
Merge branch 'sequence-values-in-the-abstract-domain' into scope-graphs 2019-07-25 12:57:07 -04:00
Rob Rix
0f34dcec45
Sequence values in the abstract domain. 2019-07-25 12:33:33 -04:00
Rob Rix
cd950fd6ec
Derive a Semigroup instance for Term Monotype a. 2019-07-25 12:33:13 -04:00
Rob Rix
7d9100f816
Derive a Semigroup instance for Concrete. 2019-07-25 12:33:00 -04:00
Rob Rix
fde3424c13
Dedent all the Analysis fields. 2019-07-25 12:32:47 -04:00
Rob Rix
057a4f8b5a
Copy in the import graph definition. 2019-07-25 09:31:36 -04:00
Rob Rix
5a40e01ff1
Derive Eq, Ord, & Show instances for Entry. 2019-07-25 09:30:15 -04:00
Rob Rix
8c59f9dc42
Only import the one symbol from Data.Text. 2019-07-25 09:30:02 -04:00
Rob Rix
455990dbc2
Change entrySymbol’s type to Text. 2019-07-24 08:07:35 -04:00
Rob Rix
a0bf65f43b
Move Edge into Concrete. 2019-07-23 16:11:04 -04:00
Rob Rix
7c24672921
Parse whitespace following string literals. 2019-07-23 15:53:18 -04:00
Rob Rix
41a31d1873
Simplify the projection rule. 2019-07-23 15:49:22 -04:00
Rob Rix
15430badec
Alignment. 2019-07-23 15:44:02 -04:00
Rob Rix
0254bc9895
Parse more escape sequences. 2019-07-23 15:43:25 -04:00
Rob Rix
f10cbb21b3
Generate string literals. 2019-07-23 15:43:11 -04:00
Rob Rix
3d65ae97ef
Sort the atoms. 2019-07-23 15:27:03 -04:00
Rob Rix
ac3f487703
Correct the precedence of load. 2019-07-23 15:24:19 -04:00
Rob Rix
3b6741456d
Rename edge to load. 2019-07-23 15:23:45 -04:00
Rob Rix
e4470bcbcc
Generate load instructions. 2019-07-23 15:23:26 -04:00
Rob Rix
0d530dc078
Sort the recursive generators. 2019-07-23 15:22:12 -04:00
Rob Rix
4bd2129511
Lower the precedence in lambda bodies. 2019-07-23 15:20:20 -04:00
Rob Rix
8e5c2163b8
Correct the precedence of recursive bindings. 2019-07-23 15:19:59 -04:00
Rob Rix
308066fbb1
Generate recursive bindings. 2019-07-23 15:18:04 -04:00
Rob Rix
e03236d301
Generate assignments. 2019-07-23 15:15:55 -04:00
Rob Rix
068941e3e1
Correct the precedence of if/then/else and lambda. 2019-07-23 15:12:41 -04:00
Rob Rix
9ccd11ef09
ifthenelse and lambda bind looser than assignment. 2019-07-23 15:10:51 -04:00
Rob Rix
08878f1a18
assign binds looser than application. 2019-07-23 15:07:21 -04:00
Rob Rix
59af553279
Recur via expr. 2019-07-23 15:05:46 -04:00
Rob Rix
d1671a6d7c
Rename prj to projection. 2019-07-23 15:02:24 -04:00
Rob Rix
b700740174
Split out a rule for application. 2019-07-23 15:02:05 -04:00
Rob Rix
b58ddb470b
Projections are lvalues. 2019-07-23 15:01:25 -04:00
Rob Rix
76eb3e2154
Pretty-print with mandatory precedence handling. 2019-07-23 15:00:32 -04:00
Rob Rix
5b682606bc
inParens wraps a Doc, not an action. 2019-07-23 12:34:10 -04:00
Rob Rix
99668a33a1
Don’t set the precedence recursively. 2019-07-23 12:31:35 -04:00
Rob Rix
edbea6991c
Indentation. 2019-07-23 12:27:24 -04:00
Rob Rix
56d40daef4
Rename with to withPrec. 2019-07-23 12:26:25 -04:00
Rob Rix
96127627f6
Define Prec as a newtype. 2019-07-23 12:24:45 -04:00
Rob Rix
3da182dcec
Comma-separate records. 2019-07-23 12:12:02 -04:00
Rob Rix
453b898581
Use colons to separate keys & values. 2019-07-23 12:10:24 -04:00
Rob Rix
47b43cf009
Don’t pad empty records. 2019-07-23 12:08:28 -04:00
Rob Rix
a96eadb620
Nest & align recursive bindings. 2019-07-23 12:07:08 -04:00
Rob Rix
b119712c53
Avoid redundant nesting of statements. 2019-07-23 12:03:19 -04:00
Rob Rix
6b250c723e
Pretty-print variables early. 2019-07-23 11:46:06 -04:00
Rob Rix
7b290632e5
🔥 bind. 2019-07-23 11:43:38 -04:00
Rob Rix
0045283378
Define unstatements using un. 2019-07-23 11:40:01 -04:00
Rob Rix
1e4315736f
Pass the index to un/unEither’s argument. 2019-07-23 11:38:48 -04:00
Rob Rix
6aa85afa76
Simplify un/unEither to not assume a Monad. 2019-07-23 11:37:38 -04:00
Rob Rix
fa9c991320
Define an eliminator for blocks of statements. 2019-07-23 11:30:14 -04:00
Rob Rix
6050b9594d
Define an eliminator for statements. 2019-07-23 11:18:21 -04:00
Rob Rix
16413e1e5b
Define a couple of functions for taking apart sequences of syntax. 2019-07-23 11:15:47 -04:00
Rob Rix
a63e7c3418
Clean up the language extensions in Data.Name. 2019-07-23 11:14:43 -04:00
Rob Rix
1caf99b0bf
Align. 2019-07-23 11:11:24 -04:00
Rob Rix
aa7f1fc6cc
Define a Bifunctor instance for :<-. 2019-07-23 11:10:49 -04:00
Rob Rix
b0ee9eeb80
Derive Foldable, Functor, & Traversable instances for :<-. 2019-07-23 11:10:04 -04:00
Rob Rix
4e98c0434b
Move the unseq/unseqs exports up. 2019-07-23 11:09:12 -04:00
Rob Rix
ed0231cdf2
Add an unbind eliminator for >>>=. 2019-07-23 11:08:55 -04:00
Rob Rix
9b3164a722
🔥 block. 2019-07-23 11:02:06 -04:00
Rob Rix
50f9b82ae6
Nest sequences. 2019-07-23 11:01:25 -04:00
Rob Rix
390b25a894
Wrap & indent records. 2019-07-23 09:56:00 -04:00
Rob Rix
f1c4d8a1c5
Add spaces inside records’ braces. 2019-07-23 09:54:08 -04:00
Rob Rix
77acb91a7f
Add spaces inside braces. 2019-07-23 09:53:13 -04:00
Rob Rix
5c033abb3e
🔥 encloseIf. 2019-07-23 09:51:52 -04:00
Rob Rix
200bf17d27
Print spaces after semicolons. 2019-07-23 09:47:24 -04:00
Rob Rix
024d2d4072
Don’t qualify the Pretty import. 2019-07-23 09:44:12 -04:00
Rob Rix
09fdb30653
Alignment. 2019-07-23 09:43:27 -04:00
Rob Rix
f851b2bc92
Correct a bunch of precedences. 2019-07-23 09:40:56 -04:00
Rob Rix
0cb3f181d0
Indentation. 2019-07-23 09:40:47 -04:00
Rob Rix
a5ac6f3342
Correct the condition on parenthesization. 2019-07-23 09:40:27 -04:00
Rob Rix
344b5bded1
Projection binds tighter than application. 2019-07-22 16:26:41 -04:00
Rob Rix
45723e71fc
Simplify the pretty-printing of sequences with a helper. 2019-07-22 16:19:22 -04:00
Rob Rix
539f8db2f6
Test roundtripping of general expressions. 2019-07-22 15:42:08 -04:00
Rob Rix
b43bdbb353
Use named' to define the name generator. 2019-07-22 15:33:47 -04:00
Rob Rix
043d3083fa
Generate records. 2019-07-22 15:26:02 -04:00
Rob Rix
52da8b764c
Qualify the import of Data.Core. 2019-07-22 15:13:14 -04:00
Rob Rix
f9eea3892a
Print braces around nested binds. 2019-07-22 15:07:35 -04:00
Rob Rix
a77ecdbe78
Parse binding statements. 2019-07-22 15:04:46 -04:00
Rob Rix
a39e7730ea
Follow the do' model for the Ruby prelude. 2019-07-22 15:02:10 -04:00
Rob Rix
b8bcad0126
Use do' instead of block. 2019-07-22 14:53:54 -04:00
Rob Rix
1ce4153148
do' doesn’t take an explicit body. 2019-07-22 14:52:54 -04:00
Rob Rix
0797316ead
Rename binds to do'. 2019-07-22 14:43:56 -04:00
Rob Rix
724ae1763f
Allow binds to process non-binding statements. 2019-07-22 14:42:46 -04:00
Rob Rix
a25d971250
Better pretty-printing of parse errors. 2019-07-22 14:32:05 -04:00
Rob Rix
ed94f7e5c3
Fix the expectation for projections. 2019-07-22 14:27:03 -04:00
Rob Rix
95226623bf
🔥 redundant specs. 2019-07-22 14:26:49 -04:00
Rob Rix
45a3d6f0c1
Fix the generators. 2019-07-22 14:24:40 -04:00
Rob Rix
325dc9d8a2
🔥 some redundant FIXMEs. 2019-07-22 14:19:17 -04:00
Rob Rix
69b21510b2
Implement typechecking for records. 2019-07-22 13:38:02 -04:00
Rob Rix
0c80fd246c
Set the super field. 2019-07-22 13:32:52 -04:00
Rob Rix
37caa4d759
Annotate the Ruby prelude deeply. 2019-07-22 13:23:21 -04:00
Rob Rix
3f7ac5eb50
Compute the fields of the record. 2019-07-22 13:06:46 -04:00
Rob Rix
acfcee116f
Bind the Ruby prelude sequentially. 2019-07-22 13:05:01 -04:00
Rob Rix
900bdbe426
Rename objectFrame to recordFrame. 2019-07-22 12:08:41 -04:00
Rob Rix
a1f41e155b
Rename Obj to Record. 2019-07-22 12:08:20 -04:00
Rob Rix
d29928827d
Only close over the free variables. 2019-07-22 12:07:51 -04:00
Rob Rix
2a600397b2
Closures close over their lexical environment once more. 2019-07-22 12:06:15 -04:00
Rob Rix
77cb532ae4
Annotate prog5 deeply. 2019-07-22 11:57:11 -04:00
Rob Rix
9ffd3f87e5
Annotate the entire prelude, not just the composition with ann. 2019-07-22 11:51:06 -04:00
Rob Rix
1abddf42b3
Annotate each binding. 2019-07-22 11:50:42 -04:00
Rob Rix
958d32fb52
Follow edges through the graph. 2019-07-22 11:43:28 -04:00
Rob Rix
9b6f7dd148
Obj holds an Env, not a Frame. 2019-07-22 11:32:58 -04:00
Rob Rix
384c221ef6
🔥 frameEdges. 2019-07-22 11:31:47 -04:00
Rob Rix
d41d7757fe
Don’t stratify frames through the heap. 2019-07-22 11:28:38 -04:00
Rob Rix
6c5240bfba
Bind and look names up in an Env. 2019-07-22 11:23:59 -04:00
Rob Rix
fea81ee213
🔥 the frame operation. 2019-07-22 11:19:09 -04:00
Rob Rix
8bc79bd804
Define and implement a record operation. 2019-07-22 11:18:34 -04:00
Rob Rix
5f21602967
🔥 some redundant FIXMEs. 2019-07-22 11:15:44 -04:00
Rob Rix
b0bc2cf25b
Note a FIXME. 2019-07-22 11:10:33 -04:00
Rob Rix
c613b0cef2
🔥 the edge instruction. 2019-07-22 11:10:00 -04:00
Rob Rix
cd3f73afdb
bind acts locally. 2019-07-22 11:08:22 -04:00
Rob Rix
4cc6520d57
Define :. as strictly projection. 2019-07-22 11:04:25 -04:00
Rob Rix
fb318fa56c
Tidier frame-pushing. 2019-07-22 11:00:42 -04:00
Rob Rix
2c13ed8b53
Don’t build a lambda for method calls. 2019-07-22 10:44:49 -04:00
Rob Rix
d5afd8434e
Rename bind* to abstract*. 2019-07-22 10:43:17 -04:00
Rob Rix
8373e3a7bb
🔥 a redundant qualifier. 2019-07-22 10:42:36 -04:00
Rob Rix
b851621c6f
📝 Rec. 2019-07-22 10:40:17 -04:00
Rob Rix
5e8a2c27c6
Note that :>>= is sequential let. 2019-07-22 10:38:08 -04:00
Rob Rix
85c1815b9f
Look up globals in the global scope. 2019-07-22 10:32:50 -04:00
Rob Rix
c495b4bf07
🔥 Edge. 2019-07-22 10:28:41 -04:00
Rob Rix
94546f7e75
Define a helper for binding multiple local variables in a sequence. 2019-07-22 10:24:07 -04:00
Rob Rix
c9b328eff5
🔥 a bunch of redundant prefixes. 2019-07-22 10:18:17 -04:00
Rob Rix
c175bc3553
Bind the global scope recursively. 2019-07-22 10:18:02 -04:00
Rob Rix
2a5c1818d1
🔥 lam'/lams'. 2019-07-22 10:12:48 -04:00
Rob Rix
1d50aecd9e
Define prog5 using lams. 2019-07-22 10:09:26 -04:00
Rob Rix
db448e6847
🔥 Let & Frame. 2019-07-22 10:07:27 -04:00
Rob Rix
b5a0624853
🔥 redundant parens. 2019-07-22 09:42:09 -04:00
Rob Rix
f24ef8b0a4
Correct the docs for Record. 2019-07-19 15:31:47 -04:00
Rob Rix
bff499e934
📝 :.. 2019-07-19 15:31:19 -04:00
Rob Rix
ef24642f26
Give fixity & precedence for :<-. 2019-07-19 15:25:33 -04:00
Rob Rix
38efb33327
Move unseq & unseqs up under >>>. 2019-07-19 15:19:34 -04:00
Rob Rix
e809a2935b
📝 :>>=. 2019-07-19 15:06:27 -04:00
Rob Rix
6f5e578d0f
Define a smart constructor for local bindings. 2019-07-19 15:04:27 -04:00
Rob Rix
15a125ba3b
Give fixity & precedence for >>>. 2019-07-19 15:01:01 -04:00
Rob Rix
a10cdc9380
Use >>> to define Block’s Semigroup instance. 2019-07-19 15:00:39 -04:00
Rob Rix
8c06d7bf0e
Reintroduce assignment syntax. 2019-07-19 14:58:31 -04:00
Rob Rix
cbf9f431dd
Define a smart-constructor for :>>. 2019-07-19 14:44:54 -04:00
Rob Rix
79f573795d
Parse records. 2019-07-19 14:36:22 -04:00
Rob Rix
972a52dcbf
Prefix records during pretty-printing. 2019-07-19 14:32:08 -04:00
Rob Rix
3459b3b058
Parse recursive bindings. 2019-07-19 14:28:48 -04:00
Rob Rix
2606e1eff1
🔥 a redundant where clause. 2019-07-19 14:26:08 -04:00
Rob Rix
1398c995a0
Redefine records as a flat list of bindings. 2019-07-19 14:21:39 -04:00
Rob Rix
f373ca410f
Define a smart constructor for recursive bindings. 2019-07-19 14:16:41 -04:00
Rob Rix
e259bc0e91
Define a recursive binder. 2019-07-19 14:03:31 -04:00
Rob Rix
00beb2dbce
Define a smart constructor for records. 2019-07-19 12:31:00 -04:00
Rob Rix
218c8f3ba0
Define records of simultaneously-bound fields. 2019-07-19 12:18:48 -04:00
Rob Rix
83cd925263
Use Named to represent the binder. 2019-07-19 12:03:50 -04:00
Rob Rix
de519912be
Generalize encloseIf to any Semigroup. 2019-07-19 11:53:09 -04:00
Rob Rix
ebafd644d3
Move encloseIf back into Data.Core.Pretty. 2019-07-19 11:52:17 -04:00
Rob Rix
0115512f58
Simplify how we instantiate in unlam. 2019-07-19 11:45:29 -04:00
Rob Rix
02b955819c
Correct prog5 to construct and return a new frame. 2019-07-19 11:10:40 -04:00
Rob Rix
90c6bea5f0
Increase the precedence of $$. 2019-07-19 11:08:23 -04:00
Rob Rix
53598bd6e9
Revert "Give fromScope a parameter to bind over the contents of the scope."
This reverts commit d998f66133.
2019-07-19 11:00:02 -04:00
Rob Rix
66c0bffc17
Instantiate. 2019-07-19 10:59:02 -04:00
Rob Rix
a45c029d86
Simplify prettyCore.go. 2019-07-19 09:59:08 -04:00
Rob Rix
d998f66133
Give fromScope a parameter to bind over the contents of the scope. 2019-07-19 09:58:10 -04:00
Rob Rix
790f4e3084
Revert "Define a fixpoint over rank-n quantified mendler-style recursive functions."
This reverts commit 835506030b.
2019-07-19 09:44:25 -04:00
Rob Rix
835506030b
Define a fixpoint over rank-n quantified mendler-style recursive functions. 2019-07-19 09:42:10 -04:00
Rob Rix
89cdd3bda3
Reformat the signature for typecheckingAnalysis. 2019-07-19 08:46:02 -04:00
Rob Rix
7d336c9d9a
Reformat a little. 2019-07-19 08:43:31 -04:00
Rob Rix
f81384767a
Reformat the signature for eval. 2019-07-18 22:00:45 -04:00
Rob Rix
01c963069e
Merge branch 'types-as-syntax' into gen-x 2019-07-18 21:37:07 -04:00
Rob Rix
4ccf31d863
Replace Substitutable with monadic substitution. 2019-07-18 17:01:03 -04:00
Rob Rix
fcaf1307dd
Replace FreeVariables with a function abstracted over a Foldable instance. 2019-07-18 16:53:00 -04:00
Rob Rix
e533091826
🔥 Gensym. 2019-07-18 16:39:23 -04:00
Rob Rix
cda5e3d80e
🔥 Namespaced. 2019-07-18 16:38:58 -04:00
Rob Rix
467292d509
🔥 Name. 2019-07-18 16:38:25 -04:00
Rob Rix
62c09c308b
🔥 Naming. 2019-07-18 16:37:51 -04:00
Rob Rix
59f09cc679
🔥 NamingC & runNaming. 2019-07-18 16:37:13 -04:00
Rob Rix
baa675f235
🔥 prime. 2019-07-18 16:35:57 -04:00
Rob Rix
03ed4cd3ae
Analyze with names in User. 2019-07-18 16:34:41 -04:00
Rob Rix
122b631811
Use Void to represent closed terms. 2019-07-18 16:19:05 -04:00
Rob Rix
5dbf727985
Generalize in pure code. 2019-07-18 16:10:16 -04:00
Rob Rix
a83cdffa73
Define a function to close a term. 2019-07-18 16:08:32 -04:00
Rob Rix
8371475e43
Use hoistTerm to generalize monotypes to polytypes. 2019-07-18 16:02:52 -04:00
Rob Rix
29fc72f288
Define a hoisting operation over Term. 2019-07-18 15:56:14 -04:00
Rob Rix
2388800416
🔥 the duplication between Monotype & Polytype. 2019-07-18 15:53:30 -04:00
Rob Rix
3e7123ff85
🔥 the M prefixes on Monotype’s constructors. 2019-07-18 15:48:24 -04:00
Rob Rix
b81cbf2686
Represent Monotype in Term. 2019-07-18 15:46:47 -04:00
Rob Rix
a5151d34e1
Derive Eq, Ord, & Show instances for Polytype. 2019-07-18 15:31:53 -04:00
Rob Rix
fcfc81606a
Derive some more instances for Monotype. 2019-07-18 15:26:13 -04:00
Rob Rix
c4fa4faf5c
🔥 PBound/PFree. 2019-07-18 15:24:43 -04:00
Rob Rix
7763028709
🔥 MFree. 2019-07-18 15:23:59 -04:00
Rob Rix
a9894d026e
Bind polytypes as scope-safe syntax. 2019-07-18 15:21:57 -04:00
Rob Rix
05a309745b
Tidy up the language extensions. 2019-07-18 14:45:30 -04:00
Rob Rix
70f67c0165
🔥 the Syntax class. 2019-07-18 14:44:36 -04:00
Rob Rix
2743895e78
🔥 the Syntax instance for Core. 2019-07-18 14:44:10 -04:00
Rob Rix
49baa468f9
🔥 iter. 2019-07-18 14:43:25 -04:00
Rob Rix
2f8126875d
Generalize stripAnnotations. 2019-07-18 14:41:04 -04:00
Rob Rix
9eae24ecc1
Recur through annotations. 2019-07-18 14:39:20 -04:00
Rob Rix
aa1e36bc93
Define stripAnnotations directly. 2019-07-18 14:37:19 -04:00
Rob Rix
97320176dc
🔥 interpret. 2019-07-18 14:34:44 -04:00
Rob Rix
4cbc23b76d
🔥 cata. 2019-07-18 14:34:16 -04:00
Rob Rix
e6e580d0a2
Spacing. 2019-07-18 14:30:20 -04:00
Rob Rix
fbb5688bd4
Use the top-level definition of with. 2019-07-18 14:29:57 -04:00
Rob Rix
d7e4f2129d
Combine prettyCore & prettify. 2019-07-18 14:28:12 -04:00
Rob Rix
4598da7e21
Define prettify direct-recursively.
This uses fromScope to recur, and accumulates a continuation for the variables to avoid n² fmaps.
2019-07-18 14:26:51 -04:00
Rob Rix
72701fe9fc
Reuse fromScope. 2019-07-18 11:02:56 -04:00
Rob Rix
e36cc7c184
Fix the doctest for concrete. 2019-07-18 10:25:43 -04:00
Rob Rix
325ec2a2c4
Sort the fixity declarations like in the syntax. 2019-07-17 15:29:40 -04:00
Rob Rix
d3cf5624e7
Give fixities for ... and .=. 2019-07-17 15:29:22 -04:00
Rob Rix
d9ea6e783e
Correct the precedences of pretty-printing for :. and :=. 2019-07-17 15:29:12 -04:00
Rob Rix
36827bb85c
Strip annotations in the tests. 2019-07-17 15:23:56 -04:00
Rob Rix
8aacefb5d1
Parse string literals. 2019-07-17 15:10:21 -04:00
Rob Rix
d076bbb21f
🔥 re-exports of iter & cata. 2019-07-17 14:54:29 -04:00
Rob Rix
1d94634cce
Generate User names. 2019-07-17 12:55:05 -04:00
Rob Rix
25f6f96ea4
Define a helper for constructing Named User. 2019-07-17 12:54:08 -04:00
Rob Rix
76f79fd315
Specialize pretty-printing to User. 2019-07-17 12:51:42 -04:00
Rob Rix
da85c697b2
Correct the types in the spec. 2019-07-17 12:44:34 -04:00
Rob Rix
c2812f8995
Fix up the generators. 2019-07-17 12:44:27 -04:00
Rob Rix
a1ee196d76
Define a helper to interpret a Term in some other eff-Carrier. 2019-07-17 11:57:44 -04:00
Rob Rix
1c85529a33
Move the fixities adjacent to Core. 2019-07-17 11:54:56 -04:00
Rob Rix
1e8a4ffa31
Replace Core with Term CoreF. 2019-07-17 11:53:20 -04:00
Rob Rix
1adc85d6a1
🔥 the Semigroup instance for Core. 2019-07-17 11:43:48 -04:00
Rob Rix
3e53644a36
Define block using a newtype helper.
We can’t rely on having a Semigroup instance for the term type.
2019-07-17 11:42:16 -04:00
Rob Rix
1e3e8dd425
Use the RightModule instance for CoreF to define the Monad instance for Core. 2019-07-17 11:24:57 -04:00
Rob Rix
e63e04724a
Define a RightModule instance for CoreF. 2019-07-17 11:24:44 -04:00
Rob Rix
d1c6d9fab8
Define a catamorphism over Terms. 2019-07-17 11:19:30 -04:00
Rob Rix
43061122b9
Define an iterator for Term. 2019-07-17 11:17:06 -04:00
Rob Rix
bb30733b83
Replace foldCoreF with a Syntax instance. 2019-07-17 11:15:24 -04:00
Rob Rix
7f828469c3
🔥 foldScope. 2019-07-17 11:14:46 -04:00
Rob Rix
7684e4c4cc
Define a Syntax instance for sums. 2019-07-17 11:13:36 -04:00
Rob Rix
f76f73cbeb
Define a Syntax instance for Scope. 2019-07-17 11:13:31 -04:00
Rob Rix
5f7f6c7982
Define a class of foldable Syntax types. 2019-07-17 11:12:34 -04:00
Rob Rix
2350792e23
Define a Carrier instance for Term. 2019-07-17 11:11:07 -04:00
Rob Rix
9d7b63c56e
Define Scope-compatible Eq & Ord instances for Term. 2019-07-17 11:10:24 -04:00
Rob Rix
8ca7382ab9
Define Applicative & Monad instances for Term. 2019-07-17 11:09:34 -04:00
Rob Rix
37b00e5a47
Derive Foldable, Functor, & Traversable instances for Term. 2019-07-17 11:09:04 -04:00
Rob Rix
168d0fa318
Define a Show instance for Term. 2019-07-17 11:06:57 -04:00
Rob Rix
a9508fa516
Define a Term datatype. 2019-07-17 11:05:50 -04:00
Rob Rix
3c664ece81
Stub in a module for a Term type. 2019-07-17 11:05:25 -04:00
Rob Rix
f72070d378
Define a RightModule instance. 2019-07-17 11:03:10 -04:00
Rob Rix
497e0dd226
Define a RightModule class & associated helpers. 2019-07-17 11:02:09 -04:00
Rob Rix
d211a10852
Stub in a module for modules over monads. 2019-07-17 11:00:32 -04:00
Rob Rix
4dd90b9083
Merge branch 'upgrade-to-fused-effects-0.5' into scope-safety 2019-07-15 16:28:23 -04:00
Rob Rix
157d931ad8
🔥 TransC. 2019-07-15 16:20:27 -04:00
Rob Rix
6fe74f012a
Use LiftC instead of TransC to define ReadlineC. 2019-07-15 16:20:07 -04:00
Rob Rix
ba8e03b111
Derive the HFunctor & Effect instances for Readline. 2019-07-15 16:12:47 -04:00
Rob Rix
b1fe3e6073
🔥 a bunch of redundant imports. 2019-07-15 15:23:29 -04:00
Rob Rix
7c4f35c1de
Generalize block. 2019-07-15 13:27:49 -04:00
Rob Rix
4863189099
Simplify the shape of Gensym. 2019-07-15 13:25:44 -04:00
Rob Rix
eacc890658
Rename the smart constructor to fresh. 2019-07-15 13:15:49 -04:00
Rob Rix
dc1a8144cd
Rename the Gensym constructor to Fresh. 2019-07-15 13:14:09 -04:00
Rob Rix
1f0428cc5b
🔥 //. 2019-07-15 13:12:27 -04:00
Rob Rix
2c10a9171c
Generalize all the smart constructors. 2019-07-15 13:04:47 -04:00
Rob Rix
c83d5f083e
Define a Carrier instance for Core. 2019-07-15 13:01:22 -04:00
Rob Rix
3e5d703263
Derive Generic1 & HFunctor instances for CoreF. 2019-07-15 13:01:07 -04:00
Rob Rix
5a0799f471
Define an HFunctor instance for Scope. 2019-07-15 13:00:22 -04:00
Rob Rix
e135751ecc
🔥 TransC. 2019-07-15 12:51:37 -04:00
Rob Rix
a69c34e57e
Bump semantic-core to fused-effects-0.5. 2019-07-15 12:48:13 -04:00
Rob Rix
9e4d91c688
Simplify the definition of block using the Maybe Monoid. 2019-07-15 10:56:53 -04:00
Rob Rix
9cf37ef4d0
Rename k to bound. 2019-07-15 10:53:15 -04:00
Rob Rix
82e779df29
Don’t label lambda-bound variables. 2019-07-15 10:52:45 -04:00
Rob Rix
b0776d4cbc
Spacing. 2019-07-15 10:50:45 -04:00
Rob Rix
6a237b7f41
Provide a bunch more Scope machinery. 2019-07-15 10:50:42 -04:00
Rob Rix
cf40f50459
Sort imports. 2019-07-15 10:48:37 -04:00
Rob Rix
f8b4375090
Move Incr & Scope into a new Data.Scope module. 2019-07-15 10:46:31 -04:00
Rob Rix
cecddcadd0
Stub in a Scope module. 2019-07-15 10:43:10 -04:00
Patrick Thomson
3438e476ea Fix effects in semantic-core. 2019-07-06 12:35:57 -04:00
Patrick Thomson
f401f75303 WIP 2019-07-06 10:52:38 -04:00
Rob Rix
50db4efa0c
Generalize runHeap over the name type. 2019-07-02 13:01:00 -04:00
Rob Rix
b7124e0c5b
Generalize FrameId over the name type. 2019-07-02 13:00:51 -04:00
Rob Rix
dee2a94e53
Generalize the flow-insensitive analysis over the name type. 2019-07-02 12:51:30 -04:00
Rob Rix
b2b7d77d51
Parse to Core User instead of Core Name. 2019-07-02 12:41:01 -04:00
Rob Rix
db2b72a133
Record user names in Core. 2019-07-02 12:39:58 -04:00
Rob Rix
da7fd48cff
Export Ignored. 2019-07-02 12:08:56 -04:00
Rob Rix
f0c08d8712
Factor the ignoring part of Named out. 2019-07-02 12:08:13 -04:00
Rob Rix
daa280c300
Define a helper to extract the User name from a Named value. 2019-07-02 12:07:28 -04:00
Rob Rix
906eba62f0
Give Named a parameter. 2019-07-02 12:02:04 -04:00
Rob Rix
48aad70f9f
📝 Named. 2019-07-02 11:58:39 -04:00
Rob Rix
e1158d89bc
Define a Named newtype. 2019-07-02 11:57:23 -04:00
Rob Rix
f9133f1325
Generalize instantiate. 2019-07-02 11:55:09 -04:00
Rob Rix
f68e7d76bf
Generalize bind. 2019-07-02 11:52:18 -04:00
Rob Rix
f2d3fee17c
Give Scope an extra parameter for binding sites. 2019-07-02 11:45:22 -04:00
Rob Rix
9af28f2f81
Give Incr an extra type parameter. 2019-07-02 11:41:32 -04:00
Rob Rix
1f23bfe83e
Extract a helper to fold within a CoreF. 2019-07-02 11:05:48 -04:00
Rob Rix
610f150da7
Move encloseIf into Data.Name. 2019-07-02 10:56:52 -04:00
Rob Rix
e07917555d
Note a FIXME. 2019-07-02 10:41:44 -04:00
Rob Rix
ddceb039d2
Simplify annWith. 2019-07-02 10:37:29 -04:00
Rob Rix
f3b4242ce5
🔥 the parameter to Root. 2019-07-02 10:31:47 -04:00
Rob Rix
4ed4df88c1
🔥 prettify'. 2019-07-02 10:20:55 -04:00
Rob Rix
fa8314d393
Simplify the handling of binders. 2019-07-02 10:20:07 -04:00
Rob Rix
085e4c288c
Redefine prettify as a CoreF-algebra. 2019-07-02 10:17:28 -04:00
Rob Rix
42f11aa8a8
Pass the Style into prettify. 2019-07-02 10:01:26 -04:00
Rob Rix
ce086a9ed1
cata takes a CoreF-algebra. 2019-07-02 09:55:15 -04:00
Rob Rix
7ca8693a87
Rename kfold to cata. 2019-07-02 09:48:20 -04:00
Rob Rix
200563a030
Redefine efold as iter, taking a CoreF-algebra. 2019-07-02 09:47:55 -04:00
Rob Rix
fc757694c8
Use Scope in Core. 2019-07-02 09:38:06 -04:00
Rob Rix
37be0183c3
Define a function for folding over scopes. 2019-07-02 09:37:24 -04:00
Rob Rix
7eff780174
Export Scope. 2019-07-02 09:37:00 -04:00