Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Weeder/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,10 @@ mainWithConfig hieExt hieDirectories requireHsFiles weederConfig = handleWeederE
getHieFiles :: String -> [FilePath] -> Bool -> IO [HieFile]
getHieFiles hieExt hieDirectories requireHsFiles = do
let hiePat = "**/*." <> hieExtNoSep
hieExtNoSep = if isExtSeparator (head hieExt) then tail hieExt else hieExt
hieExtNoSep = case uncons hieExt of
Just (c0, hieExtNoSep')
| isExtSeparator c0 -> hieExtNoSep'
_ -> hieExt

hieFilePaths :: [FilePath] <-
concat <$>
Expand Down
4 changes: 2 additions & 2 deletions src/Weeder/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ runWeeder weederConfig@Config{ rootPatterns, typeClassRoots, rootInstances, root
else analyseEvidenceUses rf

analysis1 =
foldl' mappend mempty analyses
Data.Foldable.foldl' mappend mempty analyses

-- Evaluating 'analysis1' first allows us to begin analysis
-- while hieFiles is still being read (since rf depends on all hie files)
Expand Down Expand Up @@ -129,7 +129,7 @@ runWeeder weederConfig@Config{ rootPatterns, typeClassRoots, rootInstances, root
starts <- Map.lookup d ( declarationSites analysis )
let locs = (,) packageName <$> Set.toList starts
guard $ not $ null starts
return [ Map.singleton moduleFilePath ( liftA2 (,) locs (pure d) ) ]
return [ Map.singleton moduleFilePath ( Control.Applicative.liftA2 (,) locs (pure d) ) ]
)
dead

Expand Down
4 changes: 2 additions & 2 deletions weeder.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ library
build-depends:
, algebraic-graphs ^>= 0.7
, async ^>= 2.2.0
, base ^>= 4.17.0.0 || ^>= 4.18.0.0 || ^>= 4.19.0.0 || ^>= 4.20.0.0
, base ^>= 4.17.0.0 || ^>= 4.18.0.0 || ^>= 4.19.0.0 || ^>= 4.20.0.0 || ^>= 4.21.0.0
, bytestring ^>= 0.10.9.0 || ^>= 0.11.0.0 || ^>= 0.12.0.2
, containers ^>= 0.6.2.1 || ^>= 0.7
, directory ^>= 1.3.3.2
, filepath ^>= 1.4.2.1 || ^>= 1.5
, generic-lens ^>= 2.2.0.0
, ghc ^>= 9.4 || ^>= 9.6 || ^>= 9.8 || ^>= 9.10
, ghc ^>= 9.4 || ^>= 9.6 || ^>= 9.8 || ^>= 9.10 || ^>=9.12
, Glob ^>= 0.9 || ^>= 0.10
, lens ^>= 5.1 || ^>= 5.2 || ^>= 5.3
, mtl ^>= 2.2.2 || ^>= 2.3
Expand Down