zio-interop-scalaz7x


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

dev.zio
ArtifactId

ArtifactId

zio-interop-scalaz7x_sjs0.6_2.13
Last Version

Last Version

7.2.27.0-RC9
Release Date

Release Date

Type

Type

jar
Description

Description

zio-interop-scalaz7x
zio-interop-scalaz7x
Project URL

Project URL

https://zio.dev
Project Organization

Project Organization

dev.zio
Source Code Management

Source Code Management

https://github.com/zio/interop-scalaz/

Download zio-interop-scalaz7x_sjs0.6_2.13

How to add to project

<!-- https://jarcasting.com/artifacts/dev.zio/zio-interop-scalaz7x_sjs0.6_2.13/ -->
<dependency>
    <groupId>dev.zio</groupId>
    <artifactId>zio-interop-scalaz7x_sjs0.6_2.13</artifactId>
    <version>7.2.27.0-RC9</version>
</dependency>
// https://jarcasting.com/artifacts/dev.zio/zio-interop-scalaz7x_sjs0.6_2.13/
implementation 'dev.zio:zio-interop-scalaz7x_sjs0.6_2.13:7.2.27.0-RC9'
// https://jarcasting.com/artifacts/dev.zio/zio-interop-scalaz7x_sjs0.6_2.13/
implementation ("dev.zio:zio-interop-scalaz7x_sjs0.6_2.13:7.2.27.0-RC9")
'dev.zio:zio-interop-scalaz7x_sjs0.6_2.13:jar:7.2.27.0-RC9'
<dependency org="dev.zio" name="zio-interop-scalaz7x_sjs0.6_2.13" rev="7.2.27.0-RC9">
  <artifact name="zio-interop-scalaz7x_sjs0.6_2.13" type="jar" />
</dependency>
@Grapes(
@Grab(group='dev.zio', module='zio-interop-scalaz7x_sjs0.6_2.13', version='7.2.27.0-RC9')
)
libraryDependencies += "dev.zio" % "zio-interop-scalaz7x_sjs0.6_2.13" % "7.2.27.0-RC9"
[dev.zio/zio-interop-scalaz7x_sjs0.6_2.13 "7.2.27.0-RC9"]

Dependencies

compile (4)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.13.0
org.scala-js : scalajs-library_2.13 jar 0.6.33
dev.zio : zio_sjs0.6_2.13 jar 1.0.0-RC18-2
org.scalaz : scalaz-core_sjs0.6_2.13 Optional jar [7.2,7.3)

provided (1)

Group / Artifact Type Version
com.github.ghik : silencer-lib_2.13 jar 1.4.2

test (4)

Group / Artifact Type Version
org.scala-js : scalajs-test-bridge_2.13 jar 0.6.33
dev.zio : zio-test_sjs0.6_2.13 jar 1.0.0-RC18-2
dev.zio : zio-test-sbt_sjs0.6_2.13 jar 1.0.0-RC18-2
io.github.cquiroz : scala-java-time_sjs0.6_2.13 jar 2.0.0

Project Modules

There are no modules declared in this project.

Interop Scalaz

CircleCI Releases Snapshots

This library provides instances for several Scalaz 7.2 typeclasses.

Example

import scalaz._, Scalaz._
import zio.interop.scalaz72._

type Database = IList[User]

def findUser(id: UserId): ZIO[Database, UserError, User] = ...
def findUsers(ids: IList[UserId]): ZIO[Database, UserError, IList[User]] = ids.traverse(findUser(_))

ZIO parallel Applicative instance

Due to Applicative and Monad coherence law ZIO's Applicative instance has to be implemented in terms of bind hence when composing multiple effects using Applicative they will be sequenced. To cope with that limitation ZIO tagged with Parallel has an Applicative instance which is not Monad and operates in parallel.

Example

import scalaz._, Scalaz._
import zio.interop.scalaz72._

case class Dashboard(details: UserDetails, history: TransactionHistory)

def getDetails(id: UserId): ZIO[Database, UserError, UserDetails] = ...
def getHistory(id: UserId): ZIO[Database, UserError, TransactionHistory] = ...

def buildDashboard(id: UserId): ZIO[Database, UserError, Dashboard] =
  Tag.unwrap(^(par(getDetails(id)), par(getHistory(id)))(Dashboard.apply))

def par[R, E, A](io: ZIO[R, E, A]): scalaz72.ParIO[R, E, A] = Tag(io)
dev.zio

ZIO

ZIO — Real World Functional Programming

Versions

Version
7.2.27.0-RC9
7.2.27.0-RC8
7.2.27.0-RC7
7.2.27.0-RC6
7.2.27.0-RC5
7.2.27.0-RC4