-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InvariantMonoidal + FreeInvariant? #802
Comments
👍 I would be keen to help out here. Very useful stuff, for me atleast. Here's my version: https://gist.github.com/Fristi/5d8efe3eeddff88a6fc4 It's a prototype for a bidirectional router. Route parts are translated to either documentation or codecs by using this Free version (also been thinking about creating a JSON algebra in Free InvariantCartesian form, so you would be able to derive JSON schema and codecs from it, but haven't tried that out.). I couldn't make this work with Free applicatives, since a Applicative needs a Functor implementation, and I can't make that for codec. I wonder what other Free variants there are. You can combine several typeclasses and lift their operations in a Free variant. But what combinations would work and be useful? Also a thing about naming these; What if I would something like Invariant + Monoidal + SemigroupK, would you name it FreeInvariantMonoidalSemigroupK? Sounds abit like stacking OO design patterns to me. Is there any work done on naming these combinations of typeclasses elsewhere (haskell, category theory)? |
@mpilquist What's your opinion on that? All credits goes to you for coming with the name in your SBTB talk :) |
👍 This looks good to me! |
Sorry for not responding for so long but I started pondering a project today that I think could really benefit from this. Now that free has its own module again, I'm less concerned about adding more structures to it. 👍 from me. |
Uh ignore my last comment. I had forgotten there is an open PR for this. |
Added in #845. |
Would you be interested in a new type class:
And a new Free structure for it? Something along the lines of the stuff we built with
@Fristi, https://gist.github.com/OlivierBlanvillain/b6322caec0318734c12b
I think this is what would be needed in a PR, let me know if I forgot something:
With s/Monoidal/Cartesian/ after #795 :)
The text was updated successfully, but these errors were encountered: