Skip to content

Use unless doesn't fire for compound else expressions #1671

@LightAndLight

Description

@LightAndLight
$ hlint --version
HLint v3.10, (C) Neil Mitchell 2006-2025

Example:

module Test where

test1 = if x then pure () else y

test2 = if x then pure () else y x

test1's RHS generates Warning: Use unless, but test2's RHS doesn't trigger the warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions