cats icon indicating copy to clipboard operation
cats copied to clipboard

Update typeclasses.md

Open tsobako opened this issue 3 years ago • 12 comments

Update the infographic to modern cats/cats-effect versions

Thank you for contributing to Cats!

This is a kind reminder to run sbt +prePR and commit the changed files, if any, before submitting.

tsobako avatar Oct 27 '22 09:10 tsobako

thanks for doing this.

I haven't reviewed all the links, but when I view the new svg I see Bimonad arrow to Monad going to the center of the Monad node, not the edge, like the other cases. Do you see that?

Secondly, I think the URL should be a URL that typelevel controls, not a user (so even the tpolecat URL had this problem). I wonder if we could just commit the SVG to the ghpages branch for this repo? I'm not very experienced with all the issues with that here though.

johnynek avatar Oct 27 '22 18:10 johnynek

I think the URL should be a URL that typelevel controls

Totally 👍 for that. It is quite annoying that even having all the doc sources fetched in a local repo we still have to fetch the SVG (which is supposed to be a part of the docs) from elsewhere.

I wonder though, how is that SVG got generated? Can we integrate it with the docs build somehow?

satorg avatar Oct 27 '22 19:10 satorg

I wonder though, how is that SVG got generated? Can we integrate it with the docs build somehow?

See https://github.com/tpolecat/cats-infographic

It appears to be an "OmniGraffle" file. Might be complicated to integrate into the build.

armanbilge avatar Oct 27 '22 19:10 armanbilge

Laika will hopefully be getting support for Mermaid diagrams soon.

  • https://github.com/planet42/Laika/issues/331
  • https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams#creating-mermaid-diagrams

Maybe we can make a similar diagram using that.

armanbilge avatar Oct 27 '22 19:10 armanbilge

Thanks for comments, I'll try to update graph and move it to this repo later

tsobako avatar Oct 28 '22 09:10 tsobako

Hi. I decided to put just plain SVG file. It think it would be better to edit it manually when something in typeclass hierarchy is changed.

tsobako avatar Nov 03 '22 13:11 tsobako

@tsobako fyi: in Cats 2.7.0 there was NonEmptyAlternative added that became a base trait for Alternative: https://github.com/typelevel/cats/blob/d30be68a69e75324fdf1b81d6230a5c161c87fc3/core/src/main/scala/cats/NonEmptyAlternative.scala#L24

UPD. Looking at the diagram I am not sure if it is easy to squeeze NonEmptyAlternative into it. But if it was possible, it would be really cool. Anyway, it looks great, thanks!

satorg avatar Nov 03 '22 17:11 satorg

Hi. I removed SVG diagram as it was too hard to find good editor that does not break graph structure. So I decided to rewrite the diagram into mermaid format which is easier to read.

tsobako avatar Nov 07 '22 07:11 tsobako

Hi. A mermaid diagram which contains all typeclasses is hard to read, so I group typeclasses belonging to different cats libraries into several diagrams. Please review and comment

tsobako avatar Dec 07 '22 13:12 tsobako

Seems like this PR got stuck for some reason. I think it is because the most recent CI failed. Just wondering, is it failing due to issues with the update itself or is it just due to CI flakiness?

satorg avatar Jan 15 '23 21:01 satorg

It's CI flake. But I think this PR is blocked until Laika supports Mermaid.

  • https://github.com/planet42/Laika/issues/331

armanbilge avatar Jan 15 '23 21:01 armanbilge

@tsobako see some discussion/commentary in https://github.com/typelevel/cats/issues/4374#issuecomment-1383394310.

armanbilge avatar Jan 16 '23 03:01 armanbilge