Skip to content

Commit

Permalink
doc(engine): explain how visitors are generated
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Franceschino authored and W95Psp committed Jul 1, 2024
1 parent e24c15e commit 82b4ceb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions engine/DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ To show the file nicely formated, use: `dune describe pp lib/types.ml` (or `dune

You can also use `dune utop` and then `#show_type Hax_engine.Types.SOME_TYPE` and `#show_constructor Hax_engine.Types.SOME_CONSTRUCTOR`.

### Visitors
The module `Ast_visitors` provides a `Make` functor that takes a feature set and outputs a module that defines the `map`, `mapreduce` and `reduce` classes.

Those visitors are generated by `./utils/generate_visitors`.
To see the implementation of the `Ast_visitors` module, run `dune describe pp lib/ast_visitors.ml`.

## Debugging the phases
You can enable a debug mode that prints a Rustish AST at each phase,
that you can browse interactively along with the actual AST.
Expand Down

0 comments on commit 82b4ceb

Please sign in to comment.