@@ -40,82 +40,19 @@ interoperability with the rest of the Scala ecosystem.
40
40
41
41
## Typelevel Scala releases
42
42
43
- Currently Typelevel Scala is available as a drop in replacement for Lightbend Scala 2.11.8 and 2.12.0 . As soon as
44
- Lightbend Scala 2.11.9 and 2.12.1 are published corresponding releases of Typelevel Scala will be published.
43
+ Currently Typelevel Scala is available as a drop in replacement for Lightbend Scala 2.11.8 and 2.12.1 . As soon
44
+ as Lightbend Scala 2.11.9 is published a corresponding release of Typelevel Scala will be published.
45
45
46
- ### Typelevel Scala 2.11.8
46
+ Full release notes are available,
47
47
48
- The Typelevel Scala additions to Lightbend Scala 2.11.8 can be found on the branch
49
- [ 2.11.8-bin-typelevel ] [ 2.11.8-bin-typelevel ] of this repository .
48
+ + Typelevel Scala [ 2.11.8] ( https://github.com/typelevel/scala/blob/typelevel-readme/notes/2.11.8.md ) .
49
+ + Typelevel Scala [ 2.12.1 ] ( https://github.com/typelevel/scala/blob/typelevel-readme/notes/2.12.1.md ) .
50
50
51
- Typelevel Scala 2.11.8 offers the following fixes and features over Lightbend Scala 2.11.8,
51
+ ## Older releases
52
52
53
- + Support for partial unification (ie. a fix for [ SI-2712] [ SI-2712 ] ) &mdash ; merged in Lightbend Scala 2.12.0-RC1 and
54
- 2.11.9
53
+ Full release notes are available,
55
54
56
- An improvement to type inference for type constructors, enabled by the ` -Ypartial-unification ` scalac option. This
57
- has many benefits for libraries, such as Cats and Scalaz, which make extensive use of higher-kinded types.
58
-
59
- Full details on the [ pull request] [ pr-2712 ] .
60
- + Support for literal types (aka SIP-23) &mdash ; proposed for Lightbend Scala 2.12.1.
61
-
62
- Implements [ literal types] [ SIP-23 ] . Enabled by ` -Yliteral-types ` .
63
-
64
- Literals can now appear in type position, designating the corresponding singleton type. A ` scala.ValueOf[T] ` type
65
- class and corresponding ` scala.Predef.valueOf[T] ` operator has been added yielding the unique value of types with a
66
- single inhabitant. Support for ` scala.Symbol ` literal types has been added.
67
- + A partial fix for SI-7046 &mdash ; proposed for Lightbend Scala 2.12.1 and merged in 2.11.9.
68
-
69
- The macro API call ` knownDirectSubclasses ` now yields the correct result in most cases and will report an error in
70
- cases where it is unable to yield the correct result.
71
-
72
- This is only a partial fix because subclasses defined in local scopes might be missed by ` knownDirectSubclasses ` . In
73
- mitigation it is very likely that a local subclass would represent an error in any scenario where
74
- ` knownDirectSubclasses ` might be used. An error will be reported in these cases.
75
-
76
- Full details on the [ pull request] [ pr-7046 ] .
77
- + A fix for SI-9760 &mdash ; merged in Lightbend Scala 2.12.0-RC1 and 2.11.9.
78
-
79
- Higher kinded type arguments are now refined by GADT pattern matching. Details can be found on [ the
80
- ticket] [ SI-9760 ] .
81
-
82
- ### Typelevel Scala 2.12.0
83
-
84
- The Typelevel Scala additions to Lightbend Scala 2.12.0 can be found on the branch
85
- [ 2.12.0-bin-typelevel] [ 2.12.0-bin-typelevel ] of this repository.
86
-
87
- Typelevel Scala 2.12.0 offers the following fixes and features over Lightbend Scala 2.12.0,
88
-
89
- + Support for literal types (aka SIP-23) &mdash ; proposed for Lightbend Scala 2.12.1.
90
-
91
- Implements [ literal types] [ SIP-23 ] . Enabled by ` -Yliteral-types ` .
92
-
93
- Literals can now appear in type position, designating the corresponding singleton type. A ` scala.ValueOf[T] ` type
94
- class and corresponding ` scala.Predef.valueOf[T] ` operator has been added yielding the unique value of types with a
95
- single inhabitant. Support for ` scala.Symbol ` literal types has been added.
96
- + A partial fix for SI-7046 &mdash ; proposed for Lightbend Scala 2.12.1.
97
-
98
- The macro API call ` knownDirectSubclasses ` now yields the correct result in most cases and will report an error in
99
- cases where it is unable to yield the correct result.
100
-
101
- This is only a partial fix because subclasses defined in local scopes might be missed by ` knownDirectSubclasses ` . In
102
- mitigation it is very likely that a local subclass would represent an error in any scenario where
103
- ` knownDirectSubclasses ` might be used. An error will be reported in these cases.
104
-
105
- Full details on the [ pull request] [ pr-7046 ] .
106
-
107
- The following have already been merged in Lightbend Scala 2.12.x and so are included here automatically,
108
-
109
- + Support for partial unification (ie. a fix for [ SI-2712] [ SI-2712 ] ) &mdash ; merged in Lightbend Scala 2.12.0-RC1.
110
-
111
- An improvement to type inference for type constructors, enabled by the ` -Ypartial-unification ` scalac option. This
112
- has many benefits for libraries, such as Cats and Scalaz, which make extensive use of higher-kinded types.
113
-
114
- Full details on the [ pull request] [ pr-2712 ] .
115
- + A fix for SI-9760 &mdash ; merged in Lightbend Scala 2.12.0-RC1.
116
-
117
- Higher kinded type arguments are now refined by GADT pattern matching. Details can be found on [ the
118
- ticket] [ SI-9760 ] .
55
+ + Typelevel Scala [ 2.12.0] ( https://github.com/typelevel/scala/blob/typelevel-readme/notes/2.12.0.md ) .
119
56
120
57
## Should I use Typelevel Scala? In production?
121
58
@@ -181,19 +118,17 @@ res7: Int = 23
181
118
[ coursier ] : https://github.com/alexarchambault/coursier
182
119
[ ammonite ] : https://github.com/lihaoyi/Ammonite
183
120
184
- ## How to use Typelevel Scala
121
+ ## How to use Typelevel Scala 2.12.1 with SBT
185
122
186
- There are just two requirements for using Typelevel Scala in your existing projects,
123
+ There are two requirements for using Typelevel Scala in your existing projects,
187
124
188
- + You must be using (or be able to switch to) a corresponding version of Lightbend Scala. Currently this is 2.11.8
189
- and 2.12.0.
190
- + You must be using (or be able to switch to) SBT 0.13.13 or later. Earlier versions of SBT don't have full
191
- support for using an alternative ` scalaOrganization ` .
125
+ + You must be using (or be able to switch to) Lightbend Scala 2.12.1.
126
+ + You must be using (or be able to switch to) SBT 0.13.13 or later. Earlier versions of SBT don't have full support
127
+ for using an alternative ` scalaOrganization ` .
192
128
193
- If you are using Lightbend Scala 2.11.8 or 2.12.0 and SBT 0.13.13 the following steps will build your project with
194
- Typelevel Scala,
129
+ If these conditions are met the following steps will build your project with Typelevel Scala,
195
130
196
- + Update your ` project/build.properties ` to require SBT 0.13.13,
131
+ + Ensure that your ` project/build.properties ` specifies SBT 0.13.13,
197
132
198
133
```
199
134
sbt.version=0.13.13
@@ -224,49 +159,14 @@ verify this from the SBT prompt,
224
159
>
225
160
```
226
161
227
- This will immediately provide you with the fixes for [ SI-7046] [ SI-7046 ] and [ SI-9760] [ SI-9760 ] . To additionally enable
228
- the the fix for [ SI-2712] and the implementation of [ SIP-23] you should add either or both of their enabling flags to
229
- ` scalacOptions ` (or ` local.sbt ` if that was the path you took earlier),
230
-
231
- ```
232
- scalacOptions += "-Ypartial-unification" // enable fix for SI-2712
233
- scalacOptions += "-Yliteral-types" // enable SIP-23 implementation
234
-
235
- ```
236
-
237
- Note that Typelevel Scala 2.11.8 replaces the [ si2712fix compiler plugin] [ si2712fix-plugin ] &mdash ; if you are using
162
+ Gote that Typelevel Scala 2.11.8 replaces the [ si2712fix compiler plugin] [ si2712fix-plugin ] &mdash ; if you are using
238
163
it you should remove it from your build before switching to Typelevel Scala.
239
164
240
- Also note that the two compiler flags above should be used in preference to ` -Xexperimental ` at present &mdash ; as
241
- well as enabling the above two features ` -Xexperimental ` also enables some other features which are not typically
242
- desirable.
165
+ ## How to use Typelevel Scala 2.12.1 with Maven
243
166
244
- You now can verify that these features have been enabled from the SBT console ,
167
+ If you are using maven with the ` scala-maven-plugin ` , set the ` <scalaOrganization> ` to ` org.typelevel ` ,
245
168
246
169
```
247
- > console
248
- [info] Compiling 3 Scala sources to /home/miles/projects/value-wrapper/target/scala-2.11/classes...
249
- [info] Starting scala interpreter...
250
- [info]
251
- Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_102).
252
- Type in expressions for evaluation. Or try :help.
253
-
254
- scala> val foo: "foo" = "foo" // Use of literal type "foo"
255
- foo: "foo" = foo
256
-
257
- scala> import scala.language.higherKinds
258
- import scala.language.higherKinds
259
-
260
- scala> def foo[F[_], A](fa: F[A]): String = fa.toString
261
- foo: [F[_], A](fa: F[A])String
262
-
263
- scala> foo((x: Int) => x*2) // Function1[Int, Int] unifies with F[_]
264
- res1: String = <function1>
265
- ```
266
-
267
- If you are using maven with the ` scala-maven-plugin ` , set the ` <scalaOrganization> ` to ` org.typelevel ` :
268
-
269
- ````
270
170
<plugin>
271
171
<groupId>net.alchim31.maven</groupId>
272
172
<artifactId>scala-maven-plugin</artifactId>
@@ -275,20 +175,20 @@ If you are using maven with the `scala-maven-plugin`, set the `<scalaOrganizatio
275
175
<scalaOrganization>org.typelevel</scalaOrganization>
276
176
</configuration>
277
177
</plugin>
278
- ````
178
+ ```
279
179
280
180
## Roadmap
281
181
282
182
The following are high priority issues for Typelevel projects on which progress is likely to be made in 2016,
283
183
284
- + Partial type application.
285
- + Multiple implicit parameter blocks.
286
- + Improved compile times for inductive implicits.
287
- + Improved control over implicit prioritization.
288
- + Improved error reporting for implicit resolution failures.
184
+ + Partial type application
185
+ + Multiple implicit parameter blocks
186
+ + ~~ Improved compile times for inductive implicits~~ & mdash ; ** Done **
187
+ + Improved control over implicit prioritization
188
+ + ~~ Improved error reporting for implicit resolution failures~~ & mdash ; ** Done **
289
189
+ GADT and singleton type bugfixes.
290
190
+ Literal syntax for Byte and Short types.
291
- + Support for alternative ` scala.Predef ` .
191
+ + ~~ Support for alternative ` scala.Predef ` ~~ & mdash ; ** Done **
292
192
293
193
In accordance with the policy for inclusion contributions on these issues will be made as pull requests against
294
194
Lightbend Scala in the first instance.
0 commit comments