typelevel / typelevel/cats

Missing instances for Cofree

Open
#2,300 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

on hold
Dominant language
Scala
Stars
5.5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
5

Description

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 :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the requested Cofree instances with the Haskell documentation linked in the issue, paying attention to the Alternative instance's tailRecM requirement. Confirm which of Eq, Ord, Show, Alternative, and Distributive are still appropriate for Cats, then verify the selected instances and their behavior with the project's existing checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.