From c9f14ca9bee012994c1802f02465081844039486 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sun, 15 Apr 2018 22:16:00 +0200 Subject: [PATCH] manual: remove the bind-once typedesc weirdness; replaced by how things should be done --- doc/manual.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/manual.rst b/doc/manual.rst index 51a3c67a4..b114f0a8a 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -5518,12 +5518,12 @@ instantiation type using the param name: var n = Node.new var tree = new(BinaryTree[int]) -When multiple typedesc params are present, they act like a distinct type class -(i.e. they will bind freely to different types). To force a bind-once behavior -one can use a named alias or an explicit `typedesc` generic param: +When multiple typedesc params are present, they will bind freely to different +types. To force a bind-once behavior +one can use an explicit ``typedesc[T]`` generic param: .. code-block:: nim - proc acceptOnlyTypePairs[T: typedesc, U: typedesc](A, B: T; C, D: U) + proc acceptOnlyTypePairs[T, U](A, B: typedesc[T]; C, D: typedesc[U]) Once bound, typedesc params can appear in the rest of the proc signature: