eff_zio


License

License

MIT
GroupId

GroupId

com.github.takayahilton
ArtifactId

ArtifactId

eff-zio_2.12
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

eff_zio
eff_zio
Project URL

Project URL

https://github.com/takayahilton/eff-zio
Project Organization

Project Organization

com.github.takayahilton
Source Code Management

Source Code Management

https://github.com/takayahilton/eff-zio

Download eff-zio_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.takayahilton/eff-zio_2.12/ -->
<dependency>
    <groupId>com.github.takayahilton</groupId>
    <artifactId>eff-zio_2.12</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.takayahilton/eff-zio_2.12/
implementation 'com.github.takayahilton:eff-zio_2.12:1.0.0'
// https://jarcasting.com/artifacts/com.github.takayahilton/eff-zio_2.12/
implementation ("com.github.takayahilton:eff-zio_2.12:1.0.0")
'com.github.takayahilton:eff-zio_2.12:jar:1.0.0'
<dependency org="com.github.takayahilton" name="eff-zio_2.12" rev="1.0.0">
  <artifact name="eff-zio_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.takayahilton', module='eff-zio_2.12', version='1.0.0')
)
libraryDependencies += "com.github.takayahilton" % "eff-zio_2.12" % "1.0.0"
[com.github.takayahilton/eff-zio_2.12 "1.0.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.10
dev.zio : zio_2.12 jar 1.0.0-RC13
org.atnos : eff_2.12 jar 5.5.2

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_2.12 jar 3.0.8

Project Modules

There are no modules declared in this project.

eff-zio

Build Status Maven Central

This library is eff extension for ZIO effects.

Installation

// check maven badge above for latest version
libraryDependencies += "com.github.takayahilton" %% "eff-zio" % "0.1.2"

// to write types like Reader[String, ?]
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.10.0")

// to get types like Reader[String, ?] (with more than one type parameter) correctly inferred for scala 2.11.11+ and 2.12.x
scalacOptions += "-Ypartial-unification"

// to get types like Reader[String, ?] (with more than one type parameter) correctly inferred for scala 2.11.9 and before
// you can use the [Typelevel Scala compiler](http://typelevel.org/scala)
scalaOrganization in ThisBuild := "org.typelevel"

Usage

import com.github.takayahilton.eff.zio._
import org.atnos.eff._
import org.atnos.eff.all._
import org.atnos.eff.syntax.all._
import zio.{DefaultRuntime, UIO}

object Runtime extends DefaultRuntime

type S1 = Fx.fx2[UIO, Option]

def action[R: _uio: _option]: Eff[R, Int] =
  for {
    a <- succeedLazy(10)
    b <- succeedLazy(20)
  } yield a + b

val zio = action[S1].runOption.runAsync

Runtime.unsafeRun(zio) //Some(30)

Versions

Version
1.0.0
0.1.3
0.1.2
0.1.1
0.1.0