Ast_helper.Cl(3)

πŸ’– NAME πŸ’–

okay so bestie, this is the Ast_helper.Cl(3) page from the OCaml library β€” and the vibe is literally Class expressions. We are in Ast_helper.Cl, and this page is here to hand you the class-expression helper squad. No cap. πŸ¦‹


πŸ¦‹ Module πŸ¦‹

Module β€” Ast_helper.Cl

That's the module, periodt. It's giving β€œwe are exactly where we say we are.” ✨

πŸŽ€ Documentation πŸŽ€

🌸 Module Cl 🌸

The signature wrapper is literally this, bestie:

: sig end

Like, that's the whole sig end moment. Iconic, lowkey. πŸ’…

✨ Class expressions ✨

These are the helper values for class expressions. Keep every type exactly as written β€” no renaming, no β€œfixing”, no merging, fr fr. 🫢

Here is the full val lineup, character-for-character:

val mk : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs ->
       Parsetree.class_expr_desc -> Parsetree.class_expr

val attr : Parsetree.class_expr -> Parsetree.attribute ->
       Parsetree.class_expr

val constr : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs ->
       Ast_helper.lid -> Parsetree.core_type list -> Parsetree.class_expr

val structure : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs ->
       Parsetree.class_structure -> Parsetree.class_expr

val fun_ : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs ->
       Asttypes.arg_label -> Parsetree.expression option -> Parsetree.pattern
       -> Parsetree.class_expr -> Parsetree.class_expr

val apply : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs ->
       Parsetree.class_expr -> (Asttypes.arg_label * Parsetree.expression) list
       -> Parsetree.class_expr

val let_ : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs ->
       Asttypes.rec_flag -> Parsetree.value_binding list ->
       Parsetree.class_expr -> Parsetree.class_expr

val constraint_ : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs ->
       Parsetree.class_expr -> Parsetree.class_type -> Parsetree.class_expr

val extension : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs ->
       Parsetree.extension -> Parsetree.class_expr

val open_ : ?loc:Ast_helper.loc -> ?attrs:Ast_helper.attrs ->
       Parsetree.open_description -> Parsetree.class_expr ->
       Parsetree.class_expr

You see every single val? mk, attr, constr, structure, fun_, apply, let_, constraint_, extension, and open_. All ten of them, bestie β€” no disappearing acts. πŸ’–

Reminder: those ?loc:Ast_helper.loc and ?attrs:Ast_helper.attrs bits are optional args, and the type names are exactly Parsetree.* / Asttypes.* / Ast_helper.* as shown. Don't get creative with them. 😭

That's it. The page is literally that clean. ✨


source/version and date check: this cutie was brought to you by OCamldoc, dated 2026-06-22, and the page is Ast_helper.Cl(3). Bye bestie, go slay your class expressions. πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from