| 1 |
From Corelib Require Import Extraction. |
| 2 |
|
| 3 |
Set Warnings "-extraction-inside-module". |
| 4 |
|
| 5 |
Module OriginalExample. |
| 6 |
|
| 7 |
Variant nondetE : Type -> Type := |
| 8 |
Or : nondetE bool. |
| 9 |
|
| 10 |
Module Type MinSIG. |
| 11 |
Parameter otherE : Type -> Type. |
| 12 |
End MinSIG. |
| 13 |
|
| 14 |
Module Min : MinSIG. |
| 15 |
Definition otherE := nondetE. |
| 16 |
End Min. |
| 17 |
|
| 18 |
Extraction TestCompile Min. |
| 19 |
|
| 20 |
End OriginalExample. |
| 21 |
|
| 22 |
(**) |
| 23 |
|
| 24 |
Module ExampleWithSmallParameter. |
| 25 |
|
| 26 |
Variant nondetE : nat -> Type -> Type := |
| 27 |
Or : nondetE 0 bool. |
| 28 |
|
| 29 |
Module Type MinSIG. |
| 30 |
Parameter otherE : nat -> Type -> Type. |
| 31 |
End MinSIG. |
| 32 |
|
| 33 |
Module Min : MinSIG. |
| 34 |
Definition otherE := nondetE. |
| 35 |
End Min. |
| 36 |
|
| 37 |
Extraction TestCompile Min. |
| 38 |
|
| 39 |
End ExampleWithSmallParameter. |
| 40 |
|
| 41 |
(* This was already working *) |
| 42 |
|
| 43 |
Module ExampleWithLogicalDefinition. |
| 44 |
|
| 45 |
Definition nondetE (n:nat) (X:Type) := Prop. |
| 46 |
|
| 47 |
Module Type MinSIG. |
| 48 |
Parameter otherE : nat -> Type -> Type. |
| 49 |
End MinSIG. |
| 50 |
|
| 51 |
Module Min : MinSIG. |
| 52 |
Definition otherE := nondetE. |
| 53 |
End Min. |
| 54 |
|
| 55 |
Extraction TestCompile Min. |
| 56 |
|
| 57 |
End ExampleWithLogicalDefinition. |