From 083185a1acd954b4876ccb1af275aaf09239fa74 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 3 Jul 2023 13:40:00 +0100 Subject: Add example using val --- examples/val/shed.toml | 9 +++++++++ examples/val/src/HelloWorld.shed | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 examples/val/shed.toml create mode 100644 examples/val/src/HelloWorld.shed (limited to 'examples') 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); +} -- cgit v1.2.3