package rocq-runtime
The Rocq Prover -- Core Binaries and Tools
Install
Dune Dependency
Authors
Maintainers
Sources
rocq-9.0.0.tar.gz
md5=8d522602d23e7a665631826dab9aa92b
sha512=f4f76a6a178e421c99ee7a331a2fd97a06e9c5d0168d7e60c44e3820d8e1a124370ea104ad90c7f87a9a1e9d87b2d0d7d2d387c998feeaed4a75ed04e176a4be
doc/src/tuto2_plugin/g_tuto2.ml.html
Source file g_tuto2.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
let _ = Mltop.add_known_module "coq-plugin-tutorial.tuto2" # 59 "doc/plugin_tutorial/tuto2/src/g_tuto2.mlg" (*** Dependencies from Coq ***) (* * This lets us take non-terminal arguments to a command (for example, * the PassInt command that takes an integer argument needs this * this dependency). * * First used by: PassInt *) open Stdarg (* * This is Coq's pretty-printing module. Here, we need it to use some * useful syntax for pretty-printing. * * First use by: Count *) open Pp let () = Vernacextend.static_vernac_extend ~plugin:(Some "coq-plugin-tutorial.tuto2") ~command:"NoOp" ~classifier:(fun _ -> Vernacextend.classify_as_query) ?entry:None [(Vernacextend.TyML (false, Vernacextend.TyTerminal ("Nothing", Vernacextend.TyNil), (let coqpp_body () = Vernactypes.vtdefault (fun () -> # 90 "doc/plugin_tutorial/tuto2/src/g_tuto2.mlg" () ) in fun ?loc ~atts () -> coqpp_body (Attributes.unsupported_attributes atts)), None))] let () = Vernacextend.static_vernac_extend ~plugin:(Some "coq-plugin-tutorial.tuto2") ~command:"NoOpTerminal" ~classifier:(fun _ -> Vernacextend.classify_as_query) ?entry:None [(Vernacextend.TyML (false, Vernacextend.TyTerminal ("Command", Vernacextend.TyTerminal ("With", Vernacextend.TyTerminal ("Some", Vernacextend.TyTerminal ("Terminal", Vernacextend.TyTerminal ("Parameters", Vernacextend.TyNil))))), (let coqpp_body () = Vernactypes.vtdefault (fun () -> # 178 "doc/plugin_tutorial/tuto2/src/g_tuto2.mlg" () ) in fun ?loc ~atts () -> coqpp_body (Attributes.unsupported_attributes atts)), None))] let () = Vernacextend.static_vernac_extend ~plugin:(Some "coq-plugin-tutorial.tuto2") ~command:"PassInt" ~classifier:(fun _ -> Vernacextend.classify_as_query) ?entry:None [(Vernacextend.TyML (false, Vernacextend.TyTerminal ("Pass", Vernacextend.TyNonTerminal (Extend.TUentry (Genarg.get_arg_tag wit_int), Vernacextend.TyNil)), (let coqpp_body i () = Vernactypes.vtdefault (fun () -> # 218 "doc/plugin_tutorial/tuto2/src/g_tuto2.mlg" () ) in fun i ?loc ~atts () -> coqpp_body i (Attributes.unsupported_attributes atts)), None))] let () = Vernacextend.static_vernac_extend ~plugin:(Some "coq-plugin-tutorial.tuto2") ~command:"AcceptIntList" ~classifier:(fun _ -> Vernacextend.classify_as_query) ?entry:None [(Vernacextend.TyML (false, Vernacextend.TyTerminal ("Accept", Vernacextend.TyNonTerminal (Extend.TUlist0 (Extend.TUentry (Genarg.get_arg_tag wit_int)), Vernacextend.TyNil)), (let coqpp_body l () = Vernactypes.vtdefault (fun () -> # 312 "doc/plugin_tutorial/tuto2/src/g_tuto2.mlg" () ) in fun l ?loc ~atts () -> coqpp_body l (Attributes.unsupported_attributes atts)), None))] let (wit_custom, custom) = Vernacextend.vernac_argument_extend ~plugin:"coq-plugin-tutorial.tuto2" ~name:"custom" { Vernacextend.arg_parsing = Vernacextend.Arg_rules ([(Procq.Production.make (Procq.Rule.next (Procq.Rule.stop) ((Procq.Symbol.token (Procq.terminal "Bar")))) (fun _ loc -> # 420 "doc/plugin_tutorial/tuto2/src/g_tuto2.mlg" Custom.Bar )); (Procq.Production.make (Procq.Rule.next (Procq.Rule.stop) ((Procq.Symbol.token (Procq.terminal "Foo")))) (fun _ loc -> # 419 "doc/plugin_tutorial/tuto2/src/g_tuto2.mlg" Custom.Foo ))]); Vernacextend.arg_printer = fun env sigma -> fun _ -> Pp.str "missing printer"; } let _ = (wit_custom, custom) let () = Vernacextend.static_vernac_extend ~plugin:(Some "coq-plugin-tutorial.tuto2") ~command:"PassCustom" ~classifier:(fun _ -> Vernacextend.classify_as_query) ?entry:None [(Vernacextend.TyML (false, Vernacextend.TyTerminal ("Foobar", Vernacextend.TyNonTerminal (Extend.TUentry (Genarg.get_arg_tag wit_custom), Vernacextend.TyNil)), (let coqpp_body x () = Vernactypes.vtdefault (fun () -> # 444 "doc/plugin_tutorial/tuto2/src/g_tuto2.mlg" () ) in fun x ?loc ~atts () -> coqpp_body x (Attributes.unsupported_attributes atts)), None))] let () = Vernacextend.static_vernac_extend ~plugin:(Some "coq-plugin-tutorial.tuto2") ~command:"Awesome" ~classifier:(fun _ -> Vernacextend.classify_as_query) ?entry:None [(Vernacextend.TyML (false, Vernacextend.TyTerminal ("Is", Vernacextend.TyTerminal ("Everything", Vernacextend.TyTerminal ("Awesome", Vernacextend.TyNil))), (let coqpp_body () = Vernactypes.vtdefault (fun () -> # 476 "doc/plugin_tutorial/tuto2/src/g_tuto2.mlg" Feedback.msg_notice (Pp.str "Everything is awesome!") ) in fun ?loc ~atts () -> coqpp_body (Attributes.unsupported_attributes atts)), None))] let () = Vernacextend.static_vernac_extend ~plugin:(Some "coq-plugin-tutorial.tuto2") ~command:"Count" ~classifier:(fun _ -> Vernacextend.classify_as_sideeff) ?entry:None [(Vernacextend.TyML (false, Vernacextend.TyTerminal ("Count", Vernacextend.TyNil), (let coqpp_body () = Vernactypes.vtdefault (fun () -> # 524 "doc/plugin_tutorial/tuto2/src/g_tuto2.mlg" Counter.increment (); let v = Counter.value () in Feedback.msg_notice (Pp.str "Times Count has been called: " ++ Pp.int v) ) in fun ?loc ~atts () -> coqpp_body (Attributes.unsupported_attributes atts)), None))] let () = Vernacextend.static_vernac_extend ~plugin:(Some "coq-plugin-tutorial.tuto2") ~command:"CountPersistent" ~classifier:(fun _ -> Vernacextend.classify_as_sideeff) ?entry:None [(Vernacextend.TyML (false, Vernacextend.TyTerminal ("Count", Vernacextend.TyTerminal ("Persistent", Vernacextend.TyNil)), (let coqpp_body () = Vernactypes.vtdefault (fun () -> # 594 "doc/plugin_tutorial/tuto2/src/g_tuto2.mlg" Persistent_counter.increment (); let v = Persistent_counter.value () in Feedback.msg_notice (Pp.str "Times Count Persistent has been called: " ++ Pp.int v) ) in fun ?loc ~atts () -> coqpp_body (Attributes.unsupported_attributes atts)), None))]
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>