Skip to content

Commit c460b8c

Browse files
committed
Update docs
1 parent 04d309a commit c460b8c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

docs/docs/reference/contextual/inferable-params.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ def maximum[T](xs: List[T]) given Ord[T]: T =
4141
inferred argument to `max`. The name of the parameter is left out.
4242

4343
Generally, inferable parameters may be given either as a parameter list `(p_1: T_1, ..., p_n: T_n)`
44-
or as a sequence of types, separated by commas. To distinguish the two, a leading
45-
`(` always indicates a parameter list.
44+
or as a sequence of types, separated by commas.
4645

4746
## Inferring Complex Arguments
4847

@@ -105,7 +104,7 @@ ClsParamClause ::= ...
105104
DefParamClause ::= ...
106105
| GivenParamClause
107106
GivenParamClause ::= ‘given’ (‘(’ DefParams ‘)’ | GivenTypes)
108-
GivenTypes ::= RefinedType {‘,’ RefinedType}
107+
GivenTypes ::= AnnotType {‘,’ AnnotType}
109108
110109
InfixExpr ::= ...
111110
| InfixExpr ‘given’ (InfixExpr | ParArgumentExprs)

docs/docs/reference/contextual/instance-defs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ TmplDef ::= ...
6868
| ‘implied’ InstanceDef
6969
InstanceDef ::= [id] InstanceParams InstanceBody
7070
InstanceParams ::= [DefTypeParamClause] {GivenParamClause}
71-
InferParamClause ::= ‘given’ (‘(’ [DefParams] ‘)’ | GivenTypes)
71+
GivenParamClause ::= ‘given’ (‘(’ [DefParams] ‘)’ | GivenTypes)
7272
InstanceBody ::= [‘for’ ConstrApp {‘,’ ConstrApp }] [TemplateBody]
7373
| ‘for’ Type ‘=’ Expr
74-
GivenTypes ::= RefinedType {‘,’ RefinedType}
74+
GivenTypes ::= AnnotType {‘,’ AnnotType}
7575
```
7676
The identifier `id` can be omitted only if either the `for` part or the template body is present.
7777
If the `for` part is missing, the template body must define at least one extension method.

0 commit comments

Comments
 (0)