mirror of
https://github.com/github/semantic.git
synced 2024-12-02 11:23:05 +03:00
Bring the typealiases from Algorithm into FreeAlgorithm.
This commit is contained in:
parent
3fdda99653
commit
1ef04248cb
@ -68,6 +68,12 @@ extension Algorithm {
|
||||
///
|
||||
/// Where `Algorithm` models a single diffing strategy, `FreeAlgorithm` models the recursive selection of diffing strategies at each node. Thus, a value in `FreeAlgorithm` models an algorithm for constructing a value in the type `B` from the resulting diffs. By this means, diffing can be adapted not just to the specific grammar, but to specific trees produced by that grammar, and even the values of type `A` encapsulated at each node.
|
||||
public enum FreeAlgorithm<A, B> {
|
||||
/// The type of `Term`s over which `FreeAlgorithm`s operate.
|
||||
typealias Term = Algorithm<FreeAlgorithm, A>.Term
|
||||
|
||||
/// The type of `Diff`s which `FreeAlgorithm`s produce.
|
||||
typealias Diff = Algorithm<FreeAlgorithm, A>.Diff
|
||||
|
||||
/// The injection of a value of type `B` into an `Algorithm`.
|
||||
///
|
||||
/// Equally, a way to return a result or throw an error during computation, as determined by the type which `B` is instantiated to, and the specific context in which it is being evaluated.
|
||||
|
Loading…
Reference in New Issue
Block a user