Giter Site home page Giter Site logo

XorT example about eff HOT 8 CLOSED

atnos-org avatar atnos-org commented on July 18, 2024
XorT example

from eff.

Comments (8)

etorreborre avatar etorreborre commented on July 18, 2024

Can you post a full gist with all your imports?

The other question is: what are you trying to achieve by mixing Eff and monad transformers?

from eff.

pavlosgi avatar pavlosgi commented on July 18, 2024

I'd like to use for comprehension with Eff and Xor

from eff.

pavlosgi avatar pavlosgi commented on July 18, 2024

I created this Gist where I am trying to do sequence to a List of effects and get the same error

[error]  both value function0Instance in trait Function0Instances of type => cats.Bimonad[Function0]
[error]  and value optionInstance in trait OptionInstances of type => cats.Traverse[Option] with cats.MonadCombine[Option] with cats.CoflatMap[Option] with cats.Alternative[Option]
[error]  match expected type cats.Applicative[G]
[error]   val efs = list.sequence

from eff.

pavlosgi avatar pavlosgi commented on July 18, 2024

I also created this Gist where I am trying to use XorT with Eff

from eff.

etorreborre avatar etorreborre commented on July 18, 2024

This compiled for me with

import cats.std.list._
val efs = list.sequenceU

from eff.

pavlosgi avatar pavlosgi commented on July 18, 2024

Should have tried that, wasn't aware that cats also provides sequenceU like scalaz does. Yep that works for me as well and also list.traverseU(identity). Any ideas on XorT ? Thanks a lot btw

from eff.

etorreborre avatar etorreborre commented on July 18, 2024

If you write XorT.pure(efs) just after val efs = list.sequenceU everything compiles ok.

from eff.

etorreborre avatar etorreborre commented on July 18, 2024

I am closing this for now. Please feel free to discuss again on gitter.

from eff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.