package coq-core
The Coq Proof Assistant -- Core Binaries and Tools
Install
Dune Dependency
Authors
Maintainers
Sources
coq-8.20.1.tar.gz
md5=0cfaa70f569be9494d24c829e6555d46
sha512=8ee967c636b67b22a4f34115871d8f9b9114df309afc9ddf5f61275251088c6e21f6cf745811df75554d30f4cebb6682f23eeb2e88b771330c4b60ce3f6bf5e2
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
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 ( [(Pcoq.Production.make (Pcoq.Rule.next (Pcoq.Rule.stop) ((Pcoq.Symbol.token (Pcoq.terminal "Bar")))) (fun _ loc -> # 420 "doc/plugin_tutorial/tuto2/src/g_tuto2.mlg" Custom.Bar )); (Pcoq.Production.make (Pcoq.Rule.next (Pcoq.Rule.stop) ((Pcoq.Symbol.token (Pcoq.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)"
>