From 1e2c50a6aa2a01bb93c5e13e23c9b33860407862 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 11 Dec 2024 20:19:39 +0000 Subject: Use positional fields in examples --- examples/17-sums/src/HelloWorld.shed | 4 ++-- examples/31-generic-sums/src/HelloWorld.shed | 4 ++-- .../src/HelloWorld.shed | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/17-sums/src/HelloWorld.shed b/examples/17-sums/src/HelloWorld.shed index 58177d9f..435353bc 100644 --- a/examples/17-sums/src/HelloWorld.shed +++ b/examples/17-sums/src/HelloWorld.shed @@ -1,11 +1,11 @@ -struct Some(.value: String) {} +struct Some(value: String) {} struct None() {} sumtype Option = Some | None; pub fun main() ! Io -> Unit { - printOption!(Some(.value = "hello, world!")); + printOption!(Some("hello, world!")); printOption!(None()); } diff --git a/examples/31-generic-sums/src/HelloWorld.shed b/examples/31-generic-sums/src/HelloWorld.shed index 314546b5..e10456bd 100644 --- a/examples/31-generic-sums/src/HelloWorld.shed +++ b/examples/31-generic-sums/src/HelloWorld.shed @@ -1,11 +1,11 @@ -struct Some[T](.value: T) {} +struct Some[T](value: T) {} struct None() {} sumtype Option[T] = Some[T] | None; pub fun main() ! Io -> Unit { - printOption!(Some[String](.value = "hello, world!")); + printOption!(Some[String]("hello, world!")); printOption!(None()); } diff --git a/examples/32-generic-structs-and-sums-inferred-type-args/src/HelloWorld.shed b/examples/32-generic-structs-and-sums-inferred-type-args/src/HelloWorld.shed index 5a58f8e4..79cd1eb8 100644 --- a/examples/32-generic-structs-and-sums-inferred-type-args/src/HelloWorld.shed +++ b/examples/32-generic-structs-and-sums-inferred-type-args/src/HelloWorld.shed @@ -1,11 +1,11 @@ -struct Some[T](.value: T) {} +struct Some[T](value: T) {} struct None() {} sumtype Option[T] = Some[T] | None; pub fun main() ! Io -> Unit { - printOption!(Some(.value = "hello, world!")); + printOption!(Some("hello, world!")); printOption!(None()); } -- cgit v1.2.3