Skip to content

Commit aa26613

Browse files
committed
Record type samples during ascription transitions
1 parent c733274 commit aa26613

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/language/dynamics/transition/Ascriptions.re

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ let rec transition =
6464
};
6565
switch (DHExp.term_of(d)) {
6666
| Asc(e, t) =>
67+
/* Record sample if this type is probed */
68+
let* () = record_type_probe(~targets, t, e);
6769
switch (DHExp.term_of(e), Typ.term_of(Typ.unroll(t))) {
6870
| (Asc(e, t'), t)
6971
// This is only necessary because sometimes we add two ascriptions and aren't marking it as a non-value
@@ -125,8 +127,6 @@ let rec transition =
125127
|> ClosureWriter.sequence;
126128
Some(IdTagged.fast_copy(DHExp.rep_id(e), Tuple(es) |> DHExp.fresh));
127129
| (_, Unknown(_)) =>
128-
/* Record sample if this type is probed */
129-
let* () = record_type_probe(~targets, t, e);
130130
let+ e = recur(e);
131131
Some(e);
132132
| (Cons(d1, d2), List(ty)) =>
@@ -313,7 +313,7 @@ let rec transition =
313313
| (Cons(_), _)
314314
| (Constructor(_), _)
315315
| (ProofObject(_), _) => ClosureWriter.return(None)
316-
}
316+
};
317317
| _ => ClosureWriter.return(None)
318318
};
319319
};

0 commit comments

Comments
 (0)