-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug involving wildcards + fix tests for module path
- Loading branch information
Grégoire Neuville
committed
Oct 29, 2019
1 parent
df21885
commit e45d172
Showing
11 changed files
with
171 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
module derive4j.examples { | ||
requires derive4j.annotation; | ||
requires functionaljava; | ||
requires org.derive4j.hkt; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.derive4j.example; | ||
|
||
import org.derive4j.*; | ||
import org.derive4j.hkt.__; | ||
|
||
@Data(flavour = Flavour.FJ, value = @Derive(inClass = "_Exists", withVisibility = Visibility.Smart, make = { | ||
Make.constructors, Make.casesMatching, Make.caseOfMatching })) | ||
abstract class Exists<T> implements __<Exists.µ, T> { | ||
public enum µ { | ||
} | ||
|
||
interface Cases<R, T> { | ||
R Exists(ExistsImpl<?, T> exists); | ||
|
||
R Exists2(ExistsImpl2<T, ?, T> exists2); | ||
} | ||
|
||
abstract <R> R match(Cases<R, T> cases); | ||
|
||
static final class ExistsImpl<A, B> { | ||
final A a; | ||
final B b; | ||
|
||
ExistsImpl(A a, B b) { | ||
this.a = a; | ||
this.b = b; | ||
} | ||
} | ||
|
||
static final class ExistsImpl2<A, B, C> { | ||
final A a; | ||
final B b; | ||
final C c; | ||
|
||
ExistsImpl2(A a, B b, C c) { | ||
this.a = a; | ||
this.b = b; | ||
this.c = c; | ||
} | ||
} | ||
|
||
@ExportAsPublic | ||
static <T> Exists<T> now(T t) { | ||
return _Exists.Exists(new ExistsImpl<>(t, t)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.