diff --git a/lib/impure/nre.nim b/lib/impure/nre.nim index 5c5125ba10..7014af42ab 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 08fa60dbce..b68653277d 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