File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ findCabalFilesFilePath = do
150150-- Fix for https://github.com/haskell/haskell-language-server/issues/4515
151151findCabalFilesStreaming :: IO [FilePath ]
152152findCabalFilesStreaming = do
153- setRef <- IORef. newIORef S. empty -- stores the directories where we already found 1 cabal file
153+ setRef <- newIORef S. empty -- stores the directories where we already found 1 cabal file
154154 root <- OsPath. getCurrentDirectory
155155 traverse OsPath. decodeFS =<<
156156 OPS. listContentsRecFold
@@ -162,10 +162,10 @@ findCabalFilesStreaming = do
162162 ) -- how to fold this directory and its children, given its path
163163 (\ _ _ (OPS. Relative path) (OPS. Basename fileBasename) _ft -> do
164164 let parentDir = OsPath. takeDirectory path
165- set <- IORef. readIORef setRef
165+ set <- readIORef setRef
166166 if not (S. member parentDir set) && collectPred fileBasename -- if this condition is satisfied
167167 then do
168- IORef. writeIORef setRef $ S. insert parentDir set -- we add the parentDir of this file, to prevent adding more than 1 .cabal file
168+ writeIORef setRef $ S. insert parentDir set -- we add the parentDir of this file, to prevent adding more than 1 .cabal file
169169 pure (Just path) -- True -> then this path will be added to the results (because @path@ is already relative, we no longer need @mkRel@)
170170 else pure Nothing -- False -> else, this path wont be added
171171 )
Original file line number Diff line number Diff line change @@ -12,3 +12,10 @@ extra-deps:
1212- trial-0.0.0.0@sha256:eaefa22bf10b04a9149ef0231cfd5e42ff47534221d4cf4ad3d7653090c54d23,4410
1313- trial-optparse-applicative-0.0.0.0@sha256:3ca376f1361a3b623a52b8db8e178cdca5f2e6e3954d217b874a9af823ab6c06,2540
1414- trial-tomland-0.0.0.0@sha256:5dc32bd4003dc84565170e316576eb7a0c1cea3e8b8b3815d5f509b4a40577fd,2541
15+ - directory-ospath-streaming-0.2.2@sha256:8931b9ce6e63bf6202dc0c992ae3e6f2ad8e7f4b6eb69994ac6d512c6c9c0f77,3410
16+ - Cabal-syntax-3.10.3.0@sha256:c2ca36499bf9365726968b1e11a757e6d846c47cdf0c2c26a003698fd3c300fe,7431
17+ - filepath-1.4.301.0@sha256:02ca59b1c88ef5640db00b38aff713403c1b3481475b529a6fcc4c9f70a293ee,5900
18+ - Cabal-3.10.3.0@sha256:4a36954a66769eef90353daa0dbb07d43e49c228281383c7e4134445d495f714,12313
19+ - directory-1.3.9.0@sha256:2490137bb7738bd79392959458ef5f276219ea5ba8a9a56d3e0b06315c1bb917,3307
20+ - process-1.6.26.1@sha256:6def2e07c317f52f4d30c43e92f97b7bc5f7c27cb1270d386b15dce429e1180f,2947
21+ - unix-2.8.7.0@sha256:1f5f3cf31be1a052ab2d7caebc5185888adeca0c6606c6bc7e45223d09cca9f0,9867
You can’t perform that action at this time.
0 commit comments