updated 'concept' docs

This commit is contained in:
Andreas Rumpf
2016-07-19 19:55:00 +02:00
parent 9605435f2e
commit 6905a6fae3

View File

@@ -232,16 +232,6 @@ type signatures of the required operations, but since type inference and
default parameters are still applied in the provided block, it's also possible
to encode usage protocols that do not reveal implementation details.
As a special rule providing further convenience when writing concepts, any
type value appearing in a callable expression will be treated as a variable of
the designated type for overload resolution purposes, unless the type value was
passed in its explicit ``typedesc[T]`` form:
.. code-block:: nim
type
OutputStream = concept s
write(var s, string)
Much like generics, concepts are instantiated exactly
once for each tested type and any static code included within them is also
executed once.