summary refs log tree commit diff stats
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* minor updates on manual (#20258)Judd2022-08-271-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * minor updates on manual 1. statement -> keyword: 1. re-phase on the explanation of `import except`: maybe the newer version does not export some of the identifiers; 1. "The original module name is then not accessible" is moved up to the previous paragraph, since it is coupled with the previous paragraph, but not the current one. 1. re-phase on the explanation of _Disabling certain messages_. * Apply suggestions from code review Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> * Update manual.md do not use "()". * Update doc/manual.md Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* Update manual.md (#20277)Clay Sweetser2022-08-261-3/+2
|
* provide better error messages for large set (#20207)ringabout2022-08-251-3/+7
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* remove unused sfProcvar, "procvar" mentions (#20204)metagn2022-08-241-2/+1
| | | refs #12975. doesn't close it because wProcvar isn't removed
* top-down type inference, implements rfc 149 (#20091)metagn2022-08-241-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * micro implementation of rfc 149 refs https://github.com/nim-lang/RFCs/issues/149 * number/array/seq literals, more statements * try fix number literal alias issue * renew expectedType with if/case/try branch types * fix (nerf) index type handling and float typed int * use typeAllowed * tweaks + const test (tested locally) [skip ci] * fill out more of the checklist * more literals, change @ order, type conversions Not copying the full call tree before the typedesc call check in `semIndirectOp` is also a small performance improvement. * disable self-conversion warning * revert type conversions (maybe separate op later) * deal with CI for now (seems unrelated), try enums * workaround CI different way * proper fix * again * see sizes * lol * overload selection, simplify int literal -> float * range, new @ solution, try use fitNode for nil * use new magic * try fix ranges, new magic, deal with #20193 * add documentation, support templates Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* new .redefine pragma for templates, warn on redefinition without it (#20211)metagn2022-08-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test CI for template redefinitions * adapt asyncmacro * fix quote * fix again * try something else * revert * fix ioselectors_select, disable packages CI * adapt more tests & simplify * more * more * more * rename to redefine, warn on implicit redefinition * basic documentation [skip ci] * Update compiler/lineinfos.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fixes manual regression (#20259)ringabout2022-08-231-0/+2
| | | ref https://github.com/nim-lang/Nim/pull/20080
* Docs auto dark mode (#20188)Amjad Ben Hedhili2022-08-211-56/+40
| | | | | | | | | | | | | * Implement auto dark mode * Rename class * Fix borders cutout * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* Markdown code blocks part 5 (#20236)Andrey Makarov2022-08-1721-413/+486
| | | No logic was added, just a few more `*.md` files have been migrated.
* fix comment in the Nim manual (#20234)Judd2022-08-171-1/+1
| | | | | fix comment there is no `y` in the example.
* Markdown code blocks part 4 (#20189)Andrey Makarov2022-08-129-341/+365
| | | No logic was added, just 8 more files have been migrated.
* docs: fix some spelling errors (#19816)ee72022-08-0910-141/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | * docs: fix some spelling errors * contributing: fix spelling error Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update contributing.md * Update intern.md * Update manual.md * Update manual_experimental_strictnotnil.md * Update nimgrep_cmdline.txt * Update pegdocs.txt * Update testament.md * Update tut1.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* Markdown code blocks part 3 (#20117)Andrey Makarov2022-08-045-283/+409
| | | No logic was added, just 4 more files migrated.
* Edits to sections 'Open arrays' and 'varargs'. (#20140)random-bites2022-08-031-6/+6
|
* [Doc] Fix some minor markup errors in manual (#20112)quantimnot2022-07-311-8/+9
| | | | | | | * Fix header level for noalias pragma section. * Fix code snippet outside of code block that raised an error with `rst2html`. * Fix broken 'Convertible relation' links that were raising warnings. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* .forbids pragma: defining forbidden tags (#20050)Lancer112112022-07-261-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * .forbids pragma: defining illegal effects for proc types This patch intends to define the opposite of the .tags pragma: a way to define effects which are not allowed in a proc. * updated documentation and changelogs for the forbids pragma * renamed notTagEffects to forbiddenEffects * corrected issues of forbids pragma the forbids pragma didn't handle simple restrictions properly and it also had issues with subtyping * removed incorrect character from changelog * added test to cover the interaction of methods and the forbids pragma * covering the interaction of the tags and forbids pragmas * updated manual about the forbids pragma * removed useless statement * corrected the subtyping of proc types using the forbids pragma * updated manual for the forbids pragma * updated documentations for forbids pragma * updated nim docs * updated docs with rsttester.nim * regenerated documentation * updated rst docs * Update changelog.md Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> * updated changelog * corrected typo Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* Markdown code blocks part 2; migrate Nim Manual (#20080)Andrey Makarov2022-07-254-636/+823
| | | | | * Change headings underscored by `~~~` to `###` * Markdown code blocks part 2; migrate Nim Manual
* Use `passc` and `passl` consistently with compiler checking (#20068)tersec2022-07-211-7/+7
|
* Fixed errors in Nim Backend integration docs. (#20046)Don-Duong Quach2022-07-171-2/+3
| | | | | | | | Fixed errors in Nim Backend integration. Section "Nim invocation example from C" NimMain needs a declaration and function declarations have external linkage by default. Also with the order of arguments to gcc with a static lib, maths.c needs to come before the static lib.
* Fix typo in line 456 (#20047)Peter Guld Leth2022-07-171-1/+1
|
* Improve Markdown code blocks & start moving docs to Markdown style (#19954)Andrey Makarov2022-07-1535-50/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add additional parameters parsing (other implementations will just ignore them). E.g. if in RST we have: .. code:: nim :test: "nim c $1" ... then in Markdown that will be: ```nim test="nim c $1" ... ``` - implement Markdown interpretation of additional indentation which is less than 4 spaces (>=4 spaces is a code block but it's not implemented yet). RST interpretes it as quoted block, for Markdown it's just normal paragraphs. - add separate `md2html` and `md2tex` commands. This is to separate Markdown behavior in cases when it diverges w.r.t. RST significantly — most conspicously like in the case of additional indentation above, and also currently the contradicting inline rule of Markdown is also turned on only in `md2html` and `md2tex`. **Rationale:** mixing Markdown and RST arbitrarily is a way to nowhere, we need to provide a way to fix the particular behavior. Note that still all commands have **both** Markdown and RST features **enabled**. In this PR `*.nim` files can be processed only in Markdown mode, while `md2html` is for `*.md` files and `rst2html` for `*.rst` files. - rename `*.rst` files to `.*md` as our current default behavior is already Markdown-ish - convert code blocks in `docgen.rst` to Markdown style as an example. Other code blocks will be converted in the follow-up PRs - fix indentation inside Markdown code blocks — additional indentation is preserved there - allow more than 3 backticks open/close blocks (tildas \~ are still not allowed to avoid conflict with RST adornment headings) see also https://github.com/nim-lang/RFCs/issues/355 - better error messages - (other) fix a bug that admonitions cannot be used in sandbox mode; fix annoying warning on line 2711
* Allow recursive closure iterators (#19939)Tanguy2022-06-301-4/+1
|
* Fix distinct requiresInit test and manual (#19901)Khaled Hammouda2022-06-221-4/+7
| | | fix distinct test and manual
* Keep the doc sidebar on the screen while scrolling (#19851)JJ2022-06-151-93/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [docgen] Group sidebar sections into <details> (open by default) * [docgen] Consistent indentation in generated HTML (this is a boon for working on docgen's html/css output) * [docgen] Move Source/Edit buttons inside main div This makes styling the documentation significantly easier. * [docgen] Somewhat consistent CSS formatting * [docgen] Keep the sidebar onscreen while scrolling * [docgen] Tweak CSS for the sticky sidebar * [docgen] search type=text ==> type=search * [docgen] Update expected doc output * [docgen] Fix Group by Type sidebar placement bug * [docgen] Curse you, whitespace (fix tests) * [docgen] Fix rst2html tests Co-authored-by: sandytypical <43030857+xflywind@users.noreply.github.com>
* Extend and document compiler debugging utilities (#19841)quantimnot2022-06-102-38/+185
| | | | | | | | | * Add two debugutils procs that native debuggers can break on use to execute commands when code of interest is being compiled. * Add GDB and LLDB programs to disable and enable breakpoints and watchpoints when code of interest is being compiled. * Extend the `intern.rst` docs regarding debugging the compiler. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* clarify how to restart CI (#19845)flywind2022-06-081-0/+1
|
* RST: improve simple tables (#19859)Andrey Makarov2022-06-047-28/+34
| | | | | | | * RST: improve simple tables * nim 1.0 gotchas * Still allow legacy boundaries like `----`
* Refactor and doc package handling, module name mangling (#19821)quantimnot2022-05-301-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor and doc package handling, module name mangling * Consolidate, de-duplicate and extend package handling * Alter how duplicate module names of a package are handled * Alter how module names are mangled * Fix crash when another package is named 'stdlib' (test case added) * Doc what defines a package in the manual Modules with duplicate names within a package used to be given 'fake' packages to resolve conflicts. That prevented the ability to discern if a module belonged to the current project package or a foreign package. They now have the proper package owner and the names are mangled in a consistent manner to prevent codegen clashes. All module names are now mangled the same. Stdlib was treated special before, but now it is same as any other package. This fixes a crash when a foreign package is named 'stdlib'. Module mangling is altered for both file paths and symbols used by the backends. Removed an unused module name to package mapping that may have been intended for IC. The mapping was removed because it wasn't being used and was complicating the issue of package modules with duplicate names not having the proper package owner assigned. * Fix some tests * Refactor `packagehandling` * Remove `packagehandling.withPackageName` and its uses * Move module path mangling from `packagehandling` to `modulepaths` * Move `options.toRodFile` to `ic` to break import cycle * Changed import style to match preferred style Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* Doc preferred import style in compiler (#19832)quantimnot2022-05-301-0/+1
| | | | | Doc prefered import style in compiler Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* Fix typo and incorrect pragma name (#19847)Michael New2022-05-301-1/+1
|
* Add link to std/tempfiles in the docs; fix #19155 (#19807)flywind2022-05-241-0/+4
|
* Fix default testament target in docs and cli help (#19796)quantimnot2022-05-231-2/+2
| | | Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* [manual] TLock => Lock (#19785)flywind2022-05-171-3/+7
| | | | | * [manual] TLock => Lock * minor
* varargs example erroneously transformed "abc" to "def" (#19781)Alfred Morgan2022-05-101-1/+1
|
* Fix link to experimental manual in macro pragmas section [skip ci] (#19753)Jake Leahy2022-05-031-1/+1
|
* document localPassC consistently with compiler; fix ANSI capitalization (#19721)tersec2022-04-251-4/+4
|
* Move common Latex code into class nimdoc.cls (#19734)Andrey Makarov2022-04-211-0/+190
|
* fix: Fix introductory macro examples (#19706)Leon2022-04-091-3/+17
| | | Co-authored-by: adigitoleo <adigitoleo@dissimulo.com>
* Fixed description as option in advopt.txt (#19635)Omar Flores2022-03-261-3/+7
| | | | | | | | | | | | * Fixed formatting error in warningAsError. There was only a single space character between the warning and its description, so it shows up as part of the name (in bold) and with no description. Copied the way hotCodeReloading was formatted, with the description in a new line. Also changed descriptions from 'ditto' to what the description it references says. * Fixed typo in advopt.txt Corrected 'hints' to 'warnings' in updated advopt.txt.
* Add more info for {.bycopy.} (#18815)treeform2022-03-241-0/+1
| | | | | | | | | | | * Add more info for {.bycopy.} See confusion here: https://github.com/nim-lang/Nim/issues/18807 I hope this will help people googling to find this. * Update doc/manual.rst Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* support useVersion:1.6 (#19601)flywind2022-03-102-6/+1
|
* Fix typo in Nim Tutorial pt3 (#19579)huantian2022-03-021-1/+1
|
* keep casing of noinit and noreturn pragmas consistently documented (#19535)tersec2022-02-181-2/+2
|
* Documentation: Fix word usage (#19529)Sizhe Zhao2022-02-141-1/+1
|
* move io out of system (#19442)flywind2022-02-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * move io out of system * fix tests * fix tests * next step * rename to syncio * rename * fix nimscript * comma * fix * fix parts of errors * good for now * fix test
* update outdated link (#19465)flywind2022-01-281-1/+1
| | | Ref https://github.com/nim-lang/Nim/issues/19463
* New/better macro pragmas, mark some as experimental (#19406)metagn2022-01-202-17/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New/better macro pragmas, make some experimental fix #15920, close #18212, close #14781, close #6696, close https://github.com/nim-lang/RFCs/issues/220 Variable macro pragmas have been changed to only take a unary section node. They can now also be applied in sections with multiple variables, as well as `const` sections. They also accept arguments. Templates now support macro pragmas, mirroring other routine types. Type and variable macro pragmas have been made experimental. Symbols without parentheses instatiating nullary macros or templates has also been documented in the experimental manual. A check for a redefinition error based on the left hand side of variable definitions when using variable macro pragmas was disabled. This nerfs `byaddr` specifically, however this has been documented as a consequence of the experimental features `byaddr` uses. Given how simple these changes are I'm worried if I'm missing something. * accomodate compiler boot * allow weird pragmas * add test for #10994 * remove some control flow, try remove some logic
* deprecate unsafeAddr; extend addr (#19373)flywind2022-01-162-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * deprecate unsafeAddr; extend addr addr is now available for all addressable locations, unsafeAddr is deprecated and become an alias for addr * follow @Vindaar's advice * change the signature of addr * unsafeAddr => addr (stdlib) * Update changelog.md * unsafeAddr => addr (tests) * Revert "unsafeAddr => addr (stdlib)" This reverts commit ab83c99c507048a8396e636bf22d55fdd84d7d1c. * doc changes; thanks to @konsumlamm Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* move type operation section and remove deepcopy document (#19389)flywind2022-01-152-40/+26
| | | ref #19173; because deepcopy is not fit for ORC/ARC which was used for spawn and spawn will be removed from compiler
* docs: Mention `import foo {.all.}` syntax (#19377)Leon2022-01-131-0/+11
| | | | | | | Mention the `import foo {.all.}` syntax in the manual, with a caveat about private imports. Also link to the experimental importutils module. Co-authored-by: adigitoleo <adigitoleo@dissimulo.com>