Skip to content

Commit

Permalink
Revert scala#14452
Browse files Browse the repository at this point in the history
  • Loading branch information
mbovel committed May 23, 2022
1 parent 0181ef9 commit 12a10f2
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 101 deletions.
6 changes: 3 additions & 3 deletions library/src/scala/compiletime/ops/any.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ object any:
* ```
* @syntax markdown
*/
type ==[+X, +Y] <: Boolean
type ==[X, Y] <: Boolean

/** Inequality comparison of two singleton types.
* ```scala
Expand All @@ -20,7 +20,7 @@ object any:
* ```
* @syntax markdown
*/
type !=[+X, +Y] <: Boolean
type !=[X, Y] <: Boolean

/** Tests if a type is a constant.
* ```scala
Expand Down Expand Up @@ -48,4 +48,4 @@ object any:
* ```
* @syntax markdown
*/
type ToString[+X] <: String
type ToString[X] <: String
8 changes: 4 additions & 4 deletions library/src/scala/compiletime/ops/boolean.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ object boolean:
* ```
* @syntax markdown
*/
type ![+X <: Boolean] <: Boolean
type ![X <: Boolean] <: Boolean

/** Exclusive disjunction of two `Boolean` singleton types.
* ```scala
Expand All @@ -19,7 +19,7 @@ object boolean:
* ```
* @syntax markdown
*/
type ^[+X <: Boolean, +Y <: Boolean] <: Boolean
type ^[X <: Boolean, Y <: Boolean] <: Boolean

/** Conjunction of two `Boolean` singleton types.
* ```scala
Expand All @@ -28,7 +28,7 @@ object boolean:
* ```
* @syntax markdown
*/
type &&[+X <: Boolean, +Y <: Boolean] <: Boolean
type &&[X <: Boolean, Y <: Boolean] <: Boolean

/** Disjunction of two `Boolean` singleton types.
* ```scala
Expand All @@ -37,4 +37,4 @@ object boolean:
* ```
* @syntax markdown
*/
type ||[+X <: Boolean, +Y <: Boolean] <: Boolean
type ||[X <: Boolean, Y <: Boolean] <: Boolean
32 changes: 16 additions & 16 deletions library/src/scala/compiletime/ops/double.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ object double:
* ```
* @syntax markdown
*/
type +[+X <: Double, +Y <: Double] <: Double
type +[X <: Double, Y <: Double] <: Double

/** Subtraction of two `Double` singleton types.
* ```scala
* val sub: 4.0 - 2.0 = 2.0
* ```
* @syntax markdown
*/
type -[+X <: Double, +Y <: Double] <: Double
type -[X <: Double, Y <: Double] <: Double

/** Multiplication of two `Double` singleton types.
* ```scala
* val mul: 4.0 * 2.0 = 8.0
* ```
* @syntax markdown
*/
type *[+X <: Double, +Y <: Double] <: Double
type *[X <: Double, Y <: Double] <: Double

/** Integer division of two `Double` singleton types.
* ```scala
* val div: 5.0 / 2.0 = 2.5
* ```
* @syntax markdown
*/
type /[+X <: Double, +Y <: Double] <: Double
type /[X <: Double, Y <: Double] <: Double

/** Remainder of the division of `X` by `Y`.
* ```scala
* val mod: 5.0 % 2.0 = 1.0
* ```
* @syntax markdown
*/
type %[+X <: Double, +Y <: Double] <: Double
type %[X <: Double, Y <: Double] <: Double

/** Less-than comparison of two `Double` singleton types.
* ```scala
Expand All @@ -49,7 +49,7 @@ object double:
* ```
* @syntax markdown
*/
type <[+X <: Double, +Y <: Double] <: Boolean
type <[X <: Double, Y <: Double] <: Boolean

/** Greater-than comparison of two `Double` singleton types.
* ```scala
Expand All @@ -58,7 +58,7 @@ object double:
* ```
* @syntax markdown
*/
type >[+X <: Double, +Y <: Double] <: Boolean
type >[X <: Double, Y <: Double] <: Boolean

/** Greater-or-equal comparison of two `Double` singleton types.
* ```scala
Expand All @@ -67,7 +67,7 @@ object double:
* ```
* @syntax markdown
*/
type >=[+X <: Double, +Y <: Double] <: Boolean
type >=[X <: Double, Y <: Double] <: Boolean

/** Less-or-equal comparison of two `Double` singleton types.
* ```scala
Expand All @@ -76,15 +76,15 @@ object double:
* ```
* @syntax markdown
*/
type <=[+X <: Double, +Y <: Double] <: Boolean
type <=[X <: Double, Y <: Double] <: Boolean

/** Absolute value of an `Double` singleton type.
* ```scala
* val abs: Abs[-1.0] = 1.0
* ```
* @syntax markdown
*/
type Abs[+X <: Double] <: Double
type Abs[X <: Double] <: Double

/** Negation of an `Double` singleton type.
* ```scala
Expand All @@ -93,44 +93,44 @@ object double:
* ```
* @syntax markdown
*/
type Negate[+X <: Double] <: Double
type Negate[X <: Double] <: Double

/** Minimum of two `Double` singleton types.
* ```scala
* val min: Min[-1.0, 1.0] = -1.0
* ```
* @syntax markdown
*/
type Min[+X <: Double, +Y <: Double] <: Double
type Min[X <: Double, Y <: Double] <: Double

/** Maximum of two `Double` singleton types.
* ```scala
* val max: Max[-1.0, 1.0] = 1.0
* ```
* @syntax markdown
*/
type Max[+X <: Double, +Y <: Double] <: Double
type Max[X <: Double, Y <: Double] <: Double

/** Int conversion of a `Double` singleton type.
* ```scala
* val x: ToInt[1.0] = 1
* ```
* @syntax markdown
*/
type ToInt[+X <: Double] <: Int
type ToInt[X <: Double] <: Int

/** Long conversion of a `Double` singleton type.
* ```scala
* val x: ToLong[1.0] = 1L
* ```
* @syntax markdown
*/
type ToLong[+X <: Double] <: Long
type ToLong[X <: Double] <: Long

/** Float conversion of a `Double` singleton type.
* ```scala
* val x: ToFloat[1.0] = 1.0f
* ```
* @syntax markdown
*/
type ToFloat[+X <: Double] <: Float
type ToFloat[X <: Double] <: Float
32 changes: 16 additions & 16 deletions library/src/scala/compiletime/ops/float.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ object float:
* ```
* @syntax markdown
*/
type +[+X <: Float, +Y <: Float] <: Float
type +[X <: Float, Y <: Float] <: Float

/** Subtraction of two `Float` singleton types.
* ```scala
* val sub: 4.0f - 2.0f = 2.0f
* ```
* @syntax markdown
*/
type -[+X <: Float, +Y <: Float] <: Float
type -[X <: Float, Y <: Float] <: Float

/** Multiplication of two `Float` singleton types.
* ```scala
* val mul: 4.0f * 2.0f = 8.0f
* ```
* @syntax markdown
*/
type *[+X <: Float, +Y <: Float] <: Float
type *[X <: Float, Y <: Float] <: Float

/** Integer division of two `Float` singleton types.
* ```scala
* val div: 5.0f / 2.0f = 2.5f
* ```
* @syntax markdown
*/
type /[+X <: Float, +Y <: Float] <: Float
type /[X <: Float, Y <: Float] <: Float

/** Remainder of the division of `X` by `Y`.
* ```scala
* val mod: 5.0f % 2.0f = 1.0f
* ```
* @syntax markdown
*/
type %[+X <: Float, +Y <: Float] <: Float
type %[X <: Float, Y <: Float] <: Float

/** Less-than comparison of two `Float` singleton types.
* ```scala
Expand All @@ -49,7 +49,7 @@ object float:
* ```
* @syntax markdown
*/
type <[+X <: Float, +Y <: Float] <: Boolean
type <[X <: Float, Y <: Float] <: Boolean

/** Greater-than comparison of two `Float` singleton types.
* ```scala
Expand All @@ -58,7 +58,7 @@ object float:
* ```
* @syntax markdown
*/
type >[+X <: Float, +Y <: Float] <: Boolean
type >[X <: Float, Y <: Float] <: Boolean

/** Greater-or-equal comparison of two `Float` singleton types.
* ```scala
Expand All @@ -67,7 +67,7 @@ object float:
* ```
* @syntax markdown
*/
type >=[+X <: Float, +Y <: Float] <: Boolean
type >=[X <: Float, Y <: Float] <: Boolean

/** Less-or-equal comparison of two `Float` singleton types.
* ```scala
Expand All @@ -76,15 +76,15 @@ object float:
* ```
* @syntax markdown
*/
type <=[+X <: Float, +Y <: Float] <: Boolean
type <=[X <: Float, Y <: Float] <: Boolean

/** Absolute value of an `Float` singleton type.
* ```scala
* val abs: Abs[-1.0f] = 1.0f
* ```
* @syntax markdown
*/
type Abs[+X <: Float] <: Float
type Abs[X <: Float] <: Float

/** Negation of an `Float` singleton type.
* ```scala
Expand All @@ -93,44 +93,44 @@ object float:
* ```
* @syntax markdown
*/
type Negate[+X <: Float] <: Float
type Negate[X <: Float] <: Float

/** Minimum of two `Float` singleton types.
* ```scala
* val min: Min[-1.0f, 1.0f] = -1.0f
* ```
* @syntax markdown
*/
type Min[+X <: Float, +Y <: Float] <: Float
type Min[X <: Float, Y <: Float] <: Float

/** Maximum of two `Float` singleton types.
* ```scala
* val max: Max[-1.0f, 1.0f] = 1.0f
* ```
* @syntax markdown
*/
type Max[+X <: Float, +Y <: Float] <: Float
type Max[X <: Float, Y <: Float] <: Float

/** Int conversion of a `Float` singleton type.
* ```scala
* val x: ToInt[1.0f] = 1
* ```
* @syntax markdown
*/
type ToInt[+X <: Float] <: Int
type ToInt[X <: Float] <: Int

/** Long conversion of a `Float` singleton type.
* ```scala
* val x: ToLong[1.0f] = 1L
* ```
* @syntax markdown
*/
type ToLong[+X <: Float] <: Long
type ToLong[X <: Float] <: Long

/** Double conversion of a `Float` singleton type.
* ```scala
* val x: ToDouble[1.0f] = 1.0
* ```
* @syntax markdown
*/
type ToDouble[+X <: Float] <: Double
type ToDouble[X <: Float] <: Double
Loading

0 comments on commit 12a10f2

Please sign in to comment.