Skip to content

main.aug ​

Move ownership · Source and specification

Files in this project

Code ​

aug
// aug-spec: "main.aug.md" explains this file. Read it before changes; refresh with aug spec.
import Console and SystemConsole from august.io
implement Console with SystemConsole
import Resource from resource
import make from resource
import consume from resource
own Resource first = make()
consume(value=first)
own Resource second = make()
print(value="end of main")
aug
// aug-spec: "main.aug.md" explains this file. Read it before changes; refresh with aug spec.
import Console and SystemConsole from august.io
implement Console with SystemConsole
import Resource from resource
import make from resource
import consume from resource
own Resource first = make()
consume(value=first)
own Resource second = make()
print(value="end of main")

Compiled specification ​

Interactions and sequences

Providers ​

Console is provided by SystemConsole. The same instance is shared.

Startup ​

It calls make and stores the result in owned first (Resource). It calls consume with value from first using injected Console for console. It calls make and stores the result in owned second (Resource). It prints "end of main". source

Dependencies ​

It uses SystemConsole from august.io. It uses Resource, consume, and make from resource.

Built-in operations follow the language reference.

Last updated:

The world runs on language