.TH "Ast_invariants" 3 2025-06-09 OCamldoc "OCaml library" .SH NAME Ast_invariants \- Check AST invariants .SH Module Module Ast_invariants .SH Documentation .sp Module .BI "Ast_invariants" : .B sig end .sp Check AST invariants .sp Warning: this module is unstable and part of .ft B Compiler_libs .ft R \&. .sp .sp .sp .I val structure : .B Parsetree.structure -> unit .sp .sp .I val signature : .B Parsetree.signature -> unit .sp .sp .I val check_loc_ghost : .B (Ast_iterator.iterator -> Ast_iterator.iterator -> 'a -> unit) -> .B 'a -> source_contents:string -> unit .sp Checks the invariant of Location\&.t\&'s loc_ghost field, that are stated in location\&.mli\&. This can be run with \-dparsetree\-loc\-ghost\-invariants, which is used slightly in the testsuite, but should be used more to find more of the places where the invariant is broken\&. .sp