mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 15:31:28 +00:00
Documentation import fixes (#11070)
* Move asyncdispatch imports below introduction * Move nre imports below documentation
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user