Skip to content

Commit 65581d1

Browse files
committed
[TODO FIX] Temporarily drop upper bound of higher-kinded type F in tuple match types
Currently it's tripping up the cc phase
1 parent 23a00cb commit 65581d1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

library/src/scala/NamedTuple.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ object NamedTuple:
8989
/** The type of the named tuple `X` mapped with the type-level function `F`.
9090
* If `X = (n1 : T1, ..., ni : Ti)` then `Map[X, F] = `(n1 : F[T1], ..., ni : F[Ti])`.
9191
*/
92-
type Map[X <: AnyNamedTuple, F[_ <: Tuple.Union[DropNames[X]]]] =
92+
type Map[X <: AnyNamedTuple, F[_]] =
9393
NamedTuple[Names[X], Tuple.Map[DropNames[X], F]]
9494

9595
/** A named tuple with the elements of tuple `X` in reversed order */

library/src/scala/Tuple.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package scala
22

3+
import language.experimental.captureChecking
34
import annotation.showAsInfix
45
import compiletime.*
56
import compiletime.ops.int.*
@@ -174,13 +175,13 @@ object Tuple {
174175
case h *: t => F[h, Fold[t, Z, F]]
175176

176177
/** Converts a tuple `(T1, ..., Tn)` to `(F[T1], ..., F[Tn])` */
177-
type Map[Tup <: Tuple, F[_ <: Union[Tup]]] <: Tuple = Tup match {
178+
type Map[Tup <: Tuple, F[_]] <: Tuple = Tup match {
178179
case EmptyTuple => EmptyTuple
179180
case h *: t => F[h] *: Map[t, F]
180181
}
181182

182183
/** Converts a tuple `(T1, ..., Tn)` to a flattened `(..F[T1], ..., ..F[Tn])` */
183-
type FlatMap[Tup <: Tuple, F[_ <: Union[Tup]] <: Tuple] <: Tuple = Tup match {
184+
type FlatMap[Tup <: Tuple, F[_] <: Tuple] <: Tuple = Tup match {
184185
case EmptyTuple => EmptyTuple
185186
case h *: t => Concat[F[h], FlatMap[t, F]]
186187
}
@@ -196,7 +197,7 @@ object Tuple {
196197
* ```
197198
* @syntax markdown
198199
*/
199-
type Filter[Tup <: Tuple, P[_ <: Union[Tup]] <: Boolean] <: Tuple = Tup match {
200+
type Filter[Tup <: Tuple, P[_] <: Boolean] <: Tuple = Tup match {
200201
case EmptyTuple => EmptyTuple
201202
case h *: t => P[h] match {
202203
case true => h *: Filter[t, P]

0 commit comments

Comments
 (0)