tweag / tweag/cooked-validators

Implement a deriving mechanism for `PrettyCooked`

Open
#439 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Haskell
Stars
44
Forks
11
PR merge metrics
No merged PRs in 30d

Description

It is quite cumbersome to implement PrettyCooked instances manually. I think it would be nice to implement a deriving mechanism for PrettyCooked. When we implement those by hand, we already do it in a very deterministic and algorithmic way (using prettyItemize for product types fields and list headers for constructors). There are already a lot of PrettyCooked instances for basic haskell and cardano types.

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 surveying the existing PrettyCooked instances for basic Haskell and Cardano types, then trace how prettyItemize handles product-type fields and how list headers represent constructors. Define the deriving mechanism and its coverage for those deterministic cases, with completion shown by replacing or validating representative manual instances.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.