Git Product home page Git Product logo

Comments (8)

raulraja avatar raulraja commented on June 15, 2024 3

@kailuowang @diesalbla Not sure if you agree but for what we are concerned at Freestyle and 47 Degrees as users we are eager to start using cats-tagless and we can probably include those Freestyle related features in the next version of cats-tagless. I don't think we should hold the release for those features and they can always make a nice set of improvements and features in the next version.

from cats-tagless.

raulraja avatar raulraja commented on June 15, 2024 2

I'll ask the Freestyle team and someone will get to it. Thanks! This is exciting!

from cats-tagless.

kailuowang avatar kailuowang commented on June 15, 2024 1

Makes sense. @diesalbla. I vote let's add the two.

from cats-tagless.

kailuowang avatar kailuowang commented on June 15, 2024 1

got it, Thanks @raulraja. I'll try get the initial release out of the door soon.

from cats-tagless.

diesalbla avatar diesalbla commented on June 15, 2024

@kailuowang In the title tagless related util from freestyle, which components of freestyle should be ported to cats-tagless?

Porting the macros should not be difficult, since they are written on scalameta. On the side of the macros, in the freestyle-core, the main elements I can see are the following:

  • The @tagless macro, to generate complementary parts of the F-algebra. Note that the macro generates an F[_] parameter (if missing), the apply method in the companion object, and the mapK function.
  • The stack-safe complement to the @tagless macro, to generate a Free-based default encoding for the algebra. Note that this only adds the ADT of operations, and is not tied to the Free-FreeApplicative encoding.
  • The @module macro, for combining algebras using implicit parameters.

Regarding the integrations, some of those integrations are now overlapping with existing type-classes in cats or cats-effect. Other integrations provide functionality which is now available in other libraries.

from cats-tagless.

kailuowang avatar kailuowang commented on June 15, 2024

@diesalbla thank you for looking into this. I think the @tagless macro to generate complementary parts (Apply and mapK) overlaps with existing ones already ported in.
The generation of ADT of operations sounds a good one to be ported in.
@module looks nice too. BTW just curious can you add more methods to a @module trait?

from cats-tagless.

diesalbla avatar diesalbla commented on June 15, 2024

Regarding the @module macro, the annotated trait or abstract class can have other concrete values and methods. It can also have concrete methods of type F[A], where F[_] is the parameter of the F-algebra, which you can use to combine the operations of the combined algebras. The macro works by taking any deferred val to be a reference to an algebra.

The generation of ADT operations is one of the things that the @free macro does. It has some restrictions on the form of the annotated traits, which @tagless does not have. For instance, whereas an @tagless-annotated trait can have type parameters, the stack-safe does not support that.

from cats-tagless.

kailuowang avatar kailuowang commented on June 15, 2024

@diesalbla not to rush you by any means. Just wonder how we shall schedule our first release. Shall we do one release now or you think this one is imminent enough to hold it for?

from cats-tagless.

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.