Repository navigation
docs: use one notation for effect annotations - #341
Merged
Merged
Conversation
Apply a single style to every effect annotation in the book:
- A single effect has no braces: `\ IO`, `\ ef`, `\ r`.
- Two or more concrete effects use set braces with inner spaces:
`\ { Http, IO }`. Concrete effects are never joined with `+`.
- `IO` comes last.
- Effect variables never go inside braces. They come first, joined
by `+`, followed by one bare effect or one braced set:
`\ ef + IO`, `\ r + { Clock, Http, IO }`.
- Pure functions carry no annotation; `\ {}` appears only where the
text is explicitly about the empty effect set.
The quoted compiler error in the polymorphic-effects and
common-problems chapters was regenerated with Flix 0.78.0 so its
caret matches the rewritten source line. Comment carets in the
effect-polymorphism chapter were realigned.
Refs #283
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies one style to every effect annotation in the book, resolving the notation part of #283.
Rules
\ IO,\ ef,\ r.\ { Http, IO }. Concrete effects are never joined with+.IOcomes last.+, followed by one bare effect or one braced set:\ ef + IO,\ ef1 + ef2 + { Http, IO },\ r + { Clock, Http, IO }.\ {}appears only where the text is explicitly about the empty effect set.Aef[m]count as concrete:\ { Aef[m], IO }.Changes
Assert + IO,IO + Aef[m], andEmit[Int32] + Emit[String]become braced sets, which also movesIOlast in java-collections.ef + Sleep; mutable-collections and effect-polymorphism user + IOandr + { Clock, Http, IO }.{ }becomes{}in the effect-polymorphism chapter.Verification
ef + Sleepin parameter position,r + { ... }, and{ Foldable.Aef[m], IO }, compiles and runs on Flix 0.78.0.E6795error in polymorphic-effects and common-problems was regenerated from the compiler; only the caret column changes.mdbook buildsucceeds.Not included: the trailing-semicolon and "pair" vs "tuple" remarks from the second comment on #283, which concern the references chapter and are unrelated to effect notation.
🤖 Generated with Claude Code