Skip to content

Commit 849a295

Browse files
committed
Update book with chalk_solve::rust_ir
1 parent 4616da7 commit 849a295

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

book/src/publishing.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
**Note: this is mostly only useful for maintainers**
44

55
The following crates get published to crates.io:
6-
- `chalk-macros`
6+
- `chalk-base`
77
- `chalk-derive`
88
- `chalk-engine`
99
- `chalk-ir`
10-
- `chalk-rust-ir`
1110
- `chalk-solve`
1211

1312
The following crates get versioned without publishing:

book/src/what_is_chalk/crates.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ role of each crate. This crate structure helps to serve Chalk's two goals:
1111
The following crates are "public facing" crates that you may use when embedding chalk into
1212
other programs:
1313

14-
* The `chalk-solve` crate, which defines the rules that translate Rust IR into logical predicates.
14+
* The `chalk-solve` crate, which defines the IR representing Rust concepts like
15+
traits and impls and the rules that translate Rust IR into logical predicates.
1516
* The `chalk-ir` crate, which defines the IR representing types and logical predicates.
16-
* The `chalk-rust-ir` crate, which defines the IR representing Rust concepts like traits and impls.
1717

1818
The following crate is an implementation detail, used internally by `chalk-solve`:
1919

2020
* The `chalk-engine` crate, which defines the actual engine that solves logical predicate. This
2121
engine is quite general and not really specific to Rust.
2222
* The `chalk-derive` crate defines custom derives for the `chalk_ir::fold::Fold` trait and other
2323
such things.
24-
* The `chalk-macros` crate defines a few miscellaneous utility macros.
24+
* The `chalk-base` crate defines some base solver types and a few miscellaneous
25+
utility macros.
2526

2627
## Crates for standalone REPL and testing
2728

@@ -30,9 +31,9 @@ harness. These crates build on the crates above. Essentially, they
3031
define a kind of "minimal embedding" of chalk.
3132

3233
* The `chalk-parser` crate can parse Rust syntax to product an AST.
33-
* The `chalk-integration` crate can take that AST and use it to drive
34-
the `chalk-solve` crate above. The AST is converted into
35-
`chalk-rust-ir` by a process called "lowering'.
34+
* The `chalk-integration` crate can take that AST and use it to drive the
35+
`chalk-solve` crate above. The AST is converted into Rust IR by a process
36+
called "lowering'.
3637
* Finally, the main `chalk` crate, along with the testing crate in the
3738
`tests` directory, define the actual entry points.
3839

book/src/what_is_chalk/walkthrough.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ impls, and struct definitions. Parsing is often the first "phase" of
4444
transformation that a program goes through in order to become a format that
4545
chalk can understand.
4646

47-
### Rust Intermediate Representation ([chalk_rust_ir])
47+
### Rust Intermediate Representation ([chalk_solve::rust_ir])
4848

4949
After getting the AST we convert it to a more convenient intermediate
50-
representation called [`chalk_rust_ir`][chalk_rust_ir]. This is sort of
50+
representation called `chalk_rust_ir`. This is sort of
5151
analogous to the [HIR] in Rust. The process of converting to IR is called
5252
*lowering*.
5353

@@ -133,12 +133,12 @@ queries is called the *solver*.
133133

134134
Chalk's functionality is broken up into the following crates:
135135
- [**chalk_engine**][chalk_engine]: Defines the core [SLG solver][slg].
136-
- [**chalk_rust_ir**][chalk_rust_ir], containing the "HIR-like" form of the AST
137136
- [**chalk_ir**][chalk_ir]: Defines chalk's internal representation of
138137
types, lifetimes, and goals.
139138
- [**chalk_solve**][chalk_solve]: Combines `chalk_ir` and `chalk_engine`,
140139
effectively, which implements logic rules converting `chalk_rust_ir` to
141140
`chalk_ir`
141+
- Contains the `rust_ir` module, which defines the "HIR-like" Rust IR
142142
- Defines the `coherence` module, which implements coherence rules
143143
- [`chalk_engine::context`][engine-context] provides the necessary hooks.
144144
- [**chalk_parse**][chalk_parse]: Defines the raw AST and a parser.
@@ -197,7 +197,7 @@ Likewise, lowering tests use the [`lowering_success!` and
197197
[chalk_ir]: https://rust-lang.github.io/chalk/chalk_ir/index.html
198198
[chalk_parse]: https://rust-lang.github.io/chalk/chalk_parse/index.html
199199
[chalk_solve]: https://rust-lang.github.io/chalk/chalk_solve/index.html
200-
[chalk_rust_ir]: https://rust-lang.github.io/chalk/chalk_rust_ir/index.html
200+
[chalk_solve::rust_ir]: https://rust-lang.github.io/chalk/chalk_solve/rust_ir/index.html
201201
[doc-chalk]: https://rust-lang.github.io/chalk/chalk/index.html
202202
[engine-context]: https://rust-lang.github.io/chalk/chalk_engine/context/index.html
203203
[chalk-program]: https://rust-lang.github.io/chalk/chalk_integration/program/struct.Program.html
@@ -211,7 +211,7 @@ Likewise, lowering tests use the [`lowering_success!` and
211211
[chalki]: https://github.com/rust-lang/chalk/blob/master/src/main.rs
212212
[clause]: https://github.com/rust-lang/chalk/blob/master/GLOSSARY.md#clause
213213
[coherence-src]: https://rust-lang.github.io/chalk/chalk_solve/coherence/index.html
214-
[ir-code]: https://rust-lang.github.io/chalk/chalk_rust_ir/
214+
[ir-code]: https://rust-lang.github.io/chalk/chalk_solve/rust_ir/
215215
[solve-wf-src]: https://rust-lang.github.io/chalk/chalk_solve/wf/index.html
216216
[solve_goal]: https://github.com/rust-lang/chalk/blob/4bce000801de31bf45c02f742a5fce335c9f035f/src/test.rs#L85
217217
[test-lowering-macros]: https://github.com/rust-lang/chalk/blob/4bce000801de31bf45c02f742a5fce335c9f035f/src/test_util.rs#L21-L54

0 commit comments

Comments
 (0)