Skip to content

NoPrematureLetComputation can silently remove comments with its fixes #11

@SiriusStarr

Description

@SiriusStarr

SSCCE:

foo : Int
foo =
    -- This DOES survive 1
    let
        -- This comment will be removed by the fix
        premature : Int
        premature =
            -- This DOES survive 2
            0

        -- This comment will be removed by the fix
    in
    -- This comment will be removed by the fix
    if True then
        -- This DOES survive 3
        premature

    else
        1

is fixed to

foo : Int
foo =
    -- This DOES survive 1
    if True then
        -- This DOES survive 3
        let
            premature : Int
            premature =
                -- This DOES survive 2
                0
        in
        premature

    else
        1

It would be ideal if this didn't happen, of course, though it may be a pain to fix. 😄

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