Arrow-Effects-Kotlinx-Coroutines

Functional companion to Kotlin's Standard Library

License

License

Categories

Categories

Kotlin Languages
GroupId

GroupId

io.arrow-kt
ArtifactId

ArtifactId

arrow-effects-kotlinx-coroutines
Last Version

Last Version

0.8.2
Release Date

Release Date

Type

Type

jar
Description

Description

Arrow-Effects-Kotlinx-Coroutines
Functional companion to Kotlin's Standard Library
Project URL

Project URL

https://github.com/arrow-kt/arrow/
Source Code Management

Source Code Management

https://github.com/arrow-kt/arrow/

Download arrow-effects-kotlinx-coroutines

How to add to project

<!-- https://jarcasting.com/artifacts/io.arrow-kt/arrow-effects-kotlinx-coroutines/ -->
<dependency>
    <groupId>io.arrow-kt</groupId>
    <artifactId>arrow-effects-kotlinx-coroutines</artifactId>
    <version>0.8.2</version>
</dependency>
// https://jarcasting.com/artifacts/io.arrow-kt/arrow-effects-kotlinx-coroutines/
implementation 'io.arrow-kt:arrow-effects-kotlinx-coroutines:0.8.2'
// https://jarcasting.com/artifacts/io.arrow-kt/arrow-effects-kotlinx-coroutines/
implementation ("io.arrow-kt:arrow-effects-kotlinx-coroutines:0.8.2")
'io.arrow-kt:arrow-effects-kotlinx-coroutines:jar:0.8.2'
<dependency org="io.arrow-kt" name="arrow-effects-kotlinx-coroutines" rev="0.8.2">
  <artifact name="arrow-effects-kotlinx-coroutines" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.arrow-kt', module='arrow-effects-kotlinx-coroutines', version='0.8.2')
)
libraryDependencies += "io.arrow-kt" % "arrow-effects-kotlinx-coroutines" % "0.8.2"
[io.arrow-kt/arrow-effects-kotlinx-coroutines "0.8.2"]

Dependencies

compile (4)

Group / Artifact Type Version
io.arrow-kt : arrow-effects jar 0.8.2
org.jetbrains.kotlin : kotlin-stdlib-jdk7 jar 1.3.11
io.arrow-kt : arrow-annotations jar 0.8.2
org.jetbrains.kotlinx : kotlinx-coroutines-core jar 1.1.0

test (2)

Group / Artifact Type Version
io.kotlintest : kotlintest jar 2.0.7
io.arrow-kt : arrow-test jar 0.8.2

Project Modules

There are no modules declared in this project.

Maven Central Latest snapshot Kotlin version badge

License StackOverflow Twitter

Λrrow is a library for Typed Functional Programming in Kotlin.

Arrow aims to provide a lingua franca of interfaces and abstractions across Kotlin libraries. For this, it includes the most popular data types, type classes and abstractions such as Option, Try, Either, IO, Functor, Applicative, Monad to empower users to write pure FP apps and libraries built atop higher order abstractions.

Use the list below to learn more about Λrrow's main features.

Curated external links

If you have a blog post, talk, or upcoming event on Arrow, please considering opening an issue or PR to add to the collection over at the Arrow Media repo.

About this repository

This repository orchestrates the global configuration and checks of the Λrrow libraries and other related repositories.

SSH HTTPS
Λrrow Core [email protected]:arrow-kt/arrow-core.git https://github.com/arrow-kt/arrow-core.git
Λrrow Fx [email protected]:arrow-kt/arrow-fx.git https://github.com/arrow-kt/arrow-fx.git
Λrrow Optics [email protected]:arrow-kt/arrow-optics.git https://github.com/arrow-kt/arrow-optics.git
Λrrow Meta [email protected]:arrow-kt/arrow-meta.git https://github.com/arrow-kt/arrow-meta.git
Λrrow Incubator [email protected]:arrow-kt/arrow-incubator.git https://github.com/arrow-kt/arrow-incubator.git
Λrrow Integrations [email protected]:arrow-kt/arrow-integrations.git https://github.com/arrow-kt/arrow-integrations.git
Λrrow UI [email protected]:arrow-kt/arrow-ui.git https://github.com/arrow-kt/arrow-ui.git
Λrrow Check [email protected]:arrow-kt/arrow-check.git https://github.com/arrow-kt/arrow-check.git
Λrrow Ank [email protected]:arrow-kt/arrow-ank.git https://github.com/arrow-kt/arrow-ank.git
Λrrow Site [email protected]:arrow-kt/arrow-site.git https://github.com/arrow-kt/arrow-site.git
Λrrow Examples [email protected]:arrow-kt/arrow-examples.git https://github.com/arrow-kt/arrow-examples.git

Find more details in Move arrow repository content to multi-repo.

Join Us

Arrow is an inclusive community powered by awesome individuals like you. As an actively growing ecosystem, Arrow and its associated libraries and toolsets are in need of new contributors! We have issues suited for all levels, from entry to advanced, and our maintainers are happy to provide 1:1 mentoring. All are welcome in Arrow.

If you’re looking to contribute, have questions, or want to keep up-to-date about what’s happening, please follow us here and say hello!

Find more details in CONTRIBUTING.

Setup

Next development version

If you want to try the last features, replace 0.11.0 by 0.12.0-SNAPSHOT in the following guideline.

JDK

Make sure to have the latest version of JDK 1.8 installed.

Android

Arrow supports Android out of the box starting on API 21 and up.

We'll be working on a Arrow-Android integration module that adds some helpers and integrations.

Gradle

Basic Setup

In your project's root build.gradle, append these repositories to your list:

allprojects {
    repositories {
        mavenCentral()
        jcenter()
        maven { url "https://dl.bintray.com/arrow-kt/arrow-kt/" } 
        maven { url "https://oss.jfrog.org/artifactory/oss-snapshot-local/" } // for SNAPSHOT builds
    }
}

Add the dependencies into the project's build.gradle:

Λrrow Core
apply plugin: 'kotlin-kapt'

def arrow_version = "0.11.0"
dependencies {
    implementation "io.arrow-kt:arrow-core:$arrow_version"
    implementation "io.arrow-kt:arrow-syntax:$arrow_version"
    kapt    "io.arrow-kt:arrow-meta:$arrow_version"
}
Λrrow Core + Λrrow Optics
apply plugin: 'kotlin-kapt'

def arrow_version = "0.11.0"
dependencies {
    implementation "io.arrow-kt:arrow-optics:$arrow_version"
    implementation "io.arrow-kt:arrow-syntax:$arrow_version"
    kapt    "io.arrow-kt:arrow-meta:$arrow_version"
}
Λrrow Core + Λrrow Fx
apply plugin: 'kotlin-kapt'

def arrow_version = "0.11.0"
dependencies {
    implementation "io.arrow-kt:arrow-fx:$arrow_version"
    implementation "io.arrow-kt:arrow-syntax:$arrow_version"
    kapt    "io.arrow-kt:arrow-meta:$arrow_version"
}
Λrrow Core + Λrrow Optics + Λrrow Fx
apply plugin: 'kotlin-kapt'

def arrow_version = "0.11.0"
dependencies {
    implementation "io.arrow-kt:arrow-fx:$arrow_version"
    implementation "io.arrow-kt:arrow-optics:$arrow_version"
    implementation "io.arrow-kt:arrow-syntax:$arrow_version"
    kapt    "io.arrow-kt:arrow-meta:$arrow_version"
}
Other libraries

Here is the complete library list for a more granular dependency set-up.

Additional Setup

For projects that wish to use their own @higherkind, @optics, and other meta programming facilities provided by Arrow the setup below is also required:

Add the dependencies into the project's build.gradle

apply plugin: 'kotlin-kapt' //optional
apply from: rootProject.file('gradle/generated-kotlin-sources.gradle') //only for Android projects

def arrow_version = "0.11.0"
dependencies {
    ...
    kapt    "io.arrow-kt:arrow-meta:$arrow_version" //optional
    ...
}

gradle/generated-kotlin-sources.gradle

apply plugin: 'idea'

idea {
    module {
        sourceDirs += files(
                'build/generated/source/kapt/main',
                'build/generated/source/kapt/debug',
                'build/generated/source/kapt/release',
                'build/generated/source/kaptKotlin/main',
                'build/generated/source/kaptKotlin/debug',
                'build/generated/source/kaptKotlin/release',
                'build/tmp/kapt/main/kotlinGenerated')
        generatedSourceDirs += files(
                'build/generated/source/kapt/main',
                'build/generated/source/kapt/debug',
                'build/generated/source/kapt/release',
                'build/generated/source/kaptKotlin/main',
                'build/generated/source/kaptKotlin/debug',
                'build/generated/source/kaptKotlin/release',
                'build/tmp/kapt/main/kotlinGenerated')
    }
}

BOM file

To avoid specifying the Arrow version for every dependency, a BOM file is available:

    implementation platform("io.arrow-kt:arrow-stack:$arrow_version")

    implementation "io.arrow-kt:arrow-core"
    implementation "io.arrow-kt:arrow-fx"
    implementation "io.arrow-kt:arrow-syntax"
    ...

Example of use

Maven

Basic Setup

Add to your pom.xml file the following properties:

<properties>
    <kotlin.version>1.4.0</kotlin.version>
    <arrow.version>0.11.0</arrow.version>
</properties>

Add the dependencies that you want to use

<dependency>
    <groupId>io.arrow-kt</groupId>
    <artifactId>arrow-core</artifactId>
    <version>${arrow.version}</version>
</dependency>
<dependency>
    <groupId>io.arrow-kt</groupId>
    <artifactId>arrow-syntax</artifactId>
    <version>${arrow.version}</version>
</dependency>

Enabling kapt

Enable annotation processing using Kotlin plugin:

<plugin>
    <groupId>org.jetbrains.kotlin</groupId>
    <artifactId>kotlin-maven-plugin</artifactId>
    <version>${kotlin.version}</version>
    <executions>
        <execution>
            <id>kapt</id>
            <goals>
                <goal>kapt</goal>
            </goals>
            <configuration>
                <sourceDirs>
                    <sourceDir>src/main/kotlin</sourceDir>
                </sourceDirs>
                <annotationProcessorPaths>
                    <annotationProcessorPath>
                        <groupId>io.arrow-kt</groupId>
                        <artifactId>arrow-meta</artifactId>
                        <version>${arrow.version}</version>
                    </annotationProcessorPath>
                </annotationProcessorPaths>
            </configuration>
        </execution>
        <execution>
            <id>compile</id>
            <phase>compile</phase>
            <goals>
                <goal>compile</goal>
            </goals>
            <configuration>
                <sourceDirs>
                    <sourceDir>src/main/kotlin</sourceDir>
                </sourceDirs>
            </configuration>
        </execution>
        <execution>
            <id>test-compile</id>
            <phase>test-compile</phase>
            <goals>
                <goal>test-compile</goal>
            </goals>
        </execution>
    </executions>
</plugin>

BOM file

To avoid specifying the Arrow version for every dependency, a BOM file is available:

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.arrow-kt</groupId>
        <artifactId>arrow-stack</artifactId>
        <version>${arrow.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    ...
  </dependencies>

License

Copyright (C) 2017 The Λrrow Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
io.arrow-kt

ΛRROW

Functional Data Types & Abstractions for Kotlin

Versions

Version
0.8.2
0.8.1
0.8.0
0.7.3
0.7.2
0.7.1
0.7.0
0.6.1
0.6.0
0.5.5