lspitzner / lspitzner/brittany

Type signature example

Open
#84 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Feel free to close this as a duplicate. Just wanted to drop by with this example to see if there's something I can do to help.

Long type signature:
```
(forall b . ( Eff ( SCHED.Grandpate : StateObfuscationate : Exc UnrecoverableException : r) b) -> Eff (Exc UnrecoverableException : r) b)
```

Brittany formats to:
```
( forall
b
. ( Eff
( SCHED.Grandpate
:
StateObfuscationate
:
Exc
UnrecoverableException
:
r
)
b
)
-> Eff (Exc UnrecoverableException : r) b
)
```

So that's a bit rough. Let me know if I can help. I would say there are three known issues blocking my colleagues and me from using Brittany.

One is import formatting, for which there's a PR open already. Great!

Two is long parameter lists with view patterns. I'll make a separate issue for that.

Three is this sort of stuff, which I would say is the most serious blocker.

Thanks!

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 reproducing the supplied long type signature in Brittany and inspect the formatter path that handles type signatures. Compare the current output with the example, then establish acceptable formatting for the nested constraints and confirm the result with the relevant formatter tests; no file or test path is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.