aboutsummaryrefslogtreecommitdiff
path: root/doc/plugin_tutorial/tuto2/theories/Demo.v
diff options
context:
space:
mode:
authorTalia Ringer2019-06-07 06:59:16 -0400
committerTalia Ringer2019-06-13 12:40:51 -0400
commit2f5fefcd76259d5e0aee5ef5076ae4c4dd662ec1 (patch)
treef167bb4373c4b305c0b87b436f5a256f623f81a1 /doc/plugin_tutorial/tuto2/theories/Demo.v
parentac854a5542b2118be5dfd7bd26d9e3a5db945167 (diff)
Update, expand, and document plugin tutorial 2
Diffstat (limited to 'doc/plugin_tutorial/tuto2/theories/Demo.v')
-rw-r--r--doc/plugin_tutorial/tuto2/theories/Demo.v63
1 files changed, 63 insertions, 0 deletions
diff --git a/doc/plugin_tutorial/tuto2/theories/Demo.v b/doc/plugin_tutorial/tuto2/theories/Demo.v
new file mode 100644
index 0000000000..73b5fcca62
--- /dev/null
+++ b/doc/plugin_tutorial/tuto2/theories/Demo.v
@@ -0,0 +1,63 @@
+From Tuto2 Require Import Loader.
+
+(*** A no-op command ***)
+
+Nothing.
+
+(*** No-op commands with arguments ***)
+
+(*
+ * Terminal parameters:
+ *)
+Command With Some Terminal Parameters.
+(* Command. *) (* does not parse *)
+
+(*
+ * A single non-terminal argument:
+ *)
+Pass 42.
+(* Pass. *) (* does not parse *)
+(* Pass True. *) (* does not parse *)
+(* Pass 15 20. *) (* does not parse *)
+
+(*
+ * A list of non-terminal arguments:
+ *)
+Accept 100 200 300 400.
+Accept.
+Accept 2.
+
+(*
+ * A custom argument:
+ *)
+Foobar Foo.
+Foobar Bar.
+
+(*** Commands that give feedback ***)
+
+(*
+ * Simple feedback:
+ *)
+Is Everything Awesome.
+
+(*** Storage and side effects ***)
+
+(*
+ * Local side effects:
+ *)
+Count.
+Count.
+Count.
+(*
+ * See Count.v for behavior in modules that import this one.
+ *)
+
+(*
+ * Persistent side effects:
+ *)
+Count Persistent.
+Count Persistent.
+Count Persistent.
+(*
+ * See Count.v for behavior in modules that import this one.
+ *)