Skip to content

Apply hint: eta reduce breaks where block identation #94

@jneira

Description

@jneira

Hi, using hls-hlint-plugin an user has detected that apply "eta reduce" removes the identation of a where block, making the code throw parser errors

PS D:\dev\ws\haskell\cabal-test> cat .\src\HlintTests.hs
module HlintTests where

f  :: String -> String
f x = show x
  where y :: String
        y = "foo"

PS D:\dev\ws\haskell\cabal-test> hlint .\src\HlintTests.hs --refactor
module HlintTests where

f  :: String -> String
f = show
  where
y = "foo" y :: String

PS D:\dev\ws\haskell\cabal-test> hlint --version
HLint v3.2.1, (C) Neil Mitchell 2006-2020

PS D:\dev\ws\haskell\cabal-test> refactor --version
v0.8.2.1

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions