vscode-haskell-linter
vscode-haskell-linter copied to clipboard
Substitution isn't done corectly
Consider the following code snipet:
instance Traversable P_BoxItem where
traverse f (P_BxExpr nm pos' ctx mCrud mView msub)
= (\ctx' msub'->(P_BxExpr nm pos' ctx' mCrud mView msub')) <$>
traverse f ctx <*> traverse (traverse f) msub
traverse _ (P_BxTxt nm pos' str) = pure (P_BxTxt nm pos' str)
hlint will warn about redundant brackets:
src/Ampersand/Core/ParseTree.hs:430:19-59: Suggestion: Redundant bracket
Found
\ ctx' msub' -> (P_BxExpr nm pos' ctx' mCrud mView msub')
Perhaps
\ ctx' msub' -> P_BxExpr nm pos' ctx' mCrud mView msub'
In vscode, using haskell-linter 0.0.6, it replaces with too much, breaking the code:
final result: