ndmitchell/hlint

Incorrect redundant bracket warning with OverloadedRecordDot

Aperta

#1458 aperta il 13 feb 2023

 (2 commenti) (0 reazioni) (0 assegnatari)Haskell (208 fork)batch import
buggood first issue

Metriche repository

Star
 (1602 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor