Debian Codegraph @

test-suite/ide/blocking-futures.fake

raw
1 # Script simulating a dialog between rocqide and coqtop -ideslave
2 # Run it via fake_ide
3 #
4 # Extraction will force the future computation, assert it is blocking
5 # Example courtesy of Jonathan (jonikelee)
6 #
7 ADD { Require Corelib.extraction.Extraction. }
8 ADD { Require Import ListDef. }
9 ADD { Fixpoint rev A (l:list A) : list A := match l with nil => nil | x :: l' => rev A l' ++ cons x nil end. }
10 ADD { Definition myrev{A}(l : list A) : {rl : list A | rl = rev A l}. }
11 ADD { Proof. }
12 ADD { induction l. }
13 ADD { eexists; reflexivity. }
14 ADD { cbn; destruct IHl as [rl' H]; rewrite <-H; eexists; reflexivity. }
15 ADD { Qed. }
16 ADD { Extraction myrev. }
17 GOALS