Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atnos-org/eff
Eff monad for cats - https://atnos-org.github.io/eff
https://github.com/atnos-org/eff
cats effects functional-programming monad monad-transformers scala
Last synced: 29 days ago
JSON representation
Eff monad for cats - https://atnos-org.github.io/eff
- Host: GitHub
- URL: https://github.com/atnos-org/eff
- Owner: atnos-org
- License: mit
- Created: 2016-01-04T22:34:26.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-21T07:10:44.000Z (6 months ago)
- Last Synced: 2024-05-21T23:17:06.441Z (6 months ago)
- Topics: cats, effects, functional-programming, monad, monad-transformers, scala
- Language: Scala
- Homepage:
- Size: 3.52 MB
- Stars: 570
- Watchers: 19
- Forks: 78
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-fp - eff-cats - Eff monad for cats. (Libraries)
README
# eff
[![Join the chat at https://gitter.im/atnos-org/eff](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/atnos-org/eff?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Maven Central](https://img.shields.io/maven-central/v/org.atnos/eff_3.svg)](https://maven-badges.herokuapp.com/maven-central/org.atnos/eff_3)Extensible effects are an alternative to monad transformers for computing with effects in a functional way.
This library is based on the "free-er" monad and extensible effects described in
Oleg Kiselyov in [Freer monads, more extensible effects](https://okmij.org/ftp/Haskell/extensible/more.pdf).You can learn more in the User Guide:
- [your first effects](https://atnos-org.github.io/eff/org.atnos.site.Introduction.html)
- [included effects: `Reader`, `Writer`, `Eval`, `State`,...](https://atnos-org.github.io/eff/org.atnos.site.OutOfTheBox.html)
- [create your own effects](https://atnos-org.github.io/eff/org.atnos.site.CreateEffects.html)
- [use Member implicits](https://atnos-org.github.io/eff/org.atnos.site.MemberImplicits.html)
- [working with different effect stacks](https://atnos-org.github.io/eff/org.atnos.site.TransformStack.html)
- [a tutorial similar to the cats' tutorial for Free monads](https://atnos-org.github.io/eff/org.atnos.site.Tutorial.html)You can also check out [this presentation](https://bit.ly/eff_flatmap_2016) at flatMap Oslo 2016 ([slides](https://www.slideshare.net/etorreborre/the-eff-monad-one-monad-to-rule-them-all)).
## Installation
Eff is published for Scala 2.12, 2.13 and 3. `eff` core is available for the JVM, ScalaJS and scala-native. Sbt dependency:
```scala
// check maven badge above for latest version
libraryDependencies += "org.atnos" %% "eff" % "7.0.4"// to write types like Reader[String, *]
libraryDependencies ++= {
if (scalaBinaryVersion.value == "3") {
Nil
} else {
Seq(compilerPlugin("org.typelevel" %% "kind-projector" % "0.13.3" cross CrossVersion.full))
}
}scalacOptions ++= {
if (scalaBinaryVersion.value == "3") {
Seq("-Ykind-projector")
} else {
Nil
}
}// to get types like Reader[String, *] (with more than one type parameter) correctly inferred for scala 2.12.x
scalacOptions ++= {
if (scalaBinaryVersion.value == "2.12") {
Seq("-Ypartial-unification")
} else {
Nil
}
}
```# Contributing
[eff](https://github.com/atnos-org/eff/) is a [Typelevel](https://typelevel.org) project. This means we embrace pure, typeful, functional programming,
and provide a safe and friendly environment for teaching, learning, and contributing as described in the [Scala Code of Conduct](https://www.scala-lang.org/conduct/).Feel free to open an issue if you notice a bug, have an idea for a feature, or have a question about the code. Pull requests are also gladly accepted.
# Extensions
## Modules in this repository
- [scalaz](./scalaz)
- [monix](./monix)
- [doobie](./doobie)
- [twitter](./twitter) (deprecated)## External
- [eff-zio](https://github.com/takayahilton/eff-zio) eff extension for ZIO effects.