aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-07-03 13:40:00 +0100
committerMichael Williamson <mike@zwobble.org>2023-07-03 13:40:00 +0100
commit083185a1acd954b4876ccb1af275aaf09239fa74 (patch)
tree424a0d780a68e62a9e2b6a21053de99293c138f7 /examples
parent6acf0ef2012b6cbc412efb6958274504bc4c8fce (diff)
Add example using val
Diffstat (limited to 'examples')
-rw-r--r--examples/val/shed.toml9
-rw-r--r--examples/val/src/HelloWorld.shed4
2 files changed, 13 insertions, 0 deletions
diff --git a/examples/val/shed.toml b/examples/val/shed.toml
new file mode 100644
index 00000000..156fa7c6
--- /dev/null
+++ b/examples/val/shed.toml
@@ -0,0 +1,9 @@
+[shed]
+main = "HelloWorld"
+
+[[shed.bins]]
+name = "hello-world"
+
+[[shed.examples]]
+bin = "hello-world"
+expected-output = "hello, world"
diff --git a/examples/val/src/HelloWorld.shed b/examples/val/src/HelloWorld.shed
new file mode 100644
index 00000000..b12229b7
--- /dev/null
+++ b/examples/val/src/HelloWorld.shed
@@ -0,0 +1,4 @@
+fun main() ! Io -> Unit {
+ val message = "hello, world\n";
+ print!(message);
+}