From e94a3e5fcd4f36f090520a859e587c6019ba296b Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Sat, 20 Feb 2021 09:08:13 -0800 Subject: move prelude so that `include std/prelude` also works (#17110) * move prelude so that `include std/prelude` also works * add test --- lib/prelude.nim | 21 --------------------- lib/pure/prelude.nim | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 21 deletions(-) delete mode 100644 lib/prelude.nim create mode 100644 lib/pure/prelude.nim (limited to 'lib') diff --git a/lib/prelude.nim b/lib/prelude.nim deleted file mode 100644 index e8f21fc99..000000000 --- a/lib/prelude.nim +++ /dev/null @@ -1,21 +0,0 @@ -# -# -# Nim's Runtime Library -# (c) Copyright 2012 Andreas Rumpf -# -# See the file "copying.txt", included in this -# distribution, for details about the copyright. -# - -## This is an include file that simply imports common modules for your -## convenience: -## -## .. code-block:: nim -## include prelude -## -## Same as: -## -## .. code-block:: nim -## import os, strutils, times, parseutils, hashes, tables, sets, sequtils, parseopt - -import os, strutils, times, parseutils, hashes, tables, sets, sequtils, parseopt diff --git a/lib/pure/prelude.nim b/lib/pure/prelude.nim new file mode 100644 index 000000000..5da608961 --- /dev/null +++ b/lib/pure/prelude.nim @@ -0,0 +1,24 @@ +# +# +# Nim's Runtime Library +# (c) Copyright 2012 Andreas Rumpf +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +## This is an include file that simply imports common modules for your +## convenience: +## +## .. code-block:: nim +## include std/prelude +## +## Same as: +## +## .. code-block:: nim +## import std/[os, strutils, times, parseutils, hashes, tables, sets, sequtils, parseopt] + +# xxx deduplicate with prelude.rst + +import std/[os, strutils, times, parseutils, hashes, tables, sets, sequtils, parseopt] + -- cgit 1.4.1-2-gfad0 t type='hidden' name='id' value='d1daccac2f9b9885f9c70ce52c10156d8b13b29c'/>
path: root/tests/stdlib/trstgen.nim
blob: c702ccc2a8ff81eba5ac7a06dfbc6cd80f4d45b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139