| 1 |
|
| 2 |
From Corelib Require Extraction. |
| 3 |
Declare ML Module "rocq-runtime.plugins.funind". |
| 4 |
|
| 5 |
Open Scope list_scope. |
| 6 |
|
| 7 |
Notation "[ ]" := nil (format "[ ]") : list_scope. |
| 8 |
Notation "[ x ]" := (cons x nil) : list_scope. |
| 9 |
Notation "[ x ; y ; .. ; z ]" := (cons x (cons y .. (cons z nil) ..)) |
| 10 |
(format "[ '[' x ; '/' y ; '/' .. ; '/' z ']' ]") : list_scope. |
| 11 |
|
| 12 |
Set Warnings "+funind". |
| 13 |
|
| 14 |
Function foo (x:nat) := |
| 15 |
match x with |
| 16 |
| 0 => Some [] |
| 17 |
| S _ => Some [0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0] |
| 18 |
end. |
| 19 |
(* error cannot define graph for foo *) |
| 20 |
|
| 21 |
Check R_foo_correct. |