Documentation import fixes (#11070)

* Move asyncdispatch imports below introduction

* Move nre imports below documentation
This commit is contained in:
Zed
2019-04-21 09:45:05 +02:00
committed by Andreas Rumpf
parent 375b444ecd
commit 88079a0dee
2 changed files with 23 additions and 29 deletions

View File

@@ -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

View File

@@ -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