apply-refact
apply-refact copied to clipboard
when -> unless refactor drops parens
- when (not $ isStaffMail email) ($(logThrow) Unauthorized)
+ unless isStaffMail email ($(logThrow) Unauthorized)
This happens when the unless refactor is applied. Not sure if related to the TH splice.
Expected result:
unless (isStaffMail email) ($(logThrow) Unauthorized)
@Profpatsch Sorry for not replying earlier - I somehow just saw this.
I wasn't able to reproduce this with hlint 3.2.1 and apply-refact 0.8.2.0. I tried to refactor a module that contains
x = when (not $ isStaffMail email) ($(logThrow) Unauthorized)
and it worked as expected. IIRC there were some refactoring-related bug fixes in recent HLint versions, so please use the latest version and let me know if you still have this issue.