Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Added -Zexplicit-implicit-type-ascriptions #68

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9d5098f
Add support for literal Byte and Short values.
non May 29, 2014
6302465
Add flag to disable withFilter pattern desugaring
puffnfresh Sep 4, 2014
062e56c
Warn on non-exhaustive for-comprehension patterns
puffnfresh Sep 4, 2014
aceb216
Add a test for -Zirrefutable-generator-patterns
puffnfresh Sep 4, 2014
d7be78d
List Typelevel options when -Z flag is given
puffnfresh Sep 4, 2014
9afc167
Merge pull request #12 from puffnfresh/feature/short-byte-literals
puffnfresh Sep 5, 2014
6dc8a6a
Allow primes at the end of identifiers.
milessabin Jun 3, 2014
e89ac28
Merge pull request #29 from milessabin/feature/prime-identifiers
non Sep 6, 2014
7ac3809
Filter bincompat of ZirrefutableGeneratorPatterns
puffnfresh Sep 24, 2014
38e2107
Automatically enable color REPL if JLine says so
puffnfresh Sep 24, 2014
dbc069f
Merge branch '2.11.x' into 2.11.x-typelevel
puffnfresh Sep 24, 2014
5161c11
Merge branch '2.11.x-typelevel' into feature/irrefutable-generator-pa…
puffnfresh Sep 24, 2014
379af13
Merge pull request #63 from puffnfresh/feature/color-repl-auto
non Sep 24, 2014
d76ccf3
Merge pull request #1 from puffnfresh/feature/irrefutable-generator-p…
non Sep 24, 2014
4d4f703
Add an @implicitAmbiguous annotation
puffnfresh Sep 7, 2014
9c3a93e
Add a scala-typelevel project
puffnfresh Sep 26, 2014
503ae37
Merge pull request #32 from puffnfresh/feature/implicit-ambiguous-ann…
non Sep 26, 2014
754b8d4
Update README to be specific to Typelevel
puffnfresh Sep 8, 2014
2dae00e
README build status should be master build, not PR
puffnfresh Sep 27, 2014
d2af9e1
Added -Zexplicit-implicit-type-ascriptions
propensive Sep 29, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 40 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,40 @@
This is the repository for the [Scala Programming Language](http://www.scala-lang.org).

- [Report an issue](https://issues.scala-lang.org);
- [Read about the development of the compiler and the standard library](http://docs.scala-lang.org/scala/);
- [Check our Jenkins status](https://scala-webapps.epfl.ch/jenkins/);
- [Download the latest nightly](https://scala-webapps.epfl.ch/jenkins/job/scala-nightly-main-master/ws/dists/latest/*zip*/latest.zip);
- ... and contribute right here! Please, first read our [policy](http://docs.scala-lang.org/scala/pull-request-policy.html), our [development guidelines](CONTRIBUTING.md),
and [sign the contributor's license agreement](http://typesafe.com/contribute/cla/scala).
# Typelevel Scala

[![Build Status](http://typelevel-ci.orexio.org/job/typelevel-scala-master/badge/icon)](http://typelevel-ci.orexio.org/job/typelevel-scala-master/) [![Stories in Ready](https://badge.waffle.io/typelevel/scala.svg?label=ready&title=Ready)](http://waffle.io/typelevel/scala)

This is the repository for the [Typelevel fork](http://typelevel.org/blog/2014/09/02/typelevel-scala.html) of the Scala compiler.

- [Report an issue](https://github.com/typelevel/scala/issues);
- ... and contribute right here! Please, first read our [development guidelines](CONTRIBUTING.md),

## Requirements

The Typelevel fork is conservative, so that it can present the most
simple migration path possible. This means:

1. Any project *source* that compiles and runs under `scalac` should compile and run under `tlc` with the same set of flags. Two differences are allowed: warnings issued, and classpath (e.g. `tlc` may require some classpath entries that `scalac` does not, or vice versa)
2. Sources that compile under both `scalac` and `tlc` with the same flags should have the same semantics.
3. Any project *binaries* produced by `tlc` should load cleanly from a `scalac` project and should be callable *without* FFI. In other words, `tlc` should produce *Scala* APIs. The exact bytecode metadata may be distinct, so long as it is compatible.

Incompatible changes will be accepted, but only when under an
additional compiler flag prefixed with `-Z` so that users can opt-in
to the changed behaviour.

## Publishing Locally

We do not currently have a release but you can build and publish a
version locally:

```sh
ant publish-local-opt -Dmaven.version.suffix="-typelevel"
```

Update your `build.sbt` with:

```scala
scalaVersion := "2.11.3-typelevel"

libraryDependencies += "org.scala-lang" % "scala-typelevel" % scalaVersion.value

resolvers += Resolver.mavenLocal
```
8 changes: 8 additions & 0 deletions bincompat-forward.whitelist.conf
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,14 @@ filter {
{
matchName="scala.collection.immutable.Stream.scala$collection$immutable$Stream$$loop$2"
problemName=MissingMethodProblem
},
{
matchName="scala.reflect.runtime.Settings.ZirrefutableGeneratorPatterns"
problemName=MissingMethodProblem
},
{
matchName="scala.reflect.runtime.Settings.ZexplicitImplicitTypeAscriptions"
problemName=MissingMethodProblem
}
]
}
1 change: 1 addition & 0 deletions build-ant-macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@

<sequential>
<deploy-one name="scala-library" local="@{local}" signed="@{signed}"/>
<deploy-one name="scala-typelevel" local="@{local}" signed="@{signed}"/>
<deploy-one name="scala-reflect" local="@{local}" signed="@{signed}"/>
<deploy-one name="scala-compiler" local="@{local}" signed="@{signed}"/>

Expand Down
50 changes: 46 additions & 4 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ TODO:
<path refid="external-modules.deps.classpath"/>
<rsel:not><rsel:or>
<rsel:name name="scala-library*.jar"/>
<rsel:name name="scala-typelevel*.jar"/>
<rsel:name name="scala-reflect*.jar"/>
<rsel:name name="scala-compiler*.jar"/>
</rsel:or></rsel:not>
Expand Down Expand Up @@ -650,7 +651,7 @@ TODO:
<property name="partest-javaagent.description" value="Scala Compiler Testing Tool (compiler-specific java agent)"/>

<!-- projects without project-specific options: asm, forkjoin, manual, bin, repl -->
<for list="actors,compiler,interactive,scaladoc,library,parser-combinators,partest,partest-extras,partest-javaagent,reflect,scalap,swing,xml,continuations-plugin,continuations-library" param="project">
<for list="actors,compiler,interactive,scaladoc,library,typelevel,parser-combinators,partest,partest-extras,partest-javaagent,reflect,scalap,swing,xml,continuations-plugin,continuations-library" param="project">
<sequential>
<!-- description is mandatory -->
<init-project-prop project="@{project}" name="package" default=""/> <!-- used by mvn-package, copy-bundle, make-bundle -->
Expand Down Expand Up @@ -732,6 +733,11 @@ TODO:
<path refid="aux.libs"/>
</path>

<path id="quick.typelevel.build.path">
<path refid="quick.library.build.path"/>
<pathelement location="${build-quick.dir}/classes/typelevel"/>
</path>

<path id="quick.actors.build.path">
<path refid="quick.library.build.path"/>
<pathelement location="${build-quick.dir}/classes/actors"/>
Expand Down Expand Up @@ -786,6 +792,7 @@ TODO:

<path id="quick.bin.tool.path">
<path refid="quick.repl.build.path"/>
<path refid="quick.typelevel.build.path"/>
<path refid="quick.actors.build.path"/>
<pathelement location="${build-quick.dir}/classes/scalap"/>
<pathelement location="${build-quick.dir}/classes/scaladoc"/>
Expand All @@ -795,6 +802,7 @@ TODO:
<!-- PACK -->
<path id="pack.compiler.path">
<pathelement location="${library.jar}"/>
<pathelement location="${typelevel.jar}"/>
<pathelement location="${reflect.jar}"/>
<pathelement location="${compiler.jar}"/>
<pathelement location="${ant.jar}"/>
Expand All @@ -804,6 +812,7 @@ TODO:

<path id="pack.bin.tool.path">
<pathelement location="${library.jar}"/>
<pathelement location="${typelevel.jar}"/>
<pathelement location="${xml.jar}"/>
<pathelement location="${parser-combinators.jar}"/>
<pathelement location="${actors.jar}"/>
Expand All @@ -820,6 +829,10 @@ TODO:
<fileset dir="${forkjoin-classes}"/>
</path>

<path id="pack.typelevel.files">
<fileset dir="${build-quick.dir}/classes/typelevel"/>
</path>

<path id="pack.actors.files">
<fileset dir="${build-quick.dir}/classes/actors"/>
</path>
Expand Down Expand Up @@ -866,6 +879,7 @@ TODO:

<!-- DOCS -->
<path id="docs.library.build.path"> <path refid="quick.library.build.path"/> </path>
<path id="docs.typelevel.build.path"> <path refid="quick.typelevel.build.path"/> </path>
<path id="docs.reflect.build.path"> <path refid="quick.reflect.build.path"/> </path>
<path id="docs.compiler.build.path"> <path refid="quick.compiler.build.path"/> </path>
<path id="docs.scaladoc.build.path"> <path refid="quick.scaladoc.build.path"/> </path>
Expand All @@ -877,6 +891,7 @@ TODO:
<path id="scaladoc.classpath">
<path refid="external-modules-nocore"/>
<pathelement location="${library.jar}"/>
<pathelement location="${typelevel.jar}"/>
<pathelement location="${reflect.jar}"/>
<pathelement location="${compiler.jar}"/>

Expand All @@ -892,6 +907,7 @@ TODO:
<path id="manual.build.path">
<path refid="external-modules-nocore"/> <!-- xml -->
<pathelement location="${library.jar}"/>
<pathelement location="${typelevel.jar}"/>
<pathelement location="${build.dir}/manmaker/classes"/>
<path refid="aux.libs"/> <!-- for ant -->
</path>
Expand All @@ -917,6 +933,7 @@ TODO:
</path>
<path id="partest.compilation.path.core">
<pathelement location="${library.jar}"/>
<pathelement location="${typelevel.jar}"/>
<pathelement location="${reflect.jar}"/>
<pathelement location="${compiler.jar}"/>
</path>
Expand All @@ -940,6 +957,7 @@ TODO:
<path refid="partest.classpath"/>
<rsel:not><rsel:or>
<rsel:name name="scala-library*.jar"/>
<rsel:name name="scala-typelevel*.jar"/>
</rsel:or></rsel:not>
</restrict>
<pathelement location="${scala-xml}"/>
Expand All @@ -950,6 +968,7 @@ TODO:
<path refid="scalacheck.classpath"/>
<rsel:not><rsel:or>
<rsel:name name="scala-library*.jar"/>
<rsel:name name="scala-typelevel*.jar"/>
<rsel:name name="scala-compiler*.jar"/>
<rsel:name name="scala-reflect*.jar"/>
<rsel:name name="scala-actors*.jar"/>
Expand Down Expand Up @@ -977,6 +996,7 @@ TODO:
<path id="test.osgi.compiler.build.path">
<pathelement location="${test.osgi.classes}"/>
<pathelement location="${build-osgi.dir}/org.scala-lang.scala-library.jar"/>
<pathelement location="${build-osgi.dir}/org.scala-lang.scala-typelevel.jar"/>
<pathelement location="${build-osgi.dir}/org.scala-lang.scala-reflect.jar"/>
<pathelement location="${build-osgi.dir}/org.scala-lang.scala-compiler.jar"/>
<pathelement location="${build-osgi.dir}/org.scala-lang.scala-actors.jar"/>
Expand Down Expand Up @@ -1091,6 +1111,9 @@ TODO:
<target name="quick.lib" depends="quick.start">
<staged-build with="locker" stage="quick" project="library" srcpath="${src.dir}/library" includes="lib.rootdoc.includes"/></target>

<target name="quick.typelevel" depends="quick.lib">
<staged-build with="locker" stage="quick" project="typelevel"/> </target>

<target name="quick.reflect" depends="quick.lib">
<staged-build with="locker" stage="quick" project="reflect"/> </target>

Expand Down Expand Up @@ -1129,6 +1152,8 @@ TODO:
============================================================================ -->
<target name="pack.lib" depends="quick.lib, forkjoin.done"> <staged-pack project="library"/></target>

<target name="pack.typelevel" depends="quick.typelevel"> <staged-pack project="typelevel"/></target>

<target name="pack.reflect" depends="quick.reflect"> <staged-pack project="reflect"/> </target>

<!-- TODO modularize compiler. Remove other quick targets when they become modules. -->
Expand All @@ -1148,7 +1173,7 @@ TODO:
<copy file="${basedir}/META-INF/MANIFEST.MF" toDir="${build-pack.dir}/META-INF"/>
<manifest file="${build-pack.dir}/META-INF/MANIFEST.MF" mode="update">
<attribute name="Bundle-Version" value="${version.number}"/>
<attribute name="Class-Path" value="scala-reflect.jar scala-library.jar"/>
<attribute name="Class-Path" value="scala-reflect.jar scala-library.jar scala-typelevel.jar"/>
</manifest>
</pre>
<!-- JSR-223 support introduced in 2.11 -->
Expand All @@ -1167,7 +1192,7 @@ TODO:

<target name="pack.scalap" depends="quick.scalap"> <staged-pack project="scalap"/> </target>

<target name="pack.core" depends="pack.reflect, pack.comp, pack.lib"/>
<target name="pack.core" depends="pack.reflect, pack.comp, pack.lib, pack.typelevel"/>

<!-- TODO modularize compiler: pack.scaladoc, pack.interactive, -->
<target name="pack.modules" depends="pack.actors, pack.scalap">
Expand Down Expand Up @@ -1233,6 +1258,7 @@ TODO:
</fileset>
<filelist>
<file name="${library.jar}"/>
<file name="${typelevel.jar}"/>
<file name="${reflect.jar}"/>
<file name="${compiler.jar}"/>
</filelist>
Expand All @@ -1245,6 +1271,10 @@ TODO:
<fileset dir="${src.dir}/library"/>
</make-bundle>

<make-bundle project="typelevel">
<fileset dir="${src.dir}/typelevel"/>
</make-bundle>

<make-bundle project="reflect">
<fileset dir="${src.dir}/reflect"/>
</make-bundle>
Expand Down Expand Up @@ -1574,6 +1604,12 @@ TODO:
</staged-docs>
</target>

<target name="docs.typelevel" depends="docs.start" unless="docs.skip">
<staged-docs project="typelevel">
<include name="**/*.scala"/>
</staged-docs>
</target>

<target name="docs.reflect" depends="docs.start" unless="docs.skip">
<staged-docs project="reflect">
<include name="**/*.scala"/>
Expand Down Expand Up @@ -1617,7 +1653,7 @@ TODO:
</staged-docs>
</target>

<target name="docs.core" depends="docs.lib, docs.reflect, docs.comp" unless="docs.skip"/>
<target name="docs.core" depends="docs.lib, docs.typelevel, docs.reflect, docs.comp" unless="docs.skip"/>
<!-- TODO modularize compiler: docs.scaladoc, docs.interactive, -->
<target name="docs.done" depends="docs.core, docs.actors, docs.scalap" unless="docs.skip"/>

Expand Down Expand Up @@ -1673,6 +1709,7 @@ MAIN DISTRIBUTION PACKAGING
<mkdir dir="${dist.maven}"/>

<mvn-package project="library"/>
<mvn-package project="typelevel"/>
<mvn-package project="reflect"/>
<mvn-package project="compiler"/>

Expand Down Expand Up @@ -1737,30 +1774,35 @@ MAIN DISTRIBUTION PACKAGING
<target name="publish" depends="pack-maven.done, init.maven" description="Publishes unsigned artifacts to the maven repo.">
<deploy />
<deploy-pom name="scala-library-all"/>
<deploy-jar name="scala-typelevel"/>
<deploy-jar name="scala-dist"/>
</target>

<target name="publish.local" depends="pack-maven.done, init.maven" description="Publishes unsigned artifacts to the local maven repo.">
<deploy local="true"/>
<deploy-pom name="scala-library-all" local="true"/>
<deploy-jar name="scala-typelevel" local="true"/>
<deploy-jar name="scala-dist" local="true"/>
</target>

<target name="publish.signed" depends="pack-maven.done, init.maven" description="Publishes signed artifacts to the remote maven repo.">
<deploy signed="true"/>
<deploy-pom name="scala-library-all" signed="true"/>
<deploy-jar name="scala-typelevel" signed="true"/>
<deploy-jar name="scala-dist" signed="true"/>
</target>

<target name="publish-core" depends="pack-maven.core, init.maven">
<deploy-one name="scala-compiler" />
<deploy-one name="scala-library" />
<deploy-one name="scala-typelevel" />
<deploy-one name="scala-reflect" />
</target>

<target name="publish-core-local" depends="pack-maven.core, init.maven">
<deploy-one name="scala-compiler" local="true"/>
<deploy-one name="scala-library" local="true"/>
<deploy-one name="scala-typelevel" local="true"/>
<deploy-one name="scala-reflect" local="true"/>
</target>

Expand Down
7 changes: 7 additions & 0 deletions src/build/bnd/scala-typelevel.bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bundle-Name: Scala Typelevel Library
Bundle-SymbolicName: org.scala-lang.scala-typelevel
ver: @VERSION@
Bundle-Version: ${ver}
Export-Package: *;version=${ver}
Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",*
Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7
5 changes: 5 additions & 0 deletions src/build/maven/scala-dist-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
<artifactId>scala-library-all</artifactId>
<version>@VERSION@</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-typelevel</artifactId>
<version>@VERSION@</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
Expand Down
47 changes: 47 additions & 0 deletions src/build/maven/scala-typelevel-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-typelevel</artifactId>
<packaging>jar</packaging>
<version>@VERSION@</version>
<name>Scala Typelevel Library</name>
<description>Typelevel Library for the Typelevel Scala Compiler</description>
<url>http://typelevel.org/</url>
<inceptionYear>2014</inceptionYear>
<organization>
<name>Typelevel</name>
<url>http://typelevel.org/</url>
</organization>
<licenses>
<license>
<name>BSD 3-Clause</name>
<url>http://www.scala-lang.org/license.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:git://github.com/typelevel/scala.git</connection>
<url>https://github.com/typelevel/scala.git</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/typelevel/scala/issues/</url>
</issueManagement>
<properties>
<info.apiURL>http://www.scala-lang.org/api/@VERSION@/</info.apiURL>
</properties>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>@VERSION@</version>
</dependency>
</dependencies>
<developers>
<developer>
<id>typelevel</id>
<name>Typelevel</name>
</developer>
</developers>
</project>
2 changes: 1 addition & 1 deletion src/compiler/scala/tools/cmd/Instance.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ trait Instance extends Spec {
def residualArgs = parsed.residualArgs // only args which were not options or args to options

type OptionMagic = Opt.Instance
protected implicit def optionMagicAdditions(name: String) = new Opt.Instance(programInfo, parsed, name)
protected implicit def optionMagicAdditions(name: String): Opt.Instance = new Opt.Instance(programInfo, parsed, name)
}
2 changes: 1 addition & 1 deletion src/compiler/scala/tools/cmd/Reference.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ trait Reference extends Spec {
final def apply(args: String*): ThisCommandLine = creator(propertyArgs ++ args flatMap expandArg)

type OptionMagic = Opt.Reference
protected implicit def optionMagicAdditions(name: String) = new Opt.Reference(programInfo, options, name)
protected implicit def optionMagicAdditions(name: String): Opt.Reference = new Opt.Reference(programInfo, options, name)
}

object Reference {
Expand Down
Loading