@@ -177,6 +177,7 @@ let elab_eff env eff =
177
177
178
178
let rec elab_typ env typ l =
179
179
Trace. elab (lazy (" [elab_typ] " ^ EL. label_of_typ typ));
180
+ let lift_warn = lift_warn (level () ) in
180
181
(fun (s , zs ) -> typ.at, env, s, zs, None , EL. label_of_typ typ) <<<
181
182
match typ.it with
182
183
| EL. PathT (exp ) ->
@@ -314,6 +315,7 @@ and elab_dec env dec l =
314
315
315
316
and elab_pathexp env exp l =
316
317
Trace. elab (lazy (" [elab_pathexp] " ^ EL. label_of_exp exp));
318
+ let lift_warn = lift_warn (level () ) in
317
319
let ExT (aks, t), p, zs, _ = elab_instexp env exp l in
318
320
Trace. debug (lazy (" [ExpP] s = " ^ string_of_norm_extyp (ExT (aks, t))));
319
321
if p = Impure then
@@ -362,6 +364,8 @@ and elab_const = function
362
364
363
365
and elab_exp env exp l =
364
366
Trace. elab (lazy (" [elab_exp] " ^ EL. label_of_exp exp));
367
+ let lift = lift (level () ) in
368
+ let lift_warn = lift_warn (level () ) in
365
369
(fun (s , p , zs , e ) -> exp.at, env, s, zs, Some e, EL. label_of_exp exp) <<<
366
370
match exp.it with
367
371
| EL. VarE (var ) ->
@@ -395,7 +399,7 @@ Trace.debug (lazy ("[FunE] env =" ^ VarSet.fold (fun a s -> s ^ " " ^ a) (domain
395
399
| Pure , f -> f
396
400
| _ -> error impl.at " impure function cannot be implicit" in
397
401
ExT ([] , FunT (aks, t, s, p')), Pure ,
398
- lift (* TODO: _warn exp.at (FunT(aks, t, s, p')) * ) env (zs1 @ zs2),
402
+ lift (* TODO: _warn exp.at *) (FunT (aks, t, s, p')) env (zs1 @ zs2),
399
403
IL. genE(erase_bind aks, IL. LamE (var.it, erase_typ t, e2))
400
404
401
405
| EL. WrapE (var , typ ) ->
@@ -606,6 +610,7 @@ t = !b:*. [= b] -> {t : [= t4.t b], u : !a:*. [= a] => [= (a, t4.u b a)]}
606
610
607
611
and elab_bind env bind l =
608
612
Trace. elab (lazy (" [elab_bind] " ^ EL. label_of_bind bind));
613
+ let lift_warn = lift_warn (level () ) in
609
614
(fun (s , p , zs , e ) -> bind.at, env, s, zs, Some e, EL. label_of_bind bind) <<<
610
615
match bind.it with
611
616
| EL. VarB (var , exp ) ->
@@ -680,7 +685,7 @@ Trace.debug (lazy ("[GenE] a1 = " ^ string_of_typ (VarT(a1, BaseK))));
680
685
match ! z with
681
686
| Undet u -> u.level > = level
682
687
| Det _ -> assert false
683
- ) (lift (add_typs aks env) zs) in
688
+ ) (lift level t (add_typs aks env) zs) in
684
689
if p = Impure || zs1 = [] then
685
690
s, p, zs1 @ zs2, e
686
691
else begin
0 commit comments