ndmitchell/hlint

Incorrect redundant bracket warning with OverloadedRecordDot

Open

#1,458 opened on Feb 13, 2023

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Haskell (208 forks)batch import
buggood first issue

Repository metrics

Stars
 (1,594 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

given

newtype T = T { f :: B }

g :: A -> T
a :: A

The code

(g a).f

uses the record dot operator. HLint recognizes this as the compose operator and incorrectly warns of a redundant bracket. Removing the bracket breaks the code, of course.

Contributor guide