diff options
author | Brian Wignall <BrianWignall@gmail.com> | 2019-11-28 02:30:55 -0500 |
---|---|---|
committer | Miran <narimiran@disroot.org> | 2019-11-28 08:30:55 +0100 |
commit | a7aeabb9d2c70a5d9bd89abf3eb08372d2c6d9d0 (patch) | |
tree | fcc8eac414002ab6378ae1f17d8414a5ded59c9b /doc | |
parent | fd85a5ae054ece9a1954428b135b1da00e410229 (diff) | |
download | Nim-a7aeabb9d2c70a5d9bd89abf3eb08372d2c6d9d0.tar.gz |
[backport] Fix spelling typos (#12755)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/intern.rst | 2 | ||||
-rw-r--r-- | doc/manual.rst | 10 | ||||
-rw-r--r-- | doc/manual_experimental.rst | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/doc/intern.rst b/doc/intern.rst index e6b4b04d4..e56c699ae 100644 --- a/doc/intern.rst +++ b/doc/intern.rst @@ -216,7 +216,7 @@ The solution is to **re-play** the module's top level statements. This solves the problem without having to special case the logic that fills the internal seqs which are affected by the pragmas. -In fact, this decribes how the AST should be stored in the database, +In fact, this describes how the AST should be stored in the database, as a "shallow" tree. Let's assume we compile module ``m`` with the following contents: diff --git a/doc/manual.rst b/doc/manual.rst index b72dff640..fc6c06c35 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -1644,7 +1644,7 @@ object branch, the initialization is considered valid. This analysis only works for immutable discriminators of an ordinal type and disregards ``elif`` branches. For discriminator values with a ``range`` type, the compiler checks if the entire range of possible values for the discriminator value is -valid for the choosen object branch. +valid for the chosen object branch. A small example: @@ -3440,14 +3440,14 @@ different; for this a special setter syntax is needed: ## setter of hostAddr. ## This accesses the 'host' field and is not a recursive call to ## ``host=`` because the builtin dot access is preferred if it is - ## avaliable: + ## available: s.host = value proc host*(s: Socket): int {.inline.} = ## getter of hostAddr ## This accesses the 'host' field and is not a recursive call to ## ``host`` because the builtin dot access is preferred if it is - ## avaliable: + ## available: s.host .. code-block:: nim @@ -5409,7 +5409,7 @@ expression by coercing it to a corresponding ``static`` type: echo static(fac(5)), " ", static[bool](16.isPowerOfTwo) -The complier will report any failure to evaluate the expression or a +The compiler will report any failure to evaluate the expression or a possible type mismatch error. typedesc[T] @@ -5421,7 +5421,7 @@ all values must have a type, ``typedesc`` is considered their special type. ``typedesc`` acts like a generic type. For instance, the type of the symbol ``int`` is ``typedesc[int]``. Just like with regular generic types, when the -generic param is ommited, ``typedesc`` denotes the type class of all types. +generic param is omitted, ``typedesc`` denotes the type class of all types. As a syntactic convenience, you can also use ``typedesc`` as a modifier. Procs featuring ``typedesc`` params are considered implicitly generic. diff --git a/doc/manual_experimental.rst b/doc/manual_experimental.rst index e0f4831d6..8c61c1217 100644 --- a/doc/manual_experimental.rst +++ b/doc/manual_experimental.rst @@ -27,7 +27,7 @@ Package level objects Every Nim module resides in a (nimble) package. An object type can be attached to the package it resides in. If that is done, the type can be referenced from other modules as an `incomplete`:idx: object type. This feature allows to -break up recursive type dependencies accross module boundaries. Incomplete +break up recursive type dependencies across module boundaries. Incomplete object types are always passed ``byref`` and can only be used in pointer like contexts (``var/ref/ptr IncompleteObject``) in general since the compiler does not yet know the size of the object. To complete an incomplete object @@ -267,7 +267,7 @@ calls can use the ``do`` keyword: ``do`` is written after the parentheses enclosing the regular proc params. The proc expression represented by the do block is appended to them. In calls using the command syntax, the do block will bind to the immediately -preceeding expression, transforming it in a call. +preceding expression, transforming it in a call. ``do`` with parentheses is an anonymous ``proc``; however a ``do`` without parentheses is just a block of code. The ``do`` notation can be used to @@ -1618,7 +1618,7 @@ Aliasing restrictions in parameter passing ========================================== **Note**: The aliasing restrictions are currently not enforced by the -implementation and need to be fleshed out futher. +implementation and need to be fleshed out further. "Aliasing" here means that the underlying storage locations overlap in memory at runtime. An "output parameter" is a parameter of type ``var T``, an input |