@@ -10,11 +10,11 @@ fn(Goal) -> Solution
1010where the Goal is some [ canonical goal] ( ./canonical_queries.md ) and
1111the Solution is a result like:
1212
13- * Provable(S): meaning the goal is provable and it is provably exactly (and only
14- for the substitution S. S is a set of values for the inference variables that
15- appear in the goal. So if we had a goal like ` Vec<?X>: Foo ` , and we returned
16- ` Provable(?X = u32) ` , it would mean that only ` Vec<u32>: Foo ` and not any
17- other sort of vector (e.g., ` Vec<u64>: Foo ` does not hold).
13+ * Provable(S): meaning the goal is provable and it is provably exactly (and
14+ only) for the substitution S. S is a set of values for the inference variables
15+ that appear in the goal. So if we had a goal like ` Vec<?X>: Foo ` , and we
16+ returned ` Provable(?X = u32) ` , it would mean that only ` Vec<u32>: Foo ` and not
17+ any other sort of vector (e.g., ` Vec<u64>: Foo ` does not hold).
1818* Ambiguous(S): meaning that we can't prove whether or not the goal is true.
1919 This can sometimes come with a substitution S, which offers suggested values
2020 for the inference variables that might make it provable.
@@ -40,20 +40,20 @@ Implemented(u32: A)
4040Implemented(i32: A)
4141```
4242
43- Now , suppose that we have a goal like ` Implemented(Vec<f32 >: A) ` . This would
43+ First , suppose that we have a goal like ` Implemented(Vec<u64 >: A) ` . This would
4444proceed like so:
4545
46- * ` Solve(Implemented(Vec<f32 >: A)) `
47- * ` Solve(Implemented(f32 : A)) `
46+ * ` Solve(Implemented(Vec<u64 >: A)) `
47+ * ` Solve(Implemented(u64 : A)) `
4848 * returns ` Error `
4949 * returns ` Error `
5050
5151In other words, the recursive solver would start by applying the first rule,
52- which would cause us recursively try to solve ` Implemented(f32 : A) ` . This would
52+ which would cause us recursively try to solve ` Implemented(u64 : A) ` . This would
5353yield an Error result, because there are no applicable rules, and that error
54- would propagae back up, causing the entire attempt at proving things to fail.
54+ would propagate back up, causing the entire attempt at proving things to fail.
5555
56- Now consider ` Implemented(Vec<u32>: A) ` . This would proceed like so:
56+ Next, consider ` Implemented(Vec<u32>: A) ` . This would proceed like so:
5757
5858* ` Solve(Implemented(Vec<u32>: A)) `
5959 * ` Solve(Implemented(u32: A)) `
@@ -90,8 +90,8 @@ In the recursive solver, with a goal of `Implemented(Vec<?X>: A)`, we
9090recursively try to prove ` Implemented(?X: A) ` and get ambiguity, and we get
9191stuck there.
9292
93- The SLG solver in contrast starts by exploring ` ?X = u32 ` and finds
93+ The [ SLG solver] in contrast starts by exploring ` ?X = u32 ` and finds
9494that it works, and then later tries to explore ` ?X = i32 ` and finds that it
9595fails (because ` i32: B ` is not true).
9696
97- [ slg solver] : ./engine.md
97+ [ SLG solver] : ./engine.md
0 commit comments