summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorZed <zestyr@users.noreply.github.com>2019-04-21 09:45:05 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-04-21 09:45:05 +0200
commit88079a0dee3b6e7820811783ce0df0db8f97a8ad (patch)
treebc2221a9939633677ac1a7ebd8a4b5ca48a96c37
parent375b444ecd41645c848fe369a777a53f9312fbe3 (diff)
downloadNim-88079a0dee3b6e7820811783ce0df0db8f97a8ad.tar.gz
Documentation import fixes (#11070)
* Move asyncdispatch imports below introduction

* Move nre imports below documentation
-rw-r--r--lib/impure/nre.nim21
-rw-r--r--lib/pure/asyncdispatch.nim31
2 files changed, 23 insertions, 29 deletions
diff --git a/lib/impure/nre.nim b/lib/impure/nre.nim
index 5c5125ba1..7014af42a 100644
--- a/lib/impure/nre.nim
+++ b/lib/impure/nre.nim
@@ -6,18 +6,6 @@
 #    distribution, for details about the copyright.
 #
 
-
-from pcre import nil
-import nre/private/util
-import tables
-from strutils import `%`
-from math import ceil
-import options
-from unicode import runeLenAt
-
-export options
-
-
 ## What is NRE?
 ## ============
 ##
@@ -67,6 +55,15 @@ runnableExamples:
     let matchBounds = firstVowel.get().captureBounds[-1]
     doAssert matchBounds.a == 1
 
+from pcre import nil
+import nre/private/util
+import tables
+from strutils import `%`
+from math import ceil
+import options
+from unicode import runeLenAt
+
+export options
 
 # Type definitions {{{
 type
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim
index 08fa60dbc..b68653277 100644
--- a/lib/pure/asyncdispatch.nim
+++ b/lib/pure/asyncdispatch.nim
@@ -7,23 +7,6 @@
 #    distribution, for details about the copyright.
 #
 
-include "system/inclrtl"
-
-import os, tables, strutils, times, heapqueue, lists, options, asyncstreams
-import options, math
-import asyncfutures except callSoon
-
-import nativesockets, net, deques
-
-export Port, SocketFlag
-export asyncfutures except callSoon
-export asyncstreams
-
-#{.injectStmt: newGcInvariant().}
-
-## AsyncDispatch
-## *************
-##
 ## This module implements asynchronous IO. This includes a dispatcher,
 ## a ``Future`` type implementation, and an ``async`` macro which allows
 ## asynchronous code to be written in a synchronous style with the ``await``
@@ -162,6 +145,20 @@ export asyncstreams
 ##
 ## * The effect system (``raises: []``) does not work with async procedures.
 
+include "system/inclrtl"
+
+import os, tables, strutils, times, heapqueue, lists, options, asyncstreams
+import options, math
+import asyncfutures except callSoon
+
+import nativesockets, net, deques
+
+export Port, SocketFlag
+export asyncfutures except callSoon
+export asyncstreams
+
+#{.injectStmt: newGcInvariant().}
+
 # TODO: Check if yielded future is nil and throw a more meaningful exception
 
 type