Skip to content

Commit 2642463

Browse files
authored
Include the modes of values in debugging information (#153)
1 parent 4ecc8a4 commit 2642463

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

typing/env.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ type module_unbound_reason =
148148

149149
type summary =
150150
Env_empty
151-
| Env_value of summary * Ident.t * value_description
151+
| Env_value of summary * Ident.t * value_description * Types.value_mode
152152
| Env_type of summary * Ident.t * type_declaration
153153
| Env_extension of summary * Ident.t * extension_constructor
154154
| Env_module of summary * Ident.t * module_presence * module_declaration
@@ -165,7 +165,7 @@ type summary =
165165

166166
let map_summary f = function
167167
Env_empty -> Env_empty
168-
| Env_value (s, id, d) -> Env_value (f s, id, d)
168+
| Env_value (s, id, d, m) -> Env_value (f s, id, d, m)
169169
| Env_type (s, id, d) -> Env_type (f s, id, d)
170170
| Env_extension (s, id, d) -> Env_extension (f s, id, d)
171171
| Env_module (s, id, p, d) -> Env_module (f s, id, p, d)
@@ -1965,7 +1965,7 @@ and store_value ?check mode id addr decl shape env =
19651965
in
19661966
{ env with
19671967
values = IdTbl.add id (Val_bound vda) env.values;
1968-
summary = Env_value(env.summary, id, decl) }
1968+
summary = Env_value(env.summary, id, decl, mode) }
19691969

19701970
and store_constructor ~check type_decl type_id cstr_id cstr env =
19711971
if check && not type_decl.type_loc.Location.loc_ghost

typing/env.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type module_unbound_reason =
3333

3434
type summary =
3535
Env_empty
36-
| Env_value of summary * Ident.t * value_description
36+
| Env_value of summary * Ident.t * value_description * Types.value_mode
3737
| Env_type of summary * Ident.t * type_declaration
3838
| Env_extension of summary * Ident.t * extension_constructor
3939
| Env_module of summary * Ident.t * module_presence * module_declaration

typing/envaux.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ let rec env_from_summary sum subst =
3636
match sum with
3737
Env_empty ->
3838
Env.empty
39-
| Env_value(s, id, desc) ->
40-
Env.add_value id (Subst.value_description subst desc)
39+
| Env_value(s, id, desc, mode) ->
40+
Env.add_value ~mode id (Subst.value_description subst desc)
4141
(env_from_summary s subst)
4242
| Env_type(s, id, desc) ->
4343
Env.add_type ~check:false id

0 commit comments

Comments
 (0)