lspitzner / lspitzner/brittany

Format instance heads

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

Nobody has claimed this yet.

enhancement hs:classes
Dominant language
Haskell
Stars
686
Forks
69
PR merge metrics
No merged PRs in 30d

Description

This is related to #236. Brittany currently passes instance heads through. For example:

-- brittany --columns 20
instance SomeVeryLongConstraint => SomeVeryLongTypeClass SomeVeryLongType

I'd expect that to be formatted something like this:

instance
  SomeVeryLongConstraint
  => SomeVeryLongTypeClass
     SomeVeryLongType

Contributor guide

No contributing guide indexed for this repository

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 reading the related issue #236 and locating the formatter logic for Haskell instance declarations; the issue names no source files or tests. Reproduce the example with a small input using --columns 20, then verify that long instance heads wrap into the shown multiline layout without changing other formatting.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.