Repository navigation
docs: a function type lists its effects inside its brackets - #87
Merged
Merged
Conversation
Problem:
Spec section 29 wrote a function type's effects after its closing `>`, as
in `Function<Charge(Cart)> uses Http charge`. That placement reads two ways
inside a type argument list, where a comma after an effect can start the
next type argument, and next to `?`. Jordan ruled option 2: `uses` goes
inside the brackets, after the parameter list.
Solution:
Section 29's example reads `Function<Charge(Cart) uses Http> charge`, and
the section gains Jordan's four approved lines with their annotations.
Section 14.1 names the placement. Decision 6's rejected example moves its
`uses` inside the brackets too. Decision 71 records the ruling, with
Swift's `throws` and Koka's effect rows as precedent and Java's `throws` as
the rejected one.
docs/
├── spec.md section 14.1 names the placement; section 29's example moves and gains the four lines
└── decisions/
├── 006-function-argument-effects.md the rejected `mapWithHttp` example writes `Function<TResult(T) uses Http> f`
└── 071-function-type-effects.md new: effects go inside the function type's brackets
heyJordanParker
enabled auto-merge
October 11, 2026 08:51
heyJordanParker
added a commit
that referenced
this pull request
Oct 11, 2026
Master's 070-template-values.md took number 70, and #87 claims 71. The 612-line 070-reified-generics.md carried each slice's working notes; the record now holds the decision, the chosen option, each rejected option with its reason, the precedent and the spec section, as records 49 to 69 do. Nothing linked the old file.
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.
Problem
Spec section 29 wrote a function type's effects after its closing
>, as inFunction<Charge(Cart)> uses Http charge. That placement reads two ways inside a type argument list, where a comma after an effect can start the next type argument, and next to?. Jordan ruled option 2:usesgoes inside the brackets, after the parameter list.Companion Mago PR: heyJordanParker/mago-sharp#122, which parses, binds, scans, prints and lowers the new form and refuses the old one.
Solution
Section 29's example moves its effects inside the brackets, and the section gains Jordan's four approved lines:
Section 14.1 names the placement. Decision 6's rejected
mapWithHttpexample was the only other> useson a function type in the spec and the decisions, and it moves too. Decision 71 records the ruling, with Swift'sthrowsand Koka's effect rows as precedent and Java'sthrowsas the rejected one.Files
No
.sharpfile in this repository writesuseson a function type: the Mago branch'smago compileaccepts all 98 fixture files (Zend/tests/sharp/mago.toml) and all 22 standard library files (sharp/composer/mago.toml) onorigin/master.