Skip to content

Commit ed4cd0f

Browse files
committed
comments
1 parent 04847f7 commit ed4cd0f

File tree

5 files changed

+6
-1
lines changed

5 files changed

+6
-1
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ jobs:
110110
- os: ubuntu-24.04
111111
ocaml_compiler: ocaml-variants.5.2.1+options,ocaml-option-static
112112
# Reanalyze does not work on OCaml 5.3.0 anymore, therefore run it on 5.2.1
113+
# disabled for now, since Reanalyze will stop working going forward. Can likely be removed entirely soon
113114
run_reanalyze: false
114115
- os: ubuntu-24.04
115116
ocaml_compiler: ocaml-variants.5.0.0+options,ocaml-option-static

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- Add `inert` attribute to `JsxDOM.domProps`. https://github.com/rescript-lang/rescript/pull/7326
2020
- Make reanalyze exception tracking work with the new stdlib. https://github.com/rescript-lang/rescript/pull/7328
2121
- Fix Pervasive.max using boolean comparison for floats. https://github.com/rescript-lang/rescript/pull/7333
22-
- Support nested/inline record types - records defined inside of other records, without needing explicit separate type definitions. https://github.com/rescript-lang/rescript/pull/7241
22+
- Experimental: Support nested/inline record types - records defined inside of other records, without needing explicit separate type definitions. https://github.com/rescript-lang/rescript/pull/7241
2323

2424
#### :boom: Breaking Change
2525

analysis/src/Hover.ml

+2
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ let expandTypes ~file ~package ~supportsMarkdownLinks typ =
105105
| {decl; path} :: _
106106
when Res_parsetree_viewer.has_inline_record_definition_attribute
107107
decl.type_attributes ->
108+
(* We print inline record types just with their definition, not the constr pointing
109+
to them, since that doesn't make sense to show the user. *)
108110
( [
109111
Markdown.codeBlock
110112
(decl

compiler/ml/printtyp.ml

+1
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ let rec tree_of_typexp ?(printing_context : printing_context option) sch ty =
646646
find_inlined_type (Path.name p) printing_context |> Option.get
647647
with
648648
| Record {labels} ->
649+
(* Print inlined records as actual inlined record structures, not a reference to the inlined type only. *)
649650
Otyp_record (List.map (tree_of_label ?printing_context) labels))
650651
| Tconstr (p, tyl, _abbrev) ->
651652
let p', s = best_type_path p in

compiler/ml/printtyp.mli

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ open Types
2020
open Outcometree
2121

2222
type printing_context = {inlined_types: type_inlined_type list}
23+
(** Tracks things like inlined records, to help with printing. *)
2324

2425
val print_res_poly_identifier : (string -> string) ref
2526
val longident : formatter -> Longident.t -> unit

0 commit comments

Comments
 (0)