Skip to content

Commit c8e0fcb

Browse files
committed
use new mir-primitives
1 parent 1dde458 commit c8e0fcb

File tree

11 files changed

+16
-18
lines changed

11 files changed

+16
-18
lines changed

source/mir/algorithm/iteration.d

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ import mir.ndslice.slice;
6262
import mir.primitives;
6363
import mir.qualifier;
6464
import std.meta;
65-
import std.range.primitives: isInputRange, isBidirectionalRange, isInfinite, isForwardRange, ElementType;
6665
import std.traits;
6766

6867
/++
@@ -3857,6 +3856,8 @@ struct Uniq(alias pred, Range)
38573856
return _input.front;
38583857
}
38593858

3859+
import std.range.primitives: isBidirectionalRange;
3860+
38603861
static if (isBidirectionalRange!Range)
38613862
{
38623863
void popBack() scope
@@ -3886,6 +3887,8 @@ struct Uniq(alias pred, Range)
38863887
@property bool empty() const { return _input.empty; }
38873888
}
38883889

3890+
import std.range.primitives: isForwardRange;
3891+
38893892
static if (isForwardRange!Range)
38903893
{
38913894
@property typeof(this) save() scope return
@@ -4022,6 +4025,7 @@ struct Filter(alias pred, Range)
40224025
}
40234026
}
40244027

4028+
import std.range.primitives: isForwardRange;
40254029
static if (isForwardRange!Range)
40264030
{
40274031
@property typeof(this) save() scope return
@@ -4116,7 +4120,7 @@ template rcfilter(alias pred = "a", alias map = "a")
41164120
if (isIterable!Range && (!isSlice!Range || DimensionCount!Range == 1))
41174121
{
41184122
import core.lifetime: forward;
4119-
import std.range.primitives: isInputRange;
4123+
import mir.primitives: isInputRange;
41204124
import mir.rc.array: RCArray;
41214125

41224126
if (false)

source/mir/algorithm/setops.d

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ struct MultiwayMerge(alias less, RangeOfRanges)
5252
{
5353
import mir.primitives;
5454
import mir.container.binaryheap;
55-
import std.range.primitives: ElementType;
5655

5756
///
5857
@disable this();

source/mir/array/allocation.d

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ module mir.array.allocation;
2424

2525
import mir.functional;
2626
import mir.primitives;
27-
2827
import std.traits;
29-
import std.range.primitives: isInfinite, isInputRange, ElementType;
3028

3129
/**
3230
* Allocates an array and initializes it with copies of the elements

source/mir/container/binaryheap.d

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ Authors: $(HTTP erdani.com, Andrei Alexandrescu) (original Phobos code), Ilya Ya
1515
module mir.container.binaryheap;
1616

1717
import mir.primitives;
18-
import mir.primitives;
19-
20-
import std.range.primitives: isRandomAccessRange, hasSwappableElements, ElementType;
18+
import std.range.primitives: isRandomAccessRange, hasSwappableElements;
2119
import std.traits;
2220

2321
///
@@ -384,7 +382,7 @@ BinaryHeap!(less, Store) heapify(alias less = "a < b", Store)(Store s,
384382
@system nothrow version(mir_test) unittest
385383
{
386384
// Test range interface.
387-
import std.range.primitives: isInputRange;
385+
import mir.primitives: isInputRange;
388386
import mir.algorithm.iteration : equal;
389387
int[] a = [4, 1, 3, 2, 16, 9, 10, 14, 8, 7];
390388
auto h = heapify(a);

source/mir/date.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ Authors: $(HTTP jmdavisprog.com, Jonathan M Davis), Ilya Yaroshenko (boost-like
2929
+/
3030
module mir.date;
3131

32+
import mir.primitives: isOutputRange;
3233
import mir.serde: serdeProxy, serdeScoped;
3334
import mir.timestamp: Timestamp;
34-
import std.range.primitives : isOutputRange;
35-
import std.traits : isSomeChar, Unqual;
35+
import std.traits: isSomeChar, Unqual;
3636

3737
version(mir_test)
3838
version(D_Exceptions)

source/mir/math/numeric.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module mir.math.numeric;
99

1010
import mir.math.common;
1111
import mir.primitives;
12-
import std.range.primitives: isInputRange;
12+
import mir.primitives: isInputRange;
1313
import std.traits: CommonType, Unqual, isIterable, ForeachType, isPointer;
1414
import mir.internal.utility: isFloatingPoint;
1515

source/mir/math/stat.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3454,7 +3454,7 @@ A linear regression model with a single explanatory variable.
34543454
template simpleLinearRegression(Summation summation = Summation.kbn)
34553455
{
34563456
import mir.ndslice.slice;
3457-
import std.range.primitives: isInputRange;
3457+
import mir.primitives: isInputRange;
34583458

34593459
/++
34603460
Params:

source/mir/ndslice/topology.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,7 +2781,7 @@ template map(fun...)
27812781
if (!hasAsSlice!Range && !isSlice!Range && !is(Range : T[], T))
27822782
{
27832783
import core.lifetime: forward;
2784-
import std.range.primitives: isInputRange;
2784+
import mir.primitives: isInputRange;
27852785
static assert (isInputRange!Range, "map can work with ndslice, array, or an input range.");
27862786
return MapRange!(f, ImplicitlyUnqual!Range)(forward!r);
27872787
}
@@ -3383,7 +3383,7 @@ template rcmap(fun...)
33833383
if (!hasAsSlice!Range && !isSlice!Range && !is(Range : T[], T))
33843384
{
33853385
import core.lifetime: forward;
3386-
import std.range.primitives: isInputRange;
3386+
import mir.primitives: isInputRange;
33873387
import mir.rc.array: RCArray;
33883388

33893389
if (false)

source/mir/parse.d

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ unittest
2727
}
2828

2929
import mir.primitives;
30-
import std.range.primitives: isInputRange;
3130
import std.traits: isMutable, isFloatingPoint, isSomeChar;
3231

3332
/++

source/mir/rc/array.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ RCArray!V rcarray(T = void, V)(scope V[] values, bool deallocate)
361361
template rcarray(T)
362362
if(!is(T == E[], E) && !is(T == void))
363363
{
364-
import std.range.primitives: isInputRange, isInfinite;
364+
import mir.primitives: isInputRange, isInfinite;
365365

366366
///
367367
auto rcarray(Range)(ref Range range)

0 commit comments

Comments
 (0)