Skip to content
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

Missing instances for Cofree #2300

Open
kubukoz opened this issue Jun 18, 2018 · 6 comments
Open

Missing instances for Cofree #2300

kubukoz opened this issue Jun 18, 2018 · 6 comments
Labels

Comments

@kubukoz
Copy link
Member

kubukoz commented Jun 18, 2018

https://hackage.haskell.org/package/free-4.1/docs/Control-Comonad-Cofree.html

There are some instances/derivations in the Haskell version of Cofree that might be useful for some people (I for one would welcome Eq):

  • Eq
  • Ord
  • Show
  • Alternative f => Monad (Cofree f) (needs tailRecM)
  • Distributive

Possibly more, but these are the ones I noticed missing now.

I'd love to take a shot at implementing them, if it sounds like a good idea :)

@kubukoz
Copy link
Member Author

kubukoz commented Jun 23, 2018

I'm working on this (slowly), so far got the Monad instance, should have the rest in the upcoming week

@kubukoz
Copy link
Member Author

kubukoz commented Jun 27, 2018

Blocked by #2308

@kubukoz kubukoz mentioned this issue Jul 7, 2018
@kubukoz
Copy link
Member Author

kubukoz commented Jul 30, 2018

I suggest waiting until 2.13 is released until we go forward with this - lazy implicits make it possible to implement the recursive instances (Eq, Show, Order and maybe more).

If anyone stumbles upon this issue and needs an instance before that, I suggest copying code from https://github.com/typelevel/shapeless-contrib/pull/9/files and porting it to Cats.

@kubukoz
Copy link
Member Author

kubukoz commented Jul 30, 2018

@kailuowang mind adding an "on hold" label?

@kailuowang
Copy link
Contributor

added. thanks @kubukoz

@kubukoz
Copy link
Member Author

kubukoz commented Jul 30, 2018

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants