Traits: write the rules' itemlist with a brace body
@itemlist[...] gave the items as arguments, which samizdat reads as bjodat, and the comma in the prose stopped it. 🤖 Generated with [ECA](https://eca.dev) Co-Authored-By: eca-agent <git@eca.dev>
This commit is contained in:
parent
e448ee0d93
commit
25720e4fb2
1 changed files with 2 additions and 2 deletions
|
|
@ -2169,10 +2169,10 @@ An implementation may be written for a generic type at particular type arguments
|
|||
|
||||
The compiler picks the one whose arguments match. Two rules keep that choice unambiguous:
|
||||
|
||||
@itemlist[
|
||||
@itemlist{
|
||||
@item{Two implementations may not overlap. With @code{(List int)} already there, @code{(impl (Describe (List %a)) ...)} is refused, since a @code{(List int)} would then have two.}
|
||||
@item{The type has to be known where the call is. @code{(describe (list))} is an error, because an empty list could be either, and so is a call at @code{(List %a)} in a generic function: neither implementation is written for every element type. Give such a value an annotation, or write one implementation for @code{(List %a)} with a @code{where}, as in the next section.}
|
||||
]
|
||||
}
|
||||
|
||||
@subsubsection{Conditional and blanket implementations}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue