Skip to content

Commit 4f295ae

Browse files
committed
Update for JDK6/7
This update allows the code to compile on JDK6 / JDK7. Signed-off-by: Gary Pamparà <gpampara@gmail.com>
1 parent c691170 commit 4f295ae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/src/main/java/fj/data/hlist/HPre.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ public static <N extends HNat<N>> HEq<HSucc<N>, HZero, HFalse> eq(final HSucc<N>
265265
*/
266266
public static <N extends HNat<N>, NN extends HNat<NN>, B extends HBool, E extends HEq<N, NN, B>>
267267
HEq<HSucc<N>, HSucc<NN>, B> eq(final HSucc<N> a, final HSucc<NN> b, final E e) {
268-
return new HEq<HSucc<N>, HSucc<NN>, B>(e.v);
268+
return new HEq<HSucc<N>, HSucc<NN>, B>(e.v());
269269
}
270270

271271
}
@@ -280,6 +280,10 @@ private HAdd(final C sum) {
280280
this.sum = sum;
281281
}
282282

283+
public C sum() {
284+
return this.sum;
285+
}
286+
283287
/**
284288
* The sum of zero and any other number is that number.
285289
*/
@@ -299,7 +303,7 @@ public static <N extends HNat<N>> HAdd<HSucc<N>, HZero, HSucc<N>> add(final HSuc
299303
*/
300304
public static <N extends HNat<N>, M extends HNat<M>, R extends HNat<R>, H extends HAdd<N, HSucc<M>, R>>
301305
HAdd<HSucc<N>, HSucc<M>, HSucc<R>> add(final HSucc<N> a, final HSucc<M> b, final H h) {
302-
return new HAdd<HSucc<N>, HSucc<M>, HSucc<R>>(HNat.hSucc(h.sum));
306+
return new HAdd<HSucc<N>, HSucc<M>, HSucc<R>>(HNat.hSucc(h.sum()));
303307
}
304308
}
305309

0 commit comments

Comments
 (0)