Skip to content

ci: add aggressive HLint #229

ci: add aggressive HLint

ci: add aggressive HLint #229

Triggered via pull request February 5, 2024 16:39
Status Failure
Total duration 29m 11s
Artifacts

workflow.yaml

on: pull_request
Build - Windows
5m 1s
Build - Windows
Matrix: hlint
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 22 warnings
HLint inline-r
HLint failed with status: 1. Warning (65), Suggestion (64)
HLint examples
HLint failed with status: 1. Warning (4), Suggestion (22)
HLint inline-r: inline-r/src/Data/Vector/SEXP.hs#L24
Warning in module Data.Vector.SEXP: Unused LANGUAGE pragma ▫︎ Found: "{-# LANGUAGE DeriveFunctor #-}"
HLint inline-r: inline-r/src/Data/Vector/SEXP.hs#L27
Warning in module Data.Vector.SEXP: Unused LANGUAGE pragma ▫︎ Found: "{-# LANGUAGE GeneralizedNewtypeDeriving #-}"
HLint inline-r: inline-r/src/Data/Vector/SEXP.hs#L259
Warning in module Data.Vector.SEXP: Use fewer imports ▫︎ Found: "import Control.Exception ( evaluate )\nimport Control.Exception ( mask_ )\n" ▫︎ Perhaps: "import Control.Exception ( evaluate, mask_ )\n"
HLint inline-r: inline-r/src/Data/Vector/SEXP.hs#L363
Warning in withW in module Data.Vector.SEXP: Eta reduce ▫︎ Found: "withW _ v = W v" ▫︎ Perhaps: "withW _ = W"
HLint inline-r: inline-r/src/Data/Vector/SEXP.hs#L628
Suggestion in splitAt in module Data.Vector.SEXP: Use bimap ▫︎ Found: "\\ (a, b) -> (unW a, unW b)" ▫︎ Perhaps: "Data.Bifunctor.bimap unW unW" ▫︎ Note: increases laziness
HLint inline-r: inline-r/src/Data/Vector/SEXP.hs#L798
Suggestion in replicateM in module Data.Vector.SEXP: Avoid lambda using `infix` ▫︎ Found: "(\\ v -> proxyW v p)" ▫︎ Perhaps: "(`proxyW` p)"
HLint inline-r: inline-r/src/Data/Vector/SEXP.hs#L804
Suggestion in generateM in module Data.Vector.SEXP: Avoid lambda using `infix` ▫︎ Found: "(\\ v -> proxyW v p)" ▫︎ Perhaps: "(`proxyW` p)"
HLint inline-r: inline-r/src/Data/Vector/SEXP.hs#L1005
Suggestion in mapM in module Data.Vector.SEXP: Use fmap ▫︎ Found: "\\ p -> unW <$> proxyFW (G.mapM f) v p" ▫︎ Perhaps: "(fmap unW . proxyFW (G.mapM f) v)"
HLint inline-r: inline-r/src/Data/Vector/SEXP.hs#L1017
Suggestion in forM in module Data.Vector.SEXP: Use fmap ▫︎ Found: "\\ p -> unW <$> proxyFW (`G.forM` f) v p" ▫︎ Perhaps: "(fmap unW . proxyFW (`G.forM` f) v)"
HLint inline-r: inline-r/src/Data/Vector/SEXP.hs#L1279
Suggestion in filterM in module Data.Vector.SEXP: Use fmap ▫︎ Found: "\\ p -> unW <$> proxyFW (G.filterM f) v p" ▫︎ Perhaps: "(fmap unW . proxyFW (G.filterM f) v)"
HLint examples: examples/RelaxWithNM.hs#L28
Suggestion in forcingFunction in module Main: Redundant bracket ▫︎ Found: "(\\ t -> bigA * sin (omega * t))" ▫︎ Perhaps: "\\ t -> bigA * sin (omega * t)"
HLint examples: examples/RelaxWithNM.hs#L38
Suggestion in .*. in module Main: Redundant bracket ▫︎ Found: "(f x) * (g (t - x))" ▫︎ Perhaps: "f x * (g (t - x))"
HLint examples: examples/RelaxWithNM.hs#L38
Suggestion in .*. in module Main: Redundant bracket ▫︎ Found: "(f x) * (g (t - x))" ▫︎ Perhaps: "(f x) * g (t - x)"
HLint examples: examples/RelaxWithNM.hs#L43
Warning in flow in module Main: Redundant lambda ▫︎ Found: "term1 = \\ t -> initVal * exp (a * t)" ▫︎ Perhaps: "term1 t = initVal * exp (a * t)"
HLint examples: examples/RelaxWithNM.hs#L60
Warning in linearly in module Main: Redundant lambda ▫︎ Found: "linearly (x1, y1) (x2, y2)\n = \\ x -> lerp y1 y2 $ (x - x1) / (x2 - x1)" ▫︎ Perhaps: "linearly (x1, y1) (x2, y2) x = lerp y1 y2 $ (x - x1) / (x2 - x1)"
HLint examples: examples/RelaxWithNM.hs#L100
Suggestion in solve in module Main: Redundant bracket ▫︎ Found: "(maxRelaxIters, within6digitss, (map (timeStep *) [0 .. 199]), \n inits)" ▫︎ Perhaps: "(maxRelaxIters, within6digitss, map (timeStep *) [0 .. 199], inits)"
HLint examples: examples/RelaxWithNM.hs#L115
Suggestion in solve in module Main: Redundant bracket ▫︎ Found: "(bubbleFns t) !! n" ▫︎ Perhaps: "bubbleFns t !! n"
HLint examples: examples/RelaxWithNM.hs#L121
Suggestion in initsParams in module Main: Parenthesize unary negation ▫︎ Found: "- 1.0 / 6.0" ▫︎ Perhaps: "- (1.0 / 6.0)"
HLint examples: examples/RelaxWithNM.hs#L126
Suggestion in dataPoints in module Main: Use map once ▫︎ Found: "map (!! 1) $ map snd $ solve initsParams" ▫︎ Perhaps: "map ((!! 1) . snd) (solve initsParams)"
HLint examples: examples/RelaxWithNM.hs#L129
Suggestion in forFitting in module Main: Use map once ▫︎ Found: "map (!! 1) $ map snd $ solve ips" ▫︎ Perhaps: "map ((!! 1) . snd) (solve ips)"
Build & Test - macos-latest - stack-lts-20.yaml
Failed to restore: Cache service responded with 429
Build & Test - macos-latest - stack-lts-21.yaml
Failed to restore: Cache service responded with 429