Skip to content

Commit a5105f2

Browse files
committed
Make MapFun generic in Key and File
1 parent 5cd3693 commit a5105f2

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

skiplang/prelude/src/skstore/EagerDir.sk

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ mutable class Writer{
4141
/* The signature of a function used by apply. */
4242
/*****************************************************************************/
4343

44-
type MapFun = (
44+
type MapFun<K, F> = (
4545
mutable Context,
4646
mutable Writer,
47-
Key,
48-
mutable Iterator<File>,
47+
K,
48+
mutable Iterator<F>,
4949
) ~> void;
5050

5151
/*****************************************************************************/
@@ -679,7 +679,7 @@ class EagerDir protected {
679679
DirName,
680680
Array<
681681
(
682-
MapFun,
682+
MapFun<Key, File>,
683683
?Array<KeyRange<Key>>,
684684
?((mutable Context, SortedSet<Key>) ~> void),
685685
),
@@ -960,7 +960,7 @@ class EagerDir protected {
960960
parent: EagerDir,
961961
childName: DirName,
962962
timeStack: TimeStack,
963-
f: MapFun,
963+
f: MapFun<Key, File>,
964964
acc: mutable Vector<FixedRow<Key, Array<File>>>,
965965
current: mutable IntRef,
966966
): void {
@@ -1020,7 +1020,7 @@ class EagerDir protected {
10201020
parent: EagerDir,
10211021
childName: DirName,
10221022
timeStack: TimeStack,
1023-
f: MapFun,
1023+
f: MapFun<Key, File>,
10241024
currentStart: Int,
10251025
currentEnd: Int,
10261026
start: ?Boundary<Key>,
@@ -1111,7 +1111,7 @@ class EagerDir protected {
11111111
parent: EagerDir,
11121112
childName: DirName,
11131113
timeStack: TimeStack,
1114-
f: MapFun,
1114+
f: MapFun<Key, File>,
11151115
acc: mutable Vector<FixedRow<Key, Array<File>>>,
11161116
rangeOpt: ?KeyRange<Key>,
11171117
): void {
@@ -1175,7 +1175,7 @@ class EagerDir protected {
11751175
timeStack: TimeStack,
11761176
key: Key,
11771177
valueIter: mutable Iterator<File>,
1178-
f: MapFun,
1178+
f: MapFun<Key, File>,
11791179
): void {
11801180
arrow = ArrowKey::create{parentName, childName, key};
11811181
context.enter(arrow, timeStack);
@@ -1231,7 +1231,7 @@ class EagerDir protected {
12311231
DirName,
12321232
Array<
12331233
(
1234-
MapFun,
1234+
MapFun<Key, File>,
12351235
?Array<KeyRange<Key>>,
12361236
?((mutable Context, SortedSet<Key>) ~> void),
12371237
),
@@ -1286,7 +1286,7 @@ class EagerDir protected {
12861286
context: mutable Context,
12871287
parentName: DirName,
12881288
childName: DirName,
1289-
f: MapFun,
1289+
f: MapFun<Key, File>,
12901290
reducerOpt: ?IReducer<File> = None(),
12911291
rangeOpt: ?Array<KeyRange<Key>> = None(),
12921292
onUpdate: ?((mutable Context, SortedSet<Key>) ~> void) = None(),
@@ -1305,7 +1305,7 @@ class EagerDir protected {
13051305
DirName,
13061306
Array<
13071307
(
1308-
MapFun,
1308+
MapFun<Key, File>,
13091309
?Array<KeyRange<Key>>,
13101310
?((mutable Context, SortedSet<Key>) ~> void),
13111311
),
@@ -1577,7 +1577,7 @@ class EagerDir protected {
15771577
contextDirtyReadersOpt: ?SortedMap<DirName, SortedSet<Key>>,
15781578
parentMaps: Array<
15791579
(
1580-
MapFun,
1580+
MapFun<Key, File>,
15811581
?Array<KeyRange<Key>>,
15821582
?((mutable Context, SortedSet<Key>) ~> void),
15831583
),

sql/src/SqlSelect.sk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ fun makeJoinReducer(
15991599
joinKind: P.JoinKind,
16001600
kinds: Array<(Int, P.IKind, P.Type)>,
16011601
onlyLeftValues: Bool,
1602-
): SKStore.MapFun {
1602+
): SKStore.MapFun<SKStore.Key, SKStore.File> {
16031603
(context, writer, _, files) ~> {
16041604
leftRows = mutable Vector[];
16051605
rightRows = mutable Vector[];

0 commit comments

Comments
 (0)