| 1 |
|
| 2 |
Module Bad. |
| 3 |
|
| 4 |
Record box (A : Set) : Prop := Box { _ : A }. |
| 5 |
Record foo@{i} (A:Type@{i}) := Foo { _ : Set:Type@{i} }. |
| 6 |
Require Import TestSuite.hurkens. |
| 7 |
Fail Definition bad : False := NoRetractFromSmallPropositionToProp.paradox |
| 8 |
_ _ (fun '(Foo _ x) => box x) (fun _ '(Box _ x) => x) Box _. |
| 9 |
(* Error: Anomaly "Bad recursive type." Please report at http://coq.inria.fr/bugs/. *) |
| 10 |
|
| 11 |
End Bad. |
| 12 |
|
| 13 |
Module Alt. |
| 14 |
Inductive Box (A:Type) := box (_:A). |
| 15 |
|
| 16 |
(* it would be better if pattern matching compilation used template |
| 17 |
poly to make this succeed *) |
| 18 |
Fail Check (fun v => match v with box _ x => x end) |
| 19 |
:> forall x : (_ (* success if this is Box True *) :> Prop), True. |
| 20 |
End Alt. |