Jane_syntax.ComprehensionsSourceThe ASTs for list and array comprehensions
type iterator = | Range of {start : Ppxlib_ast.Parsetree.expression;stop : Ppxlib_ast.Parsetree.expression;direction : Ppxlib_ast.Asttypes.direction_flag;}"= START to STOP" (direction = Upto) "= START downto STOP" (direction = Downto)
*)| In of Ppxlib_ast.Parsetree.expression"in EXPR"
*)type clause_binding = {pattern : Ppxlib_ast.Parsetree.pattern;iterator : iterator;attributes : Ppxlib_ast.Parsetree.attribute list;}@... PAT (in/=) ...
type clause = | For of clause_binding list"for PAT (in/=) ... and PAT (in/=) ... and ..."; must be nonempty
*)| When of Ppxlib_ast.Parsetree.expression"when EXPR"
*)type comprehension = {body : Ppxlib_ast.Parsetree.expression;The body/generator of the comprehension
*)clauses : clause list;The clauses of the comprehension; must be nonempty
*)}type expression = | Cexp_list_comprehension of comprehensionBODY ...CLAUSES...
| Cexp_array_comprehension of Ppxlib_ast.Asttypes.mutable_flag * comprehension|BODY ...CLAUSES...| (flag = Mutable) :BODY ...CLAUSES...: (flag = Immutable) (only allowed with -extension immutable_arrays)