Skip to content

Commit 05c9567

Browse files
committed
[TC] dummy clauses are local to sections
This aims to solve the compilation error produced by the compilation of ``` Module foo. Class B (i : nat). Section s. (* Class with coercion depending on section parameters *) Context (A : Type). Class C (i : A) : Set := { x (x : A) :: B 3 }. End s. End foo. ```
1 parent b1f9905 commit 05c9567

File tree

1 file changed

+3
-2
lines changed
  • apps/tc/theories

1 file changed

+3
-2
lines changed

apps/tc/theories/tc.v

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,11 @@ Elpi Accumulate lp:{{
8989
Class Bird := IsAnimal :> Animal.
9090
```
9191
The instance IsAnimal of type Bird -> Animal, is compiled before the
92-
predicate for Bird; hence, Bird is not recognize as a premise of IsAnimal.
92+
predicate for Bird; hence, it is not possible to add the premise
93+
tc-Bird for the IsAnimal instance...
9394
This problem is due to the order in which the registers for Instance and
9495
Class creation are run.
95-
The solution is to do the following two jobs when a class C is created:
96+
The solution is to do the following jobs when a class C is created:
9697
1: for every projection P of C, if P is a coercion, the wrongly
9798
compiled instance is replaced with a `dummy` clause.
9899
2: the predicate for the class is created

0 commit comments

Comments
 (0)