-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #940 from djspiewak/feature/translift-expression
More flexible TransLift
- Loading branch information
Showing
8 changed files
with
97 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cats | ||
|
||
/** | ||
* The "Unit typeclass". The only instance of `Trivial` is given by | ||
* `Trivial.manifest`, and this instance is guaranteed to be in the | ||
* implicit scope. Several convenience type aliases are provided in | ||
* companion object, covering a few common use cases and avoiding the | ||
* need for unnecessary lambdas (e.g. if you want a trivial typeclass | ||
* instance for a type constructor, you should use `Trivial.PH1`). | ||
*/ | ||
sealed trait Trivial | ||
|
||
object Trivial { | ||
type P1[A] = Trivial | ||
type PH1[F[_]] = Trivial | ||
type P1H1[F[_], A] = Trivial | ||
type P2[A, B] = Trivial | ||
type P2H1[F[_], A, B] = Trivial | ||
type P3[A, B, C] = Trivial | ||
type P3H1[F[_], A, B, C] = Trivial | ||
|
||
implicit val manifest: Trivial = new Trivial {} | ||
} |
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