Legend:
Library
Module
Module type
Parameter
Class
Class type
Syntax for Jane Street's novel syntactic features. This module provides three things:
1. First-class ASTs for all syntax introduced by our language extensions, plus one for built-in features; these are split out into a different module each (Comprehensions, etc.).
2. A first-class AST for each OCaml AST, unifying all our novel syntactic features in modules named after the syntactic category (Expression.t, etc.).
3. A way to interpret these values as terms of the coresponding OCaml ASTs, and to match on terms of those OCaml ASTs to see if they're terms from our novel syntax.
We keep our novel syntax separate so that we can avoid having to modify the existing AST, as this would break compatibility with every existing ppx and other such tooling.
For details on the rationale behind this approach (and for some of the gory details), see Jane_syntax_parsing.
The ASTs for immutable arrays. When we merge this upstream, we'll merge these into the existing P{exp,pat}_array constructors by adding a mutable_flag argument (just as we did with T{exp,pat}_array).
The ASTs for include functor. When we merge this upstream, we'll merge these into the existing P{sig,str}_include constructors (similar to what we did with T{sig,str}_include, but without depending on typechecking).
The module type of our extended ASTs for our novel syntax, instantiated once for each syntactic category. We tend to call the pattern-matching functions here with unusual indentation, not indenting the None branch further so as to avoid merge conflicts with upstream.