lspitzner / lspitzner/brittany

brittany keeps adding parentheses to type operator in constraint

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

Nobody has claimed this yet.

bug hs:brackets hs:types language extension support
Dominant language
Haskell
Stars
686
Forks
69
PR merge metrics
No merged PRs in 30d

Description

If I start with the below program, brittany adds extra parens around (->) each time I run it.

{-# LANGUAGE TypeFamilies #-}

id :: p ~ (->) => p a a
id = Prelude.id

After running brittany several times:

{-# LANGUAGE TypeFamilies #-}

id :: p ~ ((((((((((((->)))))))))))) => p a a
id = Prelude.id
% ~/.cabal/bin/brittany --version
brittany version 0.12.0.0
Copyright (C) 2016-2018 Lennart Spitzner
There is NO WARRANTY, to the extent permitted by law.

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 running brittany 0.12.0.0 on the Haskell example in the issue and formatting it repeatedly to reproduce the added parentheses. Done means the constraint type remains unchanged after subsequent formatting runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.