Comments (1)
Just traversing this repo and found your issue here. Intrigued me somehow so I checked it. While looking at your github I am pretty sure you know the fix, however let me post here my findings:
- If you change
Raise
toHandle
your code will work.Handle
extendsRaise
but it is somehow not being resolved here for theStateT
(maybe it's a compiler bug?) - so the patch is simple (?) and is about creating a
Raise
provider forStateT
based onHandler.handleStateT
function:
diff --git a/core/src/main/scala/cats/mtl/Raise.scala b/core/src/main/scala/cats/mtl/Raise.scala
index a29b70d..ea67cf9 100644
--- a/core/src/main/scala/cats/mtl/Raise.scala
+++ b/core/src/main/scala/cats/mtl/Raise.scala
@@ -124,6 +124,8 @@ private[mtl] trait RaiseInstances extends LowPriorityRaiseInstances {
F: Monad[F]): Raise[IorT[F, E, *], E] =
Handle.handleIorT[F, E]
+ implicit final def raiseStateT[F[_], E, S](implicit F0: Handle[F, E], M: Monad[F]): Raise[StateT[F, S, *], E] = Handle.handleStateT
+
}
It works, however I haven't check if this interferes with other parts of this repository (laws etc.).
from cats-mtl.
Related Issues (20)
- Write a ton of documentation HOT 4
- Hand-write (or scalafix) syntax stuff
- Add a cats-mtl-free submodule
- Inductive instances over ContT HOT 4
- Documentation links return 404 HOT 1
- Add low-priority materializations for Handle in terms of ApplicativeError HOT 3
- Inconsistent use of def vs val in embedded typeclass
- New typeclass to run reader-like effects HOT 1
- Release for 3.0.0-RC2 HOT 1
- Release for Scala 3 HOT 3
- CI publishing failed HOT 1
- Website publish is failing in CI
- Release v1.3.0
- Scaladoc link is invalid now HOT 3
- handle error with partial function
- Cat
- Rebranding Cats MTL to emphasize the Capabilities, not the Monad Transformers HOT 11
- Different Ask typeclass requirements in a same stack monad HOT 3
- Support Scala Native 0.5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cats-mtl.