-
-
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.
Add
Pure
instance for Future (#2510)
- Loading branch information
1 parent
263587a
commit 1d5a51a
Showing
2 changed files
with
19 additions
and
1 deletion.
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,17 @@ | ||
package alleycats | ||
package std | ||
|
||
import export._ | ||
|
||
import scala.concurrent.Future | ||
|
||
@reexports(FutureInstances) | ||
object future | ||
|
||
object FutureInstances { | ||
@export(Orphan) | ||
implicit val exportFuturePure: Pure[Future] = | ||
new Pure[Future] { | ||
override def pure[A](a: A): Future[A] = Future.successful(a) | ||
} | ||
} |