Skip to content

Commit f88a8ad

Browse files
committed
Hopefully fix ghc<8.2 (squash me)
1 parent fcbe835 commit f88a8ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Cabal/Distribution/Types/InstalledPackageInfo/FieldGrammar.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ basicFieldGrammar = mkBasic
288288
-- This can be removed once we stop supporting GHC<8.8, at the
289289
-- condition that we keep marking main libraries as public when
290290
-- registering them.
291-
lv' = if ln' == LMainLibName
291+
MungedPackageName _ mln = n
292+
lv' = if
293+
-- We need to check both because on ghc<8.2 ln' will always
294+
-- be LMainLibName
295+
ln' == LMainLibName && mln == LMainLibName
292296
then LibraryVisibilityPublic
293297
else lv

0 commit comments

Comments
 (0)