Skip to content

patterns with parenthesized operator arguments get broken #1174

@exaexa

Description

@exaexa

Formatting of this code (formatted as such for didactic purposes)

instance Num b => Num (a -> b) where
  (f + g) x        = f x + g x
  (f * g) x        = f x * g x
  ...

is accepted by ghc (tested 9.6.7) but seems to get broken by hindent (tested with 6.2.1 and 6.3.0):

instance Num b => Num (a -> b) where
  f + g x        = f x + g x
  f * g x        = f x * g x
  ...
  • I checked the issue tracker for existing issues about this problem.
  • I'm using the latest version of hindent.

I didn't have a chance to look at the code yet to find a fix, will try later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions