Skip to content

Commit d6fe4b7

Browse files
committed
Remove class cases from typed mapper.
1 parent 5737646 commit d6fe4b7

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

jscomp/ml/tast_mapper.ml

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ type mapper =
2323
{
2424
case: mapper -> case -> case;
2525
cases: mapper -> case list -> case list;
26-
class_signature: mapper -> class_signature -> class_signature;
27-
class_type: mapper -> class_type -> class_type;
28-
class_type_field: mapper -> class_type_field -> class_type_field;
2926
env: mapper -> Env.t -> Env.t;
3027
expr: mapper -> expression -> expression;
3128
extension_constructor: mapper -> extension_constructor ->
@@ -447,49 +444,6 @@ let module_binding sub x =
447444
let mb_expr = sub.module_expr sub x.mb_expr in
448445
{x with mb_expr}
449446

450-
451-
let class_type sub x =
452-
let cltyp_env = sub.env sub x.cltyp_env in
453-
let cltyp_desc =
454-
match x.cltyp_desc with
455-
| Tcty_signature csg -> Tcty_signature (sub.class_signature sub csg)
456-
| Tcty_constr (path, lid, list) ->
457-
Tcty_constr (
458-
path,
459-
lid,
460-
List.map (sub.typ sub) list
461-
)
462-
| Tcty_arrow (label, ct, cl) ->
463-
Tcty_arrow
464-
(label,
465-
sub.typ sub ct,
466-
sub.class_type sub cl
467-
)
468-
| Tcty_open (ovf, p, lid, env, e) ->
469-
Tcty_open (ovf, p, lid, sub.env sub env, sub.class_type sub e)
470-
in
471-
{x with cltyp_desc; cltyp_env}
472-
473-
let class_signature sub x =
474-
let csig_self = sub.typ sub x.csig_self in
475-
let csig_fields = List.map (sub.class_type_field sub) x.csig_fields in
476-
{x with csig_self; csig_fields}
477-
478-
let class_type_field sub x =
479-
let ctf_desc =
480-
match x.ctf_desc with
481-
| Tctf_inherit ct ->
482-
Tctf_inherit (sub.class_type sub ct)
483-
| Tctf_val (s, mut, virt, ct) ->
484-
Tctf_val (s, mut, virt, sub.typ sub ct)
485-
| Tctf_method (s, priv, virt, ct) ->
486-
Tctf_method (s, priv, virt, sub.typ sub ct)
487-
| Tctf_constraint (ct1, ct2) ->
488-
Tctf_constraint (sub.typ sub ct1, sub.typ sub ct2)
489-
| Tctf_attribute _ as d -> d
490-
in
491-
{x with ctf_desc}
492-
493447
let typ sub x =
494448
let ctyp_env = sub.env sub x.ctyp_env in
495449
let ctyp_desc =
@@ -552,9 +506,6 @@ let default =
552506
{
553507
case;
554508
cases;
555-
class_signature;
556-
class_type;
557-
class_type_field;
558509
env;
559510
expr;
560511
extension_constructor;

jscomp/ml/tast_mapper.mli

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ type mapper =
2222
{
2323
case: mapper -> case -> case;
2424
cases: mapper -> case list -> case list;
25-
class_signature: mapper -> class_signature -> class_signature;
26-
class_type: mapper -> class_type -> class_type;
27-
class_type_field: mapper -> class_type_field -> class_type_field;
2825
env: mapper -> Env.t -> Env.t;
2926
expr: mapper -> expression -> expression;
3027
extension_constructor: mapper -> extension_constructor ->

0 commit comments

Comments
 (0)