Skip to content

Commit 45b42f1

Browse files
solborsboom
authored andcommitted
Hpack forward compatibility
1 parent b27e629 commit 45b42f1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Stack/Package.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,11 @@ hpack pkgDir = do
13691369
config <- view configL
13701370
case configOverrideHpack config of
13711371
HpackBundled -> do
1372+
#if MIN_VERSION_hpack(0,23,0)
1373+
r <- liftIO $ Hpack.hpackResult Hpack.defaultRunOptions {Hpack.runOptionsConfigDir = Just (toFilePath pkgDir)} Hpack.NoForce
1374+
#else
13721375
r <- liftIO $ Hpack.hpackResult (Just $ toFilePath pkgDir) Hpack.NoForce
1376+
#endif
13731377
forM_ (Hpack.resultWarnings r) prettyWarnS
13741378
let cabalFile = styleFile . fromString . Hpack.resultCabalFile $ r
13751379
case Hpack.resultStatus r of

0 commit comments

Comments
 (0)