summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-06-26 17:19:28 +0200
committerAraq <rumpf_a@web.de>2014-06-26 17:19:28 +0200
commit85a1d896c2ccb69d81003673b00ac21b53133b06 (patch)
tree673fdbe85f8291a658282a885d0d80f90d9e230c /doc
parenteed443d4b390b10e710d80619f5a7bc19fefb8d1 (diff)
parentf793523ade7aa48dcf13ede123a0a434e39e54e0 (diff)
downloadNim-85a1d896c2ccb69d81003673b00ac21b53133b06.tar.gz
Merge branch 'devel' of https://github.com/Araq/Nimrod into new_spawn
Conflicts:
	lib/system.nim
Diffstat (limited to 'doc')
-rw-r--r--doc/grammar.txt4
-rw-r--r--doc/manual.txt2
-rw-r--r--doc/nimrodc.txt12
-rw-r--r--doc/tut1.txt4
-rw-r--r--doc/tut2.txt2
5 files changed, 18 insertions, 6 deletions
diff --git a/doc/grammar.txt b/doc/grammar.txt
index 63e898e11..47ae095f6 100644
--- a/doc/grammar.txt
+++ b/doc/grammar.txt
@@ -24,7 +24,7 @@ ampExpr = plusExpr (OP6 optInd plusExpr)*
 plusExpr = mulExpr (OP7 optInd mulExpr)*
 mulExpr = dollarExpr (OP8 optInd dollarExpr)*
 dollarExpr = primary (OP9 optInd primary)*
-symbol = '`' (KEYW|IDENT|operator|'(' ')'|'[' ']'|'{' '}'|'='|literal)+ '`'
+symbol = '`' (KEYW|IDENT|literal|(operator|'('|')'|'['|']'|'{'|'}'|'=')+)+ '`'
        | IDENT
 indexExpr = expr
 indexExprList = indexExpr ^+ comma
@@ -82,6 +82,7 @@ paramListColon = paramList? (':' optInd typeDesc)?
 doBlock = 'do' paramListArrow pragmas? colcom stmt
 doBlocks = doBlock ^* IND{=}
 procExpr = 'proc' paramListColon pragmas? ('=' COMMENT? stmt)?
+distinct = 'distinct' optInd typeDesc
 expr = (ifExpr
       | whenExpr
       | caseExpr
@@ -166,7 +167,6 @@ object = 'object' pragma? ('of' typeDesc)? COMMENT? objectPart
 typeClassParam = ('var')? symbol
 typeClass = typeClassParam ^* ',' (pragma)? ('of' typeDesc ^* ',')?
               &IND{>} stmt
-distinct = 'distinct' optInd typeDesc
 typeDef = identWithPragma genericParamList? '=' optInd typeDefAux
             indAndComment?
 varTuple = '(' optInd identWithPragma ^+ comma optPar ')' '=' optInd expr
diff --git a/doc/manual.txt b/doc/manual.txt
index c6f50298c..e96e50999 100644
--- a/doc/manual.txt
+++ b/doc/manual.txt
@@ -5485,7 +5485,7 @@ the argument is missing, the C name is the Nimrod identifier *exactly as
 spelled*:
 
 .. code-block::
-  proc printf(formatstr: cstring) {.importc: "printf", varargs.}
+  proc printf(formatstr: cstring) {.header: "<stdio.h>", importc: "printf", varargs.}
 
 Note that this pragma is somewhat of a misnomer: Other backends will provide
 the same feature under the same name.
diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt
index e4f1c41dc..fea1037da 100644
--- a/doc/nimrodc.txt
+++ b/doc/nimrodc.txt
@@ -87,6 +87,18 @@ Level  Description
        for compiler developers.
 =====  ============================================
 
+
+Compile time symbols
+--------------------
+
+Through the ``-d:x`` or ``--define:x`` switch you can define compile time
+symbols for conditional compilation. The defined switches can be checked in
+source code with the `when statement <manual.html#when-statement>`_ and
+`defined proc <system.html#defined>`_. The typical use of this switch is to
+enable builds in release mode (``-d:release``) where certain safety checks are
+omitted for better performance. Another common use is the ``-d:ssl`` switch to
+activate `SSL sockets <sockets.html>`_.
+
 

 Configuration files

 -------------------

diff --git a/doc/tut1.txt b/doc/tut1.txt
index 8c6f140eb..9874f267b 100644
--- a/doc/tut1.txt
+++ b/doc/tut1.txt
@@ -1385,8 +1385,8 @@ Tuples
 A tuple type defines various named *fields* and an *order* of the fields.
 The constructor ``()`` can be used to construct tuples. The order of the
 fields in the constructor must match the order in the tuple's definition.
-Different tuple-types are *equivalent* if they specify the same fields of
-the same type in the same order.
+Different tuple-types are *equivalent* if they specify fields of
+the same type and of the same name in the same order.
 
 The assignment operator for tuples copies each component. The notation
 ``t.field`` is used to access a tuple's field. Another notation is
diff --git a/doc/tut2.txt b/doc/tut2.txt
index 11b485f50..1e23618e0 100644
--- a/doc/tut2.txt
+++ b/doc/tut2.txt
@@ -501,7 +501,7 @@ with the file and line where the uncaught exception is being raised, which may
 help you locate the offending code which has changed.
 
 If you want to add the ``{.raises.}`` pragma to existing code, the compiler can
-also help you. You can add the ``{.effect.}`` pragma statement to your proc and
+also help you. You can add the ``{.effects.}`` pragma statement to your proc and
 the compiler will output all inferred effects up to that point (exception
 tracking is part of Nimrod's effect system). Another more roundabout way to
 find out the list of exceptions raised by a proc is to use the Nimrod ``doc2``