mihaimaruseac / hindent

Haskell pretty printer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Removes parentheses around GADT constructors defined as operators

jmcarthur opened this issue · comments

Problem

The parentheses get removed, creating invalid syntax.

  • I checked the issue tracker for existing issues about this problem.
  • I'm using the latest version of hindent.

Input haskell

data FixedList n a where
  Nil :: FixedList 0 a
  (:::) :: a -> FixedList n a -> FixedList (n + 1) a

Expected output haskell

data FixedList n a where
  Nil :: FixedList 0 a
  (:::) :: a -> FixedList n a -> FixedList (n + 1) a

Actual output haskell

data FixedList n a where
  Nil :: FixedList 0 a
  ::: :: a -> FixedList n a -> FixedList (n + 1) a