Rob Rix
|
2726a43c83
|
Lazily, not eagerly.
`Memo.init` selected the eager version, of course, since the lazy
version takes a closure.
|
2015-10-06 14:19:39 -04:00 |
|
Rob Rix
|
1658219d59
|
Document constructRowMajor .
|
2015-10-06 14:17:14 -04:00 |
|
Rob Rix
|
092087fc54
|
Extract row-major ordering into a private function.
|
2015-10-06 14:15:21 -04:00 |
|
Rob Rix
|
934390a0d5
|
Retrieve in row-major order.
|
2015-10-06 14:11:36 -04:00 |
|
Rob Rix
|
d12c95e296
|
Insert in row-major order.
|
2015-10-06 14:11:26 -04:00 |
|
Rob Rix
|
e178745c56
|
Cache the costs for the rest of the graph at each vertex.
|
2015-10-06 13:33:38 -04:00 |
|
Rob Rix
|
6c8ce1bcb2
|
Append, don’t subscript.
Subscripting only replaces, never appends.
|
2015-10-06 13:29:43 -04:00 |
|
Rob Rix
|
a9349c33dc
|
Port the SES example from the paper.
|
2015-10-06 13:27:06 -04:00 |
|
Rob Rix
|
48a0935d5c
|
Use the little API for deletion fixtures.
|
2015-10-06 13:26:44 -04:00 |
|
Rob Rix
|
69d42e121c
|
Port insertion/deletion in the middle.
|
2015-10-06 13:25:56 -04:00 |
|
Rob Rix
|
9761ba3d98
|
Port insertion/deletion at head.
|
2015-10-06 13:25:27 -04:00 |
|
Rob Rix
|
b23a8ac6f7
|
Rename copy to roll so we can actually call it from within the tests.
|
2015-10-06 13:25:09 -04:00 |
|
Rob Rix
|
1473d5648b
|
Port the pure insert/delete tests.
|
2015-10-06 13:22:54 -04:00 |
|
Rob Rix
|
0d8c080f35
|
Add a little API for diffs.
|
2015-10-06 13:22:37 -04:00 |
|
Rob Rix
|
5a86df7a8d
|
Assert equality using Assertions.assert.
|
2015-10-06 13:16:43 -04:00 |
|
Rob Rix
|
cd2faed7ce
|
Add a typealias for diffs.
|
2015-10-06 13:16:32 -04:00 |
|
Rob Rix
|
ea09799e58
|
import Assertions.
|
2015-10-06 13:16:23 -04:00 |
|
Rob Rix
|
b3e6a92224
|
The tests link against Assertions.framework.
|
2015-10-06 13:16:15 -04:00 |
|
Rob Rix
|
8825a92ec7
|
Include Assertions in the workspace.
|
2015-10-06 13:16:05 -04:00 |
|
Rob Rix
|
1c4a880b09
|
Add Assertions as a submodule.
|
2015-10-06 13:13:53 -04:00 |
|
Rob Rix
|
286b91a88d
|
Add a wrapper function to compute the SES.
|
2015-10-06 13:12:53 -04:00 |
|
Rob Rix
|
1ecafbff43
|
Import Doubt testably.
|
2015-10-06 13:10:45 -04:00 |
|
Rob Rix
|
648945fee0
|
FreeAlgorithm.evaluate() calls out to SES .
|
2015-10-06 13:09:17 -04:00 |
|
Rob Rix
|
d2b3f16cfc
|
Document SES.
|
2015-10-06 13:08:17 -04:00 |
|
Rob Rix
|
90b404b3ee
|
Extract the SES function.
|
2015-10-06 13:05:49 -04:00 |
|
Rob Rix
|
6cef3b9884
|
Matrix is public.
|
2015-10-06 13:00:07 -04:00 |
|
Rob Rix
|
bdabcc5c24
|
Matrix.values is private.
|
2015-10-06 13:00:01 -04:00 |
|
Rob Rix
|
e4689b9102
|
Fix hashing is public.
|
2015-10-06 12:59:13 -04:00 |
|
Rob Rix
|
c35e31ad4a
|
Define the Term fixtures using Fix.
|
2015-10-06 12:58:07 -04:00 |
|
Rob Rix
|
daf5f8ed9e
|
Add a typealias for the Term fixtures.
|
2015-10-06 12:57:48 -04:00 |
|
Rob Rix
|
900d364057
|
Link to @patrickt’s tutorials on recursion schemes.
|
2015-10-06 12:53:30 -04:00 |
|
Rob Rix
|
675d355b96
|
Document iterate .
|
2015-10-06 12:47:33 -04:00 |
|
Rob Rix
|
67d35078d8
|
Call a Term a Term .
|
2015-10-06 12:25:40 -04:00 |
|
Rob Rix
|
cce1ed61aa
|
Document FreeAlgorithm.init .
|
2015-10-06 12:24:58 -04:00 |
|
Rob Rix
|
511ef4d1a1
|
Document that out-of-bound indices are safe.
|
2015-10-06 12:20:58 -04:00 |
|
Rob Rix
|
25f29c328c
|
Document Matrix a little.
|
2015-10-06 12:19:59 -04:00 |
|
Rob Rix
|
cb33717fb9
|
🔥 Syntax.reduce .
|
2015-10-06 12:17:51 -04:00 |
|
Rob Rix
|
69b8028750
|
🔥 Term.swift.
|
2015-10-06 12:17:38 -04:00 |
|
Rob Rix
|
b1af1a63a4
|
🔥 Diff.swift.
|
2015-10-06 12:17:14 -04:00 |
|
Rob Rix
|
4f95704c97
|
Remove an obsolete fixme.
|
2015-10-06 12:16:37 -04:00 |
|
Rob Rix
|
c322386cb4
|
Recur in dictionary diffing.
|
2015-10-06 12:16:19 -04:00 |
|
Rob Rix
|
ebca63b01e
|
Recur in SES.
|
2015-10-06 12:15:48 -04:00 |
|
Rob Rix
|
e14c5a7f9d
|
FreeAlgorithm doesn’t need equals or recur when A: Equatable & B: FreeConvertible .
|
2015-10-06 12:15:28 -04:00 |
|
Rob Rix
|
36c8fa03c9
|
FreeAlgorithm doesn’t need recur when B: FreeConvertible .
|
2015-10-06 12:15:08 -04:00 |
|
Rob Rix
|
1fcba3fca0
|
recur actually has to return Diff .
`B` will only be identified with `Diff` when `B: FreeConvertible`.
|
2015-10-06 12:12:47 -04:00 |
|
Rob Rix
|
131ae72f1a
|
Note that we can’t call recur in the Recursive strategy.
Paradox.
|
2015-10-06 12:09:18 -04:00 |
|
Rob Rix
|
ac0b142a40
|
Recur through a parameter pairing Term s.
|
2015-10-06 12:07:56 -04:00 |
|
Rob Rix
|
f30ebc8cdb
|
Diff/Term typealiases are public.
|
2015-10-06 12:03:58 -04:00 |
|
Rob Rix
|
d020d17f60
|
Note that we need to recur in SES.
|
2015-10-06 12:01:39 -04:00 |
|
Rob Rix
|
6a11a88dea
|
Compute the best diff to continue with.
|
2015-10-06 12:01:14 -04:00 |
|
Rob Rix
|
eb2b242d3a
|
Extract the nominated next diff into a temporary.
|
2015-10-06 11:58:36 -04:00 |
|
Rob Rix
|
28d5612c44
|
Use costOfStream to implement cons .
|
2015-10-06 11:57:37 -04:00 |
|
Rob Rix
|
1ac2f8d8c0
|
Add a function to compute the cost of the rest of the graph.
|
2015-10-06 11:57:04 -04:00 |
|
Rob Rix
|
d7c36a30c9
|
Remove here .
|
2015-10-06 11:55:55 -04:00 |
|
Rob Rix
|
84a1122ed7
|
Write cost as a func .
|
2015-10-06 11:55:15 -04:00 |
|
Rob Rix
|
cc6627bb52
|
Write cons as a func .
|
2015-10-06 11:54:42 -04:00 |
|
Rob Rix
|
c0ab03e73d
|
Compute the cost of the remainder of the stream.
|
2015-10-06 11:52:56 -04:00 |
|
Rob Rix
|
97b4c59a81
|
Rewrite the sum to wrap stream construction.
|
2015-10-06 11:52:13 -04:00 |
|
Rob Rix
|
3cdc9bd745
|
Simplify the Stream-unconsing.
|
2015-10-06 11:48:50 -04:00 |
|
Rob Rix
|
5e144553fd
|
Add a function to compute the cost of the rest of the diff.
|
2015-10-06 11:48:04 -04:00 |
|
Rob Rix
|
4e6dd07e78
|
Extract the diff.
|
2015-10-06 11:46:30 -04:00 |
|
Rob Rix
|
3919a4c093
|
Interpret free algorithms where we’re computing a diff.
|
2015-10-06 11:43:17 -04:00 |
|
Rob Rix
|
6e1a7c6794
|
Memoize a cost for diffs.
|
2015-10-06 11:41:37 -04:00 |
|
Rob Rix
|
03c5f0b644
|
Stub diffing in the middle of the graph.
|
2015-10-06 11:40:54 -04:00 |
|
Rob Rix
|
1d993bb65b
|
Diff along the right of the edit graph.
|
2015-10-06 11:40:42 -04:00 |
|
Rob Rix
|
c090fc33d5
|
Diff along the bottom of the edit graph.
|
2015-10-06 11:39:34 -04:00 |
|
Rob Rix
|
f442f3594f
|
Stub in diffing with Matrix .
|
2015-10-06 11:38:50 -04:00 |
|
Rob Rix
|
88030e217f
|
Short-circuit degenerate cases.
|
2015-10-06 11:30:41 -04:00 |
|
Rob Rix
|
8dd605bb54
|
Add a function computing the cost of a diff.
|
2015-10-06 11:30:21 -04:00 |
|
Rob Rix
|
b910fdba46
|
Section header for Syntax.map.
|
2015-10-06 11:08:39 -04:00 |
|
Rob Rix
|
286ff11f79
|
Rename iter to iterate .
|
2015-10-06 11:05:02 -04:00 |
|
Rob Rix
|
8800c57ca7
|
Oh yeah, method dispatch works too.
|
2015-10-06 11:04:36 -04:00 |
|
Rob Rix
|
8226285153
|
Implement iter as a method.
|
2015-10-06 11:04:14 -04:00 |
|
Rob Rix
|
c0edc77185
|
Implement iter by case analysis.
|
2015-10-06 11:03:03 -04:00 |
|
Rob Rix
|
3da765d32b
|
Identity.
|
2015-10-06 11:02:22 -04:00 |
|
Rob Rix
|
3d06b533bc
|
Implement iter over Free .
|
2015-10-06 11:02:15 -04:00 |
|
Rob Rix
|
24e113d2f0
|
The hash property on Free is public.
|
2015-10-06 11:00:47 -04:00 |
|
Rob Rix
|
0be3eeb8e1
|
Dictionary diffing should recur.
|
2015-10-06 09:28:30 -04:00 |
|
Rob Rix
|
3fb6f24d8b
|
Diff indexed terms.
|
2015-10-05 17:30:29 -04:00 |
|
Rob Rix
|
b08a51a360
|
Abbreviate further.
|
2015-10-05 17:29:20 -04:00 |
|
Rob Rix
|
071bf6bd6f
|
Stub in a matrix pairing the elements to be diffed.
|
2015-10-05 17:27:28 -04:00 |
|
Rob Rix
|
d00da3f90a
|
Remove evaluation from Algorithm.
|
2015-10-05 17:26:17 -04:00 |
|
Rob Rix
|
b7b56b1d01
|
Move the body of evaluation into FreeAlgebra.
|
2015-10-05 17:25:47 -04:00 |
|
Rob Rix
|
1ef04248cb
|
Bring the typealiases from Algorithm into FreeAlgorithm.
|
2015-10-05 17:25:17 -04:00 |
|
Rob Rix
|
3fdda99653
|
Matrix is a functor.
|
2015-10-05 17:18:40 -04:00 |
|
Rob Rix
|
0e8b74e830
|
Matrix has a private fieldwise constructor.
|
2015-10-05 17:18:35 -04:00 |
|
Rob Rix
|
81b6c172cf
|
Populate the matrix with a compute function.
|
2015-10-05 17:12:28 -04:00 |
|
Rob Rix
|
c935e4a3d9
|
Stub in a matrix of memoized values.
|
2015-10-05 17:11:56 -04:00 |
|
Rob Rix
|
9e2b6bd3b4
|
Document the ByIndex case a bit more.
|
2015-10-05 14:54:03 -04:00 |
|
Rob Rix
|
b7ebabd529
|
Stub in ByIndex diffing.
|
2015-10-05 13:17:43 -04:00 |
|
Rob Rix
|
80ba5fb379
|
More thorough documentation of FreeAlgorithm .
|
2015-10-05 13:15:23 -04:00 |
|
Rob Rix
|
437fbd269f
|
Algorithm is an operation.
|
2015-10-05 13:14:46 -04:00 |
|
Rob Rix
|
847216a942
|
Document some elements of FreeAlgorithm.
|
2015-10-05 13:05:31 -04:00 |
|
Rob Rix
|
49aa2b3dd5
|
Section headers.
|
2015-10-05 13:02:04 -04:00 |
|
Rob Rix
|
30d16f87e8
|
Remove the free diff function.
|
2015-10-05 13:00:36 -04:00 |
|
Rob Rix
|
e2e6a0ea03
|
Note the need for SES.
|
2015-10-05 12:51:43 -04:00 |
|
Rob Rix
|
4b3b1ec3d4
|
Top-level construction of FreeAlgorithms from Terms.
|
2015-10-05 12:51:05 -04:00 |
|
Rob Rix
|
1af75347a1
|
Add a hack protocol to allow an ersatz same-type requirement.
|
2015-10-05 12:50:47 -04:00 |
|
Rob Rix
|
00ae25a932
|
Add a function computing the FreeAlgorithm for two terms.
|
2015-10-05 12:33:59 -04:00 |
|
Rob Rix
|
81e80eae50
|
Evaluation of FreeAlgorithm where A: Equatable.
|
2015-10-05 12:32:34 -04:00 |
|
Rob Rix
|
346a39fafc
|
Evaluation of FreeAlgorithm.
|
2015-10-05 12:32:21 -04:00 |
|
Rob Rix
|
fa3be5108e
|
FreeAlgorithm is a monad.
|
2015-10-05 12:30:10 -04:00 |
|
Rob Rix
|
c70ab9e9a4
|
FreeAlgorithm is a functor.
|
2015-10-05 12:29:35 -04:00 |
|
Rob Rix
|
eea4915d6a
|
Add a free monad over Algorithm .
|
2015-10-05 12:19:55 -04:00 |
|
Rob Rix
|
8f9a47cd06
|
Simplify the evaluation of recursive algorithms.
|
2015-10-05 12:13:54 -04:00 |
|
Rob Rix
|
300f370bcb
|
Spacing.
|
2015-10-05 12:13:25 -04:00 |
|
Rob Rix
|
7834548250
|
Algorithm implements dictionary diffing.
|
2015-10-05 09:24:29 -04:00 |
|
Rob Rix
|
bd5deecce7
|
Spacing.
|
2015-10-02 17:49:03 -04:00 |
|
Rob Rix
|
fce352dd85
|
Document why copy .
|
2015-10-02 17:48:58 -04:00 |
|
Rob Rix
|
51903b4434
|
Implement an interpreter for Algorithm.
|
2015-10-02 17:47:11 -04:00 |
|
Rob Rix
|
ad93456922
|
Algorithm is a Functor.
|
2015-10-02 17:34:14 -04:00 |
|
Rob Rix
|
f9dcf9569c
|
The Recursive case contains two Terms, not one.
|
2015-10-02 17:32:25 -04:00 |
|
Rob Rix
|
b30aa91502
|
Algorithm is public.
|
2015-10-02 17:30:09 -04:00 |
|
Rob Rix
|
1b13580eb3
|
Document the Recursive case.
|
2015-10-02 17:29:13 -04:00 |
|
Rob Rix
|
bbd41b209d
|
Doc comments for the Term and Diff typealiases.
|
2015-10-02 17:25:52 -04:00 |
|
Rob Rix
|
f26d4349c7
|
Documentation comment for the Algorithm type.
|
2015-10-02 17:25:40 -04:00 |
|
Rob Rix
|
8da57b5e78
|
Stub in the language of diffing algorithms.
|
2015-10-02 17:21:51 -04:00 |
|
Rob Rix
|
20bea59868
|
Add a Keyed case to Syntax.
|
2015-10-02 17:18:38 -04:00 |
|
Rob Rix
|
6657c5c0a5
|
Fix the debug description.
|
2015-10-02 17:13:27 -04:00 |
|
Rob Rix
|
7c69de54bc
|
Rename Branch to Indexed.
|
2015-10-02 17:12:49 -04:00 |
|
Rob Rix
|
395fa8446f
|
Note my keen desire to 🔥 Syntax.reduce forever.
|
2015-10-02 17:11:35 -04:00 |
|
Rob Rix
|
5ff17c8fc0
|
Syntax.Branch holds an array again.
|
2015-10-02 17:11:02 -04:00 |
|
Rob Rix
|
ebb3f1350f
|
Conveniences for constructing insertions & deletions.
|
2015-10-02 16:53:43 -04:00 |
|
Rob Rix
|
ae7f30e922
|
Parameterized Patch hashing.
|
2015-10-02 16:50:59 -04:00 |
|
Rob Rix
|
ca6392e636
|
Parameterized Patch equality.
|
2015-10-02 16:49:04 -04:00 |
|
Rob Rix
|
9a19d477df
|
Parameterized Optional equality.
|
2015-10-02 16:48:44 -04:00 |
|
Rob Rix
|
40291e2715
|
Move the function composition operator into the Operators file.
|
2015-10-02 16:42:42 -04:00 |
|
Rob Rix
|
089bd51fb3
|
Rename the property.
|
2015-10-02 16:38:21 -04:00 |
|
Rob Rix
|
48c2112124
|
Add a property destructuring Patches.
|
2015-10-02 16:38:02 -04:00 |
|
Rob Rix
|
0c4fe23e78
|
Doc comment for Patch.
|
2015-10-02 16:36:05 -04:00 |
|
Rob Rix
|
5c10f5ccc9
|
Stub in Patch.
|
2015-10-02 16:34:00 -04:00 |
|
Rob Rix
|
76441c3775
|
Fix implements hash where A is Hashable.
|
2015-10-02 16:31:49 -04:00 |
|
Rob Rix
|
bccc09d39b
|
Fix hashing.
|
2015-10-02 16:31:10 -04:00 |
|
Rob Rix
|
96e5cd0e7a
|
Abbreviate Fix equality.
|
2015-10-02 16:28:57 -04:00 |
|
Rob Rix
|
277757e3a2
|
Free implements hash when A and B are Hashable.
|
2015-10-02 16:27:44 -04:00 |
|
Rob Rix
|
e4d0a41093
|
Express flatMap with analysis .
|
2015-10-02 14:36:01 -04:00 |
|
Rob Rix
|
b4479e3854
|
Express map with analysis .
|
2015-10-02 14:35:18 -04:00 |
|
Rob Rix
|
2b5b85e0b4
|
Define Free hashing.
|
2015-10-02 14:35:07 -04:00 |
|
Rob Rix
|
f14433871b
|
Parameterize by leaf hashing.
|
2015-10-02 14:33:41 -04:00 |
|
Rob Rix
|
3d40071b44
|
Give the hash parameter an external label.
|
2015-10-02 14:32:35 -04:00 |
|
Rob Rix
|
334bb3017e
|
The roll function doesn’t escape.
|
2015-10-02 14:29:45 -04:00 |
|
Rob Rix
|
7d49895796
|
Section headers for functor/monad instances.
|
2015-10-02 14:27:37 -04:00 |
|
Rob Rix
|
7e00f9297e
|
Implement case analysis for Free.
|
2015-10-02 14:26:53 -04:00 |
|
Rob Rix
|
de2dcf4bf4
|
== over Free.
|
2015-10-02 14:18:43 -04:00 |
|
Rob Rix
|
a0e77e2495
|
== over Fix.
|
2015-10-02 14:17:59 -04:00 |
|
Rob Rix
|
bc857f810b
|
Fix Equality.
|
2015-10-02 14:17:25 -04:00 |
|
Rob Rix
|
87994c824f
|
Free Equality.
|
2015-10-02 14:15:17 -04:00 |
|
Rob Rix
|
43bdcd45c9
|
Parameterize Syntax equality by leaf type equality.
|
2015-10-02 14:15:13 -04:00 |
|
Rob Rix
|
296dbeea8f
|
Add a section mark for Syntax equality.
|
2015-10-02 14:12:54 -04:00 |
|
Rob Rix
|
6d5fd97552
|
Add an external label for recurrence equality.
|
2015-10-02 14:12:46 -04:00 |
|
Rob Rix
|
45a7e372b5
|
Rename the recur parameter.
|
2015-10-02 14:12:19 -04:00 |
|
Rob Rix
|
f8c37695ae
|
Document Fix’s case.
|
2015-10-02 14:08:03 -04:00 |
|
Rob Rix
|
b2219feed7
|
Document Free’s cases.
|
2015-10-02 14:07:29 -04:00 |
|
Rob Rix
|
0a64dc8741
|
Free is indeed a Monad.
|
2015-10-02 14:03:34 -04:00 |
|
Rob Rix
|
97686157f3
|
Free is a Functor.
|
2015-10-02 13:59:55 -04:00 |
|
Rob Rix
|
e63ccff83f
|
Documentation for Free.
|
2015-10-02 13:54:39 -04:00 |
|
Rob Rix
|
ad3d4b6c3f
|
Backticks around types.
|
2015-10-02 13:54:34 -04:00 |
|
Rob Rix
|
0ff70be000
|
Stub in Free.
|
2015-10-02 13:43:43 -04:00 |
|
Rob Rix
|
da3c1041e0
|
Fix is public.
|
2015-10-02 13:42:55 -04:00 |
|
Rob Rix
|
bf75fcab61
|
Add Fix, the fixpoint of Syntax.
|
2015-10-02 13:21:43 -04:00 |
|
Rob Rix
|
cfb8cb92b9
|
Merge branch 'master' into optional-instead-of-empty
|
2015-10-02 13:06:42 -04:00 |
|
Rob Rix
|
ea5d9ef814
|
Merge branch 'master' into operators-alongside-operands
|
2015-10-02 13:05:23 -04:00 |
|
Rob Rix
|
cacba977dd
|
Expand on the documentation of Copy.
|
2015-10-02 13:02:51 -04:00 |
|
Rob Rix
|
a96a88cdf8
|
Document magnitude a little.
|
2015-10-02 12:58:34 -04:00 |
|
Rob Rix
|
05a7c1a037
|
Remove Syntax.Empty.
|
2015-10-02 12:37:09 -04:00 |
|
Rob Rix
|
3cae5390b7
|
Inserts and Deletes Patch with nil.
|
2015-10-02 12:31:30 -04:00 |
|
Rob Rix
|
6eb840f795
|
Remove the Tree constructor wrappers.
|
2015-10-02 12:31:19 -04:00 |
|
Rob Rix
|
730790fec7
|
Patch states can be Optional.
|
2015-10-02 12:24:51 -04:00 |
|
Rob Rix
|
2ab10d6b3d
|
Empty Hashes.
|
2015-10-02 12:24:18 -04:00 |
|
Rob Rix
|
49721679b6
|
Move Term equality into its file.
|
2015-10-01 15:26:15 -04:00 |
|
Rob Rix
|
906e502def
|
Move Syntax equality into its file.
|
2015-10-01 15:25:49 -04:00 |
|
Rob Rix
|
4823a47f23
|
Rephrase parameterized equality as a static function.
|
2015-10-01 15:25:14 -04:00 |
|
Rob Rix
|
6a6b146863
|
Move Doc equality to its file.
|
2015-10-01 15:17:07 -04:00 |
|
Rob Rix
|
146f59bc23
|
Move Vertex equality to its file.
|
2015-10-01 15:16:25 -04:00 |
|
Rob Rix
|
91e119cde7
|
Diff’s Comparable implementation lives alongside it.
|
2015-10-01 15:15:30 -04:00 |
|
Rob Rix
|
bba8dacbc4
|
Some documentation comments.
|
2015-10-01 14:25:17 -04:00 |
|
Rob Rix
|
8961ee9168
|
Branch has only one child.
|
2015-10-01 14:08:13 -04:00 |
|
Rob Rix
|
0e7bc6b2b3
|
Stub in a ByIndex case for SES diffing.
|
2015-10-01 14:01:59 -04:00 |
|
Rob Rix
|
533e4578ea
|
Comma-separate.
|
2015-10-01 14:01:19 -04:00 |
|
Rob Rix
|
12663f1158
|
Add ByKey to Diff.
|
2015-10-01 13:54:23 -04:00 |
|
Rob Rix
|
dda95ed386
|
Require Term’s leaf type to be Equatable.
This is a bit of a hack.
|
2015-10-01 13:52:32 -04:00 |
|
Rob Rix
|
fb247732cc
|
Move diff equality into Diff.swift.
|
2015-10-01 11:34:17 -04:00 |
|
Rob Rix
|
8bac863ca0
|
Hash is AlgebraicHashable.
|
2015-10-01 10:46:25 -04:00 |
|
Rob Rix
|
009920606b
|
Add unordered hashing.
|
2015-10-01 10:45:47 -04:00 |
|
Rob Rix
|
cdd05ab556
|
Extract the calculation of the magnitude of a syntax node into a function.
|
2015-10-01 10:45:23 -04:00 |
|
Rob Rix
|
97da6a15e4
|
Document Diff’s cases.
|
2015-10-01 10:45:06 -04:00 |
|
Rob Rix
|
2394ea3545
|
Correct AnyEquatable equality.
|
2015-10-01 10:34:36 -04:00 |
|
Rob Rix
|
fae5fc5123
|
Correct Syntax.hash() to refer to Ordered.
|
2015-10-01 10:33:47 -04:00 |
|
Rob Rix
|
12491dde7a
|
AnyHashable convenience constructor.
|
2015-10-01 10:32:44 -04:00 |
|
Rob Rix
|
3ea42437f9
|
Abstract AnyHashable over AnyEquatable.
|
2015-10-01 10:31:18 -04:00 |
|
Rob Rix
|
39bbe4df42
|
AnyEquatable can unpack its value.
|
2015-10-01 10:29:48 -04:00 |
|
Rob Rix
|
72c1029d33
|
AnyHashable can unpack its value.
|
2015-10-01 10:28:24 -04:00 |
|
Rob Rix
|
079b3a479e
|
AnyEquatable.
|
2015-10-01 10:28:14 -04:00 |
|
Rob Rix
|
279aab6530
|
Rename Sequence to Ordered.
|
2015-10-01 10:09:44 -04:00 |
|
Rob Rix
|
a2a55531c9
|
AnyHashable.
|
2015-10-01 09:59:26 -04:00 |
|
Rob Rix
|
18d74a9d9c
|
Diff is AlgebraicHashable.
|
2015-10-01 09:54:56 -04:00 |
|
Rob Rix
|
0013475516
|
Terms of Hashable leaf type can be hashed.
|
2015-10-01 09:54:44 -04:00 |
|
Rob Rix
|
c698280fc2
|
Pass the hashing function for the Recur type in.
|
2015-10-01 09:53:30 -04:00 |
|
Rob Rix
|
1635b8ab8a
|
Info is AlgebraicHashable.
|
2015-10-01 09:46:02 -04:00 |
|
Rob Rix
|
5dd80cb0ce
|
Diff is defined over Term<Info>.
This enables diffs to operate on categorized Terms.
|
2015-09-30 16:05:39 -04:00 |
|
Rob Rix
|
84eeba6111
|
Info has a property for its Categories.
|
2015-09-30 16:02:01 -04:00 |
|
Rob Rix
|
d29e14508a
|
Info has a Set of Categories.
|
2015-09-30 16:01:47 -04:00 |
|
Rob Rix
|
1ed5fc0e88
|
Categories are Hashable.
|
2015-09-30 16:00:13 -04:00 |
|
Rob Rix
|
282f56fb90
|
Categories have an accessor for their tag.
|
2015-09-30 16:00:03 -04:00 |
|
Rob Rix
|
5abbd36a80
|
Replace Location with Info.
|
2015-09-30 15:58:01 -04:00 |
|
Rob Rix
|
ddbe0943ef
|
Location is Equatable.
|
2015-09-30 15:46:21 -04:00 |
|
Rob Rix
|
66281a6674
|
Document Literal Locations.
|
2015-09-30 15:46:16 -04:00 |
|
Rob Rix
|
0efffe3e3d
|
Add source locations.
|
2015-09-30 15:29:56 -04:00 |
|
Rob Rix
|
459bad4dd6
|
Categories are equatable.
|
2015-09-30 15:29:40 -04:00 |
|
Rob Rix
|
f3122f1bae
|
Move JSON construction of Term into doubt-swift.
|
2015-09-30 15:08:19 -04:00 |
|
Rob Rix
|
03d4fcfc53
|
Add Category.
|
2015-09-30 15:03:47 -04:00 |
|
Rob Rix
|
d7a8c64806
|
Abbreviate the properties.
|
2015-09-30 15:03:42 -04:00 |
|
Rob Rix
|
82720340ef
|
Wrap with Term().
|
2015-09-30 15:03:37 -04:00 |
|
Rob Rix
|
d8c718130b
|
Lose an annotation.
|
2015-09-30 15:03:30 -04:00 |
|
Rob Rix
|
a6358b22d4
|
Remove CustomHashConvertible.
|
2015-09-30 15:02:31 -04:00 |
|
Rob Rix
|
2d0991b91f
|
Abstract Term over a type parameter A.
|
2015-09-30 14:42:58 -04:00 |
|
Rob Rix
|
a2b9f9ce17
|
Implement Syntax equality using a function which expresses the equality of the functor.
|
2015-09-30 14:42:44 -04:00 |
|
Rob Rix
|
92d844f416
|
Extract the exception-for-control-flow ErrorType to global scope.
|
2015-09-30 14:40:30 -04:00 |
|
Rob Rix
|
88b677e1e0
|
Parameterize the type of Leaf.
|
2015-09-30 12:41:20 -04:00 |
|
Rob Rix
|
5529a502e3
|
Require Recur to be Hashable.
|
2015-09-30 12:40:49 -04:00 |
|
Rob Rix
|
de3ef64f48
|
Map using Hash.init.
|
2015-09-30 12:40:36 -04:00 |
|
Rob Rix
|
5fa07014a6
|
Replace all the other nodes with Branch.
|
2015-09-30 11:42:41 -04:00 |
|
Rob Rix
|
a0f562d25e
|
Leaves, not Literals.
|
2015-09-30 11:03:55 -04:00 |
|
Rob Rix
|
4712e1c2cc
|
Add CustomHashConvertible for non-Equatable objects that can be converted to Hashes.
|
2015-09-30 10:46:01 -04:00 |
|
Rob Rix
|
66b225fce3
|
Replace Case with a constructor.
|
2015-09-30 10:44:48 -04:00 |
|
Rob Rix
|
565800b1b0
|
Add a constructor for Int hashes.
|
2015-09-30 10:43:18 -04:00 |
|
Rob Rix
|
9841debe91
|
No longer need to disambiguate String.
|
2015-09-30 10:42:43 -04:00 |
|
Rob Rix
|
b581b8b71d
|
Rename String to Label.
|
2015-09-30 10:42:27 -04:00 |
|
Rob Rix
|
d9eb3f6a69
|
Don’t need to disambiguate Int now.
|
2015-09-30 10:40:45 -04:00 |
|
Rob Rix
|
0cdb09a964
|
Rename the Int case to Raw.
|
2015-09-30 10:40:28 -04:00 |
|
Rob Rix
|
66141c95af
|
Replace Literal/Variable with Leaf.
|
2015-09-30 10:36:25 -04:00 |
|
Rob Rix
|
1f253f4e12
|
Add a phantom type parameter to Syntax.
|
2015-09-30 10:31:48 -04:00 |
|
Rob Rix
|
308f81853d
|
Rename the Payload type to Recur.
|
2015-09-30 10:29:38 -04:00 |
|
Rob Rix
|
4348604e66
|
Remove the typealias.
|
2015-09-30 10:29:32 -04:00 |
|
Rob Rix
|
31d35c854b
|
Term is AlgebraicHashable.
|
2015-09-29 17:03:18 -04:00 |
|
Rob Rix
|
586def93cd
|
Syntax<A: AlgebraicHashable> implements hash .
|
2015-09-29 17:03:11 -04:00 |
|
Rob Rix
|
7925347d21
|
Debug print abstraction bodies correctly.
|
2015-09-29 17:02:57 -04:00 |
|
Rob Rix
|
1cf92c94d0
|
Conveniences for labelled/numbered enum cases.
|
2015-09-29 17:02:35 -04:00 |
|
Rob Rix
|
f1c2f4b9e0
|
Algebraic hashing of RawRepresentable types whose RawValue is [Algebraic]Hashable.
|
2015-09-29 17:02:01 -04:00 |
|
Rob Rix
|
b60df96019
|
Construction of Hash from Hashable/AlgebraicallyHashable values.
|
2015-09-29 17:01:38 -04:00 |
|
Rob Rix
|
e32bb2af29
|
Add a protocol for algebraically hashable types.
They’ll get `hashValue` for free.
|
2015-09-29 17:00:52 -04:00 |
|
Rob Rix
|
278bba4f82
|
Add an algebraic Hash type.
|
2015-09-29 17:00:26 -04:00 |
|
Rob Rix
|
29de111b1c
|
How did this even build?
|
2015-09-29 12:57:17 -04:00 |
|
Rob Rix
|
60821016a2
|
Revert "Empty terms are copied, not patched."
This reverts commit 788dbaa07ceafc084dc0f10f74efc2aa2a6841ec.
|
2015-09-29 12:54:42 -04:00 |
|
Rob Rix
|
dfbfb9fe79
|
Short-circuit for equal terms.
|
2015-09-29 12:54:32 -04:00 |
|
Rob Rix
|
7d36421d6a
|
Empty terms are copied, not patched.
|
2015-09-29 12:53:04 -04:00 |
|
Rob Rix
|
94bcc7d3f0
|
Remove empty diffs.
|
2015-09-29 12:50:34 -04:00 |
|
Rob Rix
|
35581fa6d9
|
Resume using .Empty for Terms.
|
2015-09-29 12:49:36 -04:00 |
|
Rob Rix
|
50e8223f18
|
Whitespaaaace.
|
2015-09-29 12:49:19 -04:00 |
|
Rob Rix
|
c3e8d9a801
|
Remove Term.Empty.
|
2015-09-29 12:48:53 -04:00 |
|