Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved docs #21

Merged
merged 5 commits into from
Oct 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions chorus_book/src/guide-locations.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ assert_eq!(name, "Alice");

## Location Set

Each Choreography is allowed to operate on a set of `ChoreographyLocation`, called its `LocationSet`. You can use the macro `LocationSet!` and give it a comma separated list of `ChoreographyLocation` to build a `LocationSet`.
A `LocationSet` is a set of `ChoreographyLocation` values. It's primarily used to ensure type safety within the system, and you'll see its application in future sections.
ihaveint marked this conversation as resolved.
Show resolved Hide resolved


```rust
# extern crate chorus_lib;
Expand All @@ -46,5 +47,3 @@ use chorus_lib::core::LocationSet;

type L = LocationSet!(Alice, Bob);
```

Internally, `LocationSet` is also used at other places like [Projector](./guide-projector.md) and [Transport](./guide-transport.md) to ensure that they have comprehensive information regarding the `ChoreographyLocation` values they're working with. This is crucial as it allows the system to catch potential errors during compile time instead of runtime, leading to safer code. You can check the API documentation for more details.