Skip to content

Commit f227711

Browse files
committed
review
1 parent 19216eb commit f227711

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

HB/structure.elpi

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,19 +296,21 @@ mk-sort-coercion-aux _ Structure P Args Clause :-
296296
std.rev Args ArgsRev,
297297
Clause =
298298
(pi ctx v t e r argsAll w\ (coercion ctx v (app [Structure | ArgsRev]) e r :-
299+
coq.say "try sort coercion",
299300
std.append ArgsRev [v] argsAll,
300301
coq.mk-app P argsAll w,
302+
coq.say "find coercion from sort",
301303
coq.elaborate-skeleton w e r ok,
302-
coq.ltac.collect-goals r [] [])).
304+
coq.ltac.collect-goals r [] [],
305+
coq.say "sort coercion succeeds")).
303306

304307
pred mk-sort-coercion i:term, i:term, o:prop.
305308
mk-sort-coercion Structure P Clause :-
306-
coq.typecheck Structure T ok,
309+
std.assert-ok! (coq.typecheck Structure T) "anomaly: mk-sort-coercion",
307310
mk-sort-coercion-aux T Structure P [] Clause.
308311

309312
pred mk-reverse-coercion-aux i:term, i:term, i:term, i:list term, o:prop.
310-
mk-reverse-coercion-aux (prod _N _T Body) Structure G Args Clause :-
311-
Clause = (pi x\ C x),
313+
mk-reverse-coercion-aux (prod _N _T Body) Structure G Args (pi x\ C x) :-
312314
pi x\ mk-reverse-coercion-aux (Body x) Structure G [x | Args] (C x).
313315

314316
mk-reverse-coercion-aux _ Structure G Args Clause :-
@@ -322,7 +324,7 @@ mk-reverse-coercion-aux _ Structure G Args Clause :-
322324

323325
pred mk-reverse-coercion i:gref, o:prop.
324326
mk-reverse-coercion Structure Clause :-
325-
coq.typecheck (global Structure) T ok,
327+
coq.env.typeof Structure T,
326328
get-constructor Structure G,
327329
mk-reverse-coercion-aux T (global Structure) (global G) [] Clause.
328330

structures.v

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ Definition ignore {T} (x: T) := x.
1515
Definition ignore_disabled {T T'} (x : T) (x' : T') := x'.
1616

1717
(* ********************* structures ****************************** *)
18-
From elpi Require Import elpi coercion.
18+
From elpi Require Import elpi.
19+
From elpi.apps Require Import coercion.
1920

2021
Register unify as hb.unify.
2122
Register id_phant as hb.id.

0 commit comments

Comments
 (0)