summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/cgi.nim2
-rw-r--r--lib/pure/collections/deques.nim2
-rw-r--r--lib/pure/collections/tables.nim2
-rw-r--r--lib/pure/complex.nim2
-rw-r--r--lib/pure/cookies.nim6
-rw-r--r--lib/pure/distros.nim6
-rw-r--r--lib/pure/json.nim7
-rw-r--r--lib/pure/marshal.nim2
-rw-r--r--lib/pure/math.nim2
-rw-r--r--lib/pure/oids.nim2
-rw-r--r--lib/pure/options.nim2
-rw-r--r--lib/pure/os.nim8
-rw-r--r--lib/pure/random.nim4
-rw-r--r--lib/pure/rationals.nim2
-rw-r--r--lib/pure/ropes.nim2
-rw-r--r--lib/pure/stats.nim2
-rw-r--r--lib/pure/strformat.nim4
-rw-r--r--lib/pure/sugar.nim2
-rw-r--r--lib/pure/typetraits.nim2
-rw-r--r--lib/pure/unittest.nim8
-rw-r--r--lib/pure/uri.nim2
21 files changed, 35 insertions, 36 deletions
diff --git a/lib/pure/cgi.nim b/lib/pure/cgi.nim
index fd5089dbb..566482b21 100644
--- a/lib/pure/cgi.nim
+++ b/lib/pure/cgi.nim
@@ -29,7 +29,7 @@
 ##    writeLine(stdout, "your password: " & myData["password"])
 ##    writeLine(stdout, "</body></html>")
 
-import std/[strutils, os, strtabs, cookies, uri]
+import strutils, os, strtabs, cookies, uri
 export uri.encodeUrl, uri.decodeUrl
 
 
diff --git a/lib/pure/collections/deques.nim b/lib/pure/collections/deques.nim
index 582bb02a7..c378dff1d 100644
--- a/lib/pure/collections/deques.nim
+++ b/lib/pure/collections/deques.nim
@@ -50,7 +50,7 @@ runnableExamples:
 
 import std/private/since
 
-import std/math
+import math
 
 type
   Deque*[T] = object
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim
index 9387807c0..8739b60a3 100644
--- a/lib/pure/collections/tables.nim
+++ b/lib/pure/collections/tables.nim
@@ -196,7 +196,7 @@ runnableExamples:
 
 
 import std/private/since
-import std/[hashes, math, algorithm]
+import hashes, math, algorithm
 
 type
   KeyValuePair[A, B] = tuple[hcode: Hash, key: A, val: B]
diff --git a/lib/pure/complex.nim b/lib/pure/complex.nim
index b9371c1e1..5492028a8 100644
--- a/lib/pure/complex.nim
+++ b/lib/pure/complex.nim
@@ -36,7 +36,7 @@ runnableExamples:
 {.push checks: off, line_dir: off, stack_trace: off, debugger: off.}
 # the user does not want to trace a part of the standard library!
 
-import std/math
+import math
 
 type
   Complex*[T: SomeFloat] = object
diff --git a/lib/pure/cookies.nim b/lib/pure/cookies.nim
index 8d9cc0c95..25d701eb4 100644
--- a/lib/pure/cookies.nim
+++ b/lib/pure/cookies.nim
@@ -9,7 +9,7 @@
 
 ## This module implements helper procs for parsing Cookies.
 
-import std/[strtabs, times, options]
+import strtabs, times, options
 
 
 type
@@ -25,7 +25,7 @@ proc parseCookies*(s: string): StringTableRef =
   ## "Set-Cookie" header set by servers.
   runnableExamples:
     import std/strtabs
-    let cookieJar = parseCookies("a=1; foo=bar") 
+    let cookieJar = parseCookies("a=1; foo=bar")
     assert cookieJar["a"] == "1"
     assert cookieJar["foo"] == "bar"
 
@@ -46,7 +46,7 @@ proc parseCookies*(s: string): StringTableRef =
 
 proc setCookie*(key, value: string, domain = "", path = "",
                 expires = "", noName = false,
-                secure = false, httpOnly = false, 
+                secure = false, httpOnly = false,
                 maxAge = none(int), sameSite = SameSite.Default): string =
   ## Creates a command in the format of
   ## `Set-Cookie: key=value; Domain=...; ...`
diff --git a/lib/pure/distros.nim b/lib/pure/distros.nim
index 2b119b92c..c1bc44eeb 100644
--- a/lib/pure/distros.nim
+++ b/lib/pure/distros.nim
@@ -27,11 +27,11 @@
 ##
 ## See `packaging <packaging.html>`_ for hints on distributing Nim using OS packages.
 
-from std/strutils import contains, toLowerAscii
+from strutils import contains, toLowerAscii
 
 when not defined(nimscript):
-  from std/osproc import execProcess
-  from std/os import existsEnv
+  from osproc import execProcess
+  from os import existsEnv
 
 type
   Distribution* {.pure.} = enum ## the list of known distributions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index 7ee5be9c5..96ee61fd5 100644
--- a/lib/pure/json.nim
+++ b/lib/pure/json.nim
@@ -159,10 +159,9 @@ runnableExamples:
     a1, a2, a0, a3, a4: int
   doAssert $(%* Foo()) == """{"a1":0,"a2":0,"a0":0,"a3":0,"a4":0}"""
 
-import
-  std/[hashes, tables, strutils, lexbase, streams, macros, parsejson]
+import hashes, tables, strutils, lexbase, streams, macros, parsejson
 
-import std/options # xxx remove this dependency using same approach as https://github.com/nim-lang/Nim/pull/14563
+import options # xxx remove this dependency using same approach as https://github.com/nim-lang/Nim/pull/14563
 import std/private/since
 
 export
@@ -921,7 +920,7 @@ proc parseJson*(s: Stream, filename: string = ""; rawIntegers = false, rawFloats
     p.close()
 
 when defined(js):
-  from std/math import `mod`
+  from math import `mod`
   from std/jsffi import JSObject, `[]`, to
   from std/private/jsutils import getProtoName, isInteger, isSafeInteger
 
diff --git a/lib/pure/marshal.nim b/lib/pure/marshal.nim
index 936b8fe94..993e0f510 100644
--- a/lib/pure/marshal.nim
+++ b/lib/pure/marshal.nim
@@ -54,7 +54,7 @@ Please use alternative packages for serialization.
 It is possible to reimplement this module using generics and type traits.
 Please contribute a new implementation.""".}
 
-import std/[streams, typeinfo, json, intsets, tables, unicode]
+import streams, typeinfo, json, intsets, tables, unicode
 
 proc ptrToInt(x: pointer): int {.inline.} =
   result = cast[int](x) # don't skip alignment
diff --git a/lib/pure/math.nim b/lib/pure/math.nim
index 03e5040ae..cff946581 100644
--- a/lib/pure/math.nim
+++ b/lib/pure/math.nim
@@ -58,7 +58,7 @@ import std/private/since
 {.push debugger: off.} # the user does not want to trace a part
                        # of the standard library!
 
-import std/[bitops, fenv]
+import bitops, fenv
 
 when defined(c) or defined(cpp):
   proc c_isnan(x: float): bool {.importc: "isnan", header: "<math.h>".}
diff --git a/lib/pure/oids.nim b/lib/pure/oids.nim
index fb70047b6..da285a187 100644
--- a/lib/pure/oids.nim
+++ b/lib/pure/oids.nim
@@ -15,7 +15,7 @@
 ## This implementation calls `initRand()` for the first call of
 ## `genOid`.
 
-import std/[hashes, times, endians, random]
+import hashes, times, endians, random
 from std/private/decode_helpers import handleHexChar
 
 type
diff --git a/lib/pure/options.nim b/lib/pure/options.nim
index 63e3598f0..bd5aa389e 100644
--- a/lib/pure/options.nim
+++ b/lib/pure/options.nim
@@ -69,7 +69,7 @@ supports pattern matching on `Option`s, with the `Some(<pattern>)` and
 # xxx pending https://github.com/timotheecour/Nim/issues/376 use `runnableExamples` and `whichModule`
 
 
-import std/typetraits
+import typetraits
 
 when (NimMajor, NimMinor) >= (1, 1):
   type
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index 0710b8333..50a88b43b 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -44,7 +44,7 @@
 include system/inclrtl
 import std/private/since
 
-import std/[strutils, pathnorm]
+import strutils, pathnorm
 
 const weirdTarget = defined(nimscript) or defined(js)
 
@@ -65,9 +65,9 @@ since (1, 1):
 when weirdTarget:
   discard
 elif defined(windows):
-  import std/[winlean, times]
+  import winlean, times
 elif defined(posix):
-  import std/[posix, times]
+  import posix, times
 
   proc toTime(ts: Timespec): times.Time {.inline.} =
     result = initTime(ts.tv_sec.int64, ts.tv_nsec.int)
@@ -1008,7 +1008,7 @@ proc expandTilde*(path: string): string {.
   ##
   ## Windows: this is still supported despite Windows platform not having this
   ## convention; also, both ``~/`` and ``~\`` are handled.
-  ## 
+  ##
   ## .. warning:: `~bob` and `~bob/` are not yet handled correctly.
   ##
   ## See also:
diff --git a/lib/pure/random.nim b/lib/pure/random.nim
index f91d92731..e58623baa 100644
--- a/lib/pure/random.nim
+++ b/lib/pure/random.nim
@@ -72,7 +72,7 @@ runnableExamples:
 ## * `list of cryptographic and hashing modules <lib.html#pure-libraries-hashing>`_
 ##   in the standard library
 
-import std/[algorithm, math]
+import algorithm, math
 import std/private/since
 
 include system/inclrtl
@@ -625,7 +625,7 @@ proc shuffle*[T](x: var openArray[T]) =
   shuffle(state, x)
 
 when not defined(nimscript) and not defined(standalone):
-  import std/times
+  import times
 
   proc initRand(): Rand =
     ## Initializes a new Rand state with a seed based on the current time.
diff --git a/lib/pure/rationals.nim b/lib/pure/rationals.nim
index a059651bb..800979cda 100644
--- a/lib/pure/rationals.nim
+++ b/lib/pure/rationals.nim
@@ -21,7 +21,7 @@ runnableExamples:
   doAssert r1 * r2 == -3 // 8
   doAssert r1 / r2 == -2 // 3
 
-import std/[math, hashes]
+import math, hashes
 
 type Rational*[T] = object
   ## A rational number, consisting of a numerator `num` and a denominator `den`.
diff --git a/lib/pure/ropes.nim b/lib/pure/ropes.nim
index 42550af1d..1300b4479 100644
--- a/lib/pure/ropes.nim
+++ b/lib/pure/ropes.nim
@@ -17,7 +17,7 @@
 ## runtime efficiency.
 
 include system/inclrtl
-import std/streams
+import streams
 
 {.push debugger: off.} # the user does not want to trace a part
                        # of the standard library!
diff --git a/lib/pure/stats.nim b/lib/pure/stats.nim
index 6e2d5fecd..e46dff212 100644
--- a/lib/pure/stats.nim
+++ b/lib/pure/stats.nim
@@ -53,7 +53,7 @@ runnableExamples:
   doAssert statistics.kurtosis() ~= -1.0
   doAssert statistics.kurtosisS() ~= -0.7000000000000008
 
-from std/math import FloatClass, sqrt, pow, round
+from math import FloatClass, sqrt, pow, round
 
 {.push debugger: off.} # the user does not want to trace a part
                        # of the standard library!
diff --git a/lib/pure/strformat.nim b/lib/pure/strformat.nim
index 736b4d501..52731e970 100644
--- a/lib/pure/strformat.nim
+++ b/lib/pure/strformat.nim
@@ -313,8 +313,8 @@ help with readability, since there is only so much you can cram into
 single letter DSLs.
 ]##
 
-import std/[macros, parseutils, unicode]
-import std/strutils except format
+import macros, parseutils, unicode
+import strutils except format
 
 proc mkDigit(v: int, typ: char): string {.inline.} =
   assert(v < 26)
diff --git a/lib/pure/sugar.nim b/lib/pure/sugar.nim
index 239ed9cf1..9abef55a2 100644
--- a/lib/pure/sugar.nim
+++ b/lib/pure/sugar.nim
@@ -11,7 +11,7 @@
 ## macro system.
 
 import std/private/since
-import std/macros
+import macros
 
 proc checkPragma(ex, prag: var NimNode) =
   since (1, 3):
diff --git a/lib/pure/typetraits.nim b/lib/pure/typetraits.nim
index 2527dc26e..3e215a0ea 100644
--- a/lib/pure/typetraits.nim
+++ b/lib/pure/typetraits.nim
@@ -167,7 +167,7 @@ since (1, 3, 5):
 
     typeof(block: (for ai in a: ai))
 
-import std/macros
+import macros
 
 macro enumLen*(T: typedesc[enum]): int =
   ## Returns the number of items in the enum `T`.
diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim
index 3cff833e4..80a05db36 100644
--- a/lib/pure/unittest.nim
+++ b/lib/pure/unittest.nim
@@ -108,15 +108,15 @@
 import std/private/since
 import std/exitprocs
 
-import std/[macros, strutils, streams, times, sets, sequtils]
+import macros, strutils, streams, times, sets, sequtils
 
 when declared(stdout):
-  import std/os
+  import os
 
 const useTerminal = not defined(js)
 
 when useTerminal:
-  import std/terminal
+  import terminal
 
 type
   TestStatus* = enum ## The status of a test when it is done.
@@ -747,7 +747,7 @@ macro expect*(exceptions: varargs[typed], body: untyped): untyped =
       of 2: discard parseInt("Hello World!")
       of 3: raise newException(IOError, "I can't do that Dave.")
       else: assert 2 + 2 == 5
-    
+
     expect IOError, OSError, ValueError, AssertionDefect:
       defectiveRobot()
 
diff --git a/lib/pure/uri.nim b/lib/pure/uri.nim
index d2a9f3848..cf712fa89 100644
--- a/lib/pure/uri.nim
+++ b/lib/pure/uri.nim
@@ -39,7 +39,7 @@ runnableExamples:
   doAssert getDataUri("Nim", "text/plain") == "data:text/plain;charset=utf-8;base64,Tmlt"
 
 
-import std/[strutils, parseutils, base64]
+import strutils, parseutils, base64
 import std/private/[since, decode_helpers]