Skip to content

Commit 5806ac3

Browse files
authored
Merge pull request #5571 from felixonmars/ghc9
Fix compatibility with GHC 9
2 parents 83b607c + 2283fef commit 5806ac3

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/Stack/Build/Execute.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ withLockedDistDir announce root inner = do
997997
announce $ "still blocking for directory lock on " <>
998998
fromString (toFilePath lockFP) <>
999999
"; maybe another Stack process is running?"
1000-
withCompanion complainer $
1000+
withCompanion (\x -> complainer x) $
10011001
\stopComplaining ->
10021002
withRunInIO $ \run ->
10031003
withFileLock (toFilePath lockFP) Exclusive $ \_ ->

src/Stack/Storage/Project.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ withProjectStorage ::
9393
(HasBuildConfig env, HasLogFunc env)
9494
=> ReaderT SqlBackend (RIO env) a
9595
-> RIO env a
96-
withProjectStorage inner =
97-
flip SQLite.withStorage_ inner =<< view (buildConfigL . to bcProjectStorage . to unProjectStorage)
96+
withProjectStorage inner = do
97+
storage <- view (buildConfigL . to bcProjectStorage . to unProjectStorage)
98+
SQLite.withStorage_ storage inner
9899

99100
-- | Key used to retrieve configuration or flag cache
100101
type ConfigCacheKey = Unique ConfigCacheParent

src/Stack/Storage/User.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ withUserStorage ::
134134
(HasConfig env, HasLogFunc env)
135135
=> ReaderT SqlBackend (RIO env) a
136136
-> RIO env a
137-
withUserStorage inner =
138-
flip SQLite.withStorage_ inner =<< view (configL . to configUserStorage . to unUserStorage)
137+
withUserStorage inner = do
138+
storage <- view (configL . to configUserStorage . to unUserStorage)
139+
SQLite.withStorage_ storage inner
139140

140141
-- | Key used to retrieve the precompiled cache
141142
type PrecompiledCacheKey = Unique PrecompiledCacheParent

0 commit comments

Comments
 (0)