Skip to content

Commit

Permalink
make angle bracket check deep in kinds
Browse files Browse the repository at this point in the history
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
  • Loading branch information
dvulakh committed Oct 14, 2024
1 parent c99d0eb commit a7eb18e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/Exposed.ml
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,19 @@ module Right = struct
| {pval_prim= _ :: _; _} -> false
| {pval_type= ct; _} -> core_type ct

let rec jkind = function
| Default | Abbreviation _ | Mod _ -> false
| With (_, t) | Kind_of t -> core_type t
| Product jks -> list ~elt:jkind jks

let structure_item {pstr_desc; pstr_loc= _} =
match pstr_desc with
| Pstr_type (_recflag, typedecls) -> list ~elt:type_declaration typedecls
| Pstr_typext te -> type_extension te
| Pstr_exception te -> type_exception te
| Pstr_primitive vd -> value_description vd
| Pstr_kind_abbrev (_, {txt= Kind_of t | With (_, t); _}) -> core_type t
| Pstr_kind_abbrev (_, {txt= jk; _}) ->
core_type jk
| Pstr_module _ | Pstr_recmodule _ | Pstr_modtype _ | Pstr_open _
|Pstr_kind_abbrev _ | Pstr_class _ | Pstr_class_type _
|Pstr_include _ | Pstr_attribute _ | Pstr_extension _ | Pstr_value _
Expand All @@ -130,7 +136,8 @@ module Right = struct
| Psig_typesubst typedecls -> list ~elt:type_declaration typedecls
| Psig_typext te -> type_extension te
| Psig_exception te -> type_exception te
| Psig_kind_abbrev (_, {txt= Kind_of t | With (_, t); _}) -> core_type t
| Psig_kind_abbrev (_, {txt= jk; _}) ->
core_type jk
| Psig_module _ | Psig_modsubst _ | Psig_recmodule _ | Psig_modtype _
|Psig_kind_abbrev _ | Psig_modtypesubst _ | Psig_open _
|Psig_include _ | Psig_class _ | Psig_class_type _ | Psig_attribute _
Expand Down

0 comments on commit a7eb18e

Please sign in to comment.