diff options
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/asyncnet.nim | 8 | ||||
-rw-r--r-- | lib/pure/browsers.nim | 3 | ||||
-rw-r--r-- | lib/pure/collections/critbits.nim | 2 | ||||
-rw-r--r-- | lib/pure/collections/deques.nim | 2 | ||||
-rw-r--r-- | lib/pure/collections/sequtils.nim | 2 | ||||
-rw-r--r-- | lib/pure/collections/tables.nim | 4 | ||||
-rw-r--r-- | lib/pure/hashes.nim | 2 | ||||
-rw-r--r-- | lib/pure/httpclient.nim | 2 | ||||
-rw-r--r-- | lib/pure/math.nim | 2 | ||||
-rw-r--r-- | lib/pure/net.nim | 2 | ||||
-rw-r--r-- | lib/pure/os.nim | 1 | ||||
-rw-r--r-- | lib/pure/streams.nim | 2 | ||||
-rw-r--r-- | lib/pure/strtabs.nim | 1 | ||||
-rw-r--r-- | lib/pure/sugar.nim | 3 | ||||
-rw-r--r-- | lib/pure/times.nim | 3 | ||||
-rw-r--r-- | lib/pure/typetraits.nim | 9 | ||||
-rw-r--r-- | lib/pure/unittest.nim | 4 | ||||
-rw-r--r-- | lib/pure/uri.nim | 2 | ||||
-rw-r--r-- | lib/pure/xmltree.nim | 4 |
19 files changed, 27 insertions, 31 deletions
diff --git a/lib/pure/asyncnet.nim b/lib/pure/asyncnet.nim index 1e7c13413..93334d0e2 100644 --- a/lib/pure/asyncnet.nim +++ b/lib/pure/asyncnet.nim @@ -95,12 +95,8 @@ ## runForever() ## -include "system/inclrtl" - -import asyncdispatch -import nativesockets -import net -import os +import std/private/since +import asyncdispatch, nativesockets, net, os export SOBool diff --git a/lib/pure/browsers.nim b/lib/pure/browsers.nim index a70b767b7..2dc14b895 100644 --- a/lib/pure/browsers.nim +++ b/lib/pure/browsers.nim @@ -12,8 +12,9 @@ ## ## Unstable API. +import std/private/since + import strutils -include "system/inclrtl" when defined(windows): import winlean diff --git a/lib/pure/collections/critbits.nim b/lib/pure/collections/critbits.nim index 21c749afe..91c113988 100644 --- a/lib/pure/collections/critbits.nim +++ b/lib/pure/collections/critbits.nim @@ -12,7 +12,7 @@ ## by Adam Langley. ## (A crit bit tree is a form of `radix tree`:idx: or `patricia trie`:idx:.) -include "system/inclrtl" +import std/private/since type NodeObj[T] {.acyclic.} = object diff --git a/lib/pure/collections/deques.nim b/lib/pure/collections/deques.nim index 69a68c8f0..d096874a3 100644 --- a/lib/pure/collections/deques.nim +++ b/lib/pure/collections/deques.nim @@ -51,7 +51,7 @@ ## * `lists module <lists.html>`_ for singly and doubly linked lists and rings ## * `channels module <channels.html>`_ for inter-thread communication -include system/inclrtl +import std/private/since import math diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim index 02d48973e..94bce265a 100644 --- a/lib/pure/collections/sequtils.nim +++ b/lib/pure/collections/sequtils.nim @@ -73,7 +73,7 @@ ## heterogeneous members -include "system/inclrtl" +import std/private/since import macros diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim index 131e0ad80..2ea58ce1f 100644 --- a/lib/pure/collections/tables.nim +++ b/lib/pure/collections/tables.nim @@ -217,9 +217,9 @@ ## * `hashes module<hashes.html>`_ for helper functions for hashing -import hashes, math, algorithm +import std/private/since -include "system/inclrtl" +import hashes, math, algorithm type KeyValuePair[A, B] = tuple[hcode: Hash, key: A, val: B] diff --git a/lib/pure/hashes.nim b/lib/pure/hashes.nim index 9fd2a74d0..cd0841d2e 100644 --- a/lib/pure/hashes.nim +++ b/lib/pure/hashes.nim @@ -44,7 +44,7 @@ ## * `std/sha1 module <sha1.html>`_ for a sha1 encoder and decoder ## * `tables module <tables.html>`_ for hash tables -include "system/inclrtl" +import std/private/since type Hash* = int ## A hash value. Hash tables using these values should diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim index baf81d77f..42735ad4e 100644 --- a/lib/pure/httpclient.nim +++ b/lib/pure/httpclient.nim @@ -200,7 +200,7 @@ ## let client = newHttpClient(maxRedirects = 0) ## -include "system/inclrtl" +import std/private/since import net, strutils, uri, parseutils, base64, os, mimetypes, streams, math, random, httpcore, times, tables, streams, std/monotimes diff --git a/lib/pure/math.nim b/lib/pure/math.nim index a718c3338..6291cddf1 100644 --- a/lib/pure/math.nim +++ b/lib/pure/math.nim @@ -52,7 +52,7 @@ ## are on system directly, to name a few ``shr``, ``shl``, ``xor``, ``clamp``, etc. -include "system/inclrtl" +import std/private/since {.push debugger: off.} # the user does not want to trace a part # of the standard library! diff --git a/lib/pure/net.nim b/lib/pure/net.nim index 9fa019b95..fad6e897d 100644 --- a/lib/pure/net.nim +++ b/lib/pure/net.nim @@ -64,7 +64,7 @@ ## socket.acceptAddr(client, address) ## echo("Client connected from: ", address) -include "system/inclrtl" +import std/private/since import nativesockets, os, strutils, times, sets, options, std/monotimes from ssl_certs import scanSSLCertificates diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 73fa76fbb..f267e4d01 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -42,6 +42,7 @@ ## * `streams module <streams.html>`_ include "system/inclrtl" +import std/private/since import strutils, pathnorm diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim index 8efe5b227..77f384a79 100644 --- a/lib/pure/streams.nim +++ b/lib/pure/streams.nim @@ -94,7 +94,7 @@ ## * `asyncstreams module <asyncstreams.html>`_ ## * `io module <io.html>`_ for `FileMode enum <io.html#FileMode>`_ -include "system/inclrtl" +import std/private/since const taintMode = compileOption("taintmode") diff --git a/lib/pure/strtabs.nim b/lib/pure/strtabs.nim index 11aa851a1..375f212cd 100644 --- a/lib/pure/strtabs.nim +++ b/lib/pure/strtabs.nim @@ -48,6 +48,7 @@ runnableExamples: ## * `json module<json.html>`_ for table-like structure which allows ## heterogeneous members +import std/private/since import hashes, strutils diff --git a/lib/pure/sugar.nim b/lib/pure/sugar.nim index 4b3db6782..062341ccb 100644 --- a/lib/pure/sugar.nim +++ b/lib/pure/sugar.nim @@ -10,8 +10,7 @@ ## This module implements nice syntactic sugar based on Nim's ## macro system. -include system/inclrtl - +import std/private/since import macros import typetraits diff --git a/lib/pure/times.nim b/lib/pure/times.nim index 8a4c9cd20..2b98e5971 100644 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -194,6 +194,7 @@ import strutils, math, options +import std/private/since include "system/inclrtl" when defined(js): @@ -980,7 +981,7 @@ proc low*(typ: typedesc[Time]): Time = # DateTime & Timezone # -proc isLeapDay*(t: DateTime): bool {.since: (1,1).} = +proc isLeapDay*(t: DateTime): bool {.since: (1, 1).} = ## returns whether `t` is a leap day, ie, Feb 29 in a leap year. This matters ## as it affects time offset calculations. runnableExamples: diff --git a/lib/pure/typetraits.nim b/lib/pure/typetraits.nim index 280233912..06bd1487f 100644 --- a/lib/pure/typetraits.nim +++ b/lib/pure/typetraits.nim @@ -12,10 +12,9 @@ ## ## Unstable API. +import std/private/since export system.`$` # for backward compatibility -include "system/inclrtl" - proc name*(t: typedesc): string {.magic: "TypeTrait".} ## Returns the name of the given type. ## @@ -79,15 +78,13 @@ since (1, 1): doAssert 12.MyInt.distinctBase == 12 distinctBase(type(a))(a) -proc tupleLen*(T: typedesc[tuple]): int {.magic: "TypeTrait", since: (1, 1).} - ## Return number of elements of `T` + proc tupleLen*(T: typedesc[tuple]): int {.magic: "TypeTrait".} + ## Return number of elements of `T` -since (1, 1): template tupleLen*(t: tuple): int = ## Return number of elements of `t` tupleLen(type(t)) -since (1, 1): template get*(T: typedesc[tuple], i: static int): untyped = ## Return `i`\th element of `T` # Note: `[]` currently gives: `Error: no generic parameters allowed for ...` diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index 6c434bb19..bb4e2867c 100644 --- a/lib/pure/unittest.nim +++ b/lib/pure/unittest.nim @@ -93,11 +93,11 @@ ## ## echo "suite teardown: run once after the tests" +import std/private/since + import macros, strutils, streams, times, sets, sequtils -include "system/inclrtl" - when declared(stdout): import os diff --git a/lib/pure/uri.nim b/lib/pure/uri.nim index 27fbf2db2..b163a2ab4 100644 --- a/lib/pure/uri.nim +++ b/lib/pure/uri.nim @@ -44,7 +44,7 @@ ## doAssert getDataUri("Hello World", "text/plain") == "data:text/plain;charset=utf-8;base64,SGVsbG8gV29ybGQ=" ## doAssert getDataUri("Nim", "text/plain") == "data:text/plain;charset=utf-8;base64,Tmlt" -include "system/inclrtl" +import std/private/since import strutils, parseutils, base64 type diff --git a/lib/pure/xmltree.nim b/lib/pure/xmltree.nim index 35010e602..9d2e4317e 100644 --- a/lib/pure/xmltree.nim +++ b/lib/pure/xmltree.nim @@ -34,8 +34,8 @@ ## * `parsexml module <parsexml.html>`_ for low-level XML parsing ## * `htmlgen module <htmlgen.html>`_ for html code generator +import std/private/since import macros, strtabs, strutils -include "system/inclrtl" type XmlNode* = ref XmlNodeObj ## An XML tree consisting of XML nodes. @@ -103,7 +103,7 @@ proc newText*(text: string): XmlNode = result = newXmlNode(xnText) result.fText = text -proc newVerbatimText*(text: string): XmlNode {.since:(1, 3).} = +proc newVerbatimText*(text: string): XmlNode {.since: (1, 3).} = ## Creates a new ``XmlNode`` of kind ``xnVerbatimText`` with the text `text`. ## **Since**: Version 1.3. result = newXmlNode(xnVerbatimText) |