Skip to content

Commit fb3ba4f

Browse files
committed
Use java 7 and run scala tests using retro lambda
1 parent 0a9c386 commit fb3ba4f

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

core/src/main/java/fj/Equal.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public Boolean f(final A a1) {
8080
* @return A new equal.
8181
*/
8282
public <B> Equal<B> comap(final F<B, A> f) {
83-
return equal(F1Functions.o(F1Functions.o(F1Functions.andThen(f), this.f), f));
83+
return equal(F1Functions.o(F1Functions.o(F1Functions.<B, A, Boolean>andThen(f), this.f), f));
8484
}
8585

8686
/**

core/src/main/java/fj/Ord.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public Boolean f(final A a1, final A a2) {
7878
* @return A new ord.
7979
*/
8080
public <B> Ord<B> comap(final F<B, A> f) {
81-
return ord(F1Functions.o(F1Functions.o(F1Functions.andThen(f), this.f), f));
81+
return ord(F1Functions.o(F1Functions.o(F1Functions.<B, A, Ordering>andThen(f), this.f), f));
8282
}
8383

8484
/**

demo/build.gradle

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11

2+
3+
buildscript {
4+
repositories {
5+
mavenCentral()
6+
}
7+
8+
dependencies {
9+
classpath 'me.tatarka:gradle-retrolambda:1.3.1'
10+
}
11+
}
12+
213
apply plugin: 'java'
314
apply plugin: 'application'
15+
apply plugin: 'retrolambda'
416

517
defaultTasks 'build'
618

@@ -15,6 +27,13 @@ repositories {
1527
mavenCentral()
1628
}
1729

30+
31+
retrolambda {
32+
jdk System.getenv("JAVA8_HOME")
33+
oldJdk System.getenv("JAVA7_HOME")
34+
javaVersion JavaVersion.VERSION_1_7
35+
}
36+
1837
dependencies {
1938
compile 'org.slf4j:slf4j-api:1.7.5'
2039
compile project(":core")

settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
//include 'core', 'demo', 'tests'
3-
include 'core', 'demo'
2+
include 'core', 'demo', 'tests'
3+
//include 'core', 'demo'

tests/src/test/scala/fj/data/CheckIteratee.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Unit.unit
77
import List.{list, nil}
88
import Option.{some, none}
99
import fj.Function._
10+
import fj.F1Functions
1011
import fj.data.Iteratee._
1112

1213
import org.scalacheck.Prop._
@@ -50,7 +51,7 @@ object CheckIteratee extends Properties("Iteratee") {
5051
var tail = l
5152
while(!isDone(i) && !tail.isEmpty) {
5253
val input = Input.el(tail.head)
53-
val cont: F[F[Input[E], IterV[E, A]], P1[IterV[E, A]]] = Function.apply(input).`lazy`()
54+
val cont: F[F[Input[E], IterV[E, A]], P1[IterV[E, A]]] = F1Functions.`lazy`(Function.apply(input))
5455
i = i.fold(done, cont)._1
5556
tail = tail.tail
5657
}

0 commit comments

Comments
 (0)