lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
691 stars 72 forks source link

Extra whitespace in type-level list #341

Open pbrisbin opened 3 years ago

pbrisbin commented 3 years ago

Given:

something
  :: (MonadIO m, GraphulaContext m '[MathQuestion, MathQuestionSkill])
  => a
something = undefined

Expected:

something
  :: (MonadIO m, GraphulaContext m '[MathQuestion, MathQuestionSkill]) => a
something = undefined

Actual:

something
  :: (MonadIO m, GraphulaContext m '[MathQuestion , MathQuestionSkill]) => a
something = undefined

We experience this on v0.13.1.0 with a relatively heavy configuration, but it reproduces on https://hexagoxel.de/brittany/ with its defaults too:

tfausak commented 3 years ago

Here's a shorter way to reproduce the same problem:

$ cat Example.hs
a :: '[c, d]

$ cabal exec -- brittany Example.hs
a :: '[c , d]