Commit 32fbd0b5 authored by Oleg Grenrus's avatar Oleg Grenrus

Add visible field to Library

- for main library default is True
- for named libraries default is False
- remove Monoid Library instance; i'd rather remove emptyLibrary too
  but now these (two?) usages are explicit:
  - creating Library from BuildInfo when merging common stanzas
  - creation of dummy package in `cabal new-repl`
- Documentation is left for Francesco to write
- Field is named `visible` because we have `buildable` and `exposed`
  adjectives. `visibility: True` is unclear.
parent 284de315
......@@ -51,6 +51,8 @@ extra-source-files:
tests/ParserTests/errors/issue-5055.errors
tests/ParserTests/errors/leading-comma.cabal
tests/ParserTests/errors/leading-comma.errors
tests/ParserTests/errors/multiple-libs.cabal
tests/ParserTests/errors/multiple-libs.errors
tests/ParserTests/errors/noVersion.cabal
tests/ParserTests/errors/noVersion.errors
tests/ParserTests/errors/noVersion2.cabal
......@@ -110,6 +112,9 @@ extra-source-files:
tests/ParserTests/regressions/ghc-option-j.check
tests/ParserTests/regressions/haddock-api-2.18.1-check.cabal
tests/ParserTests/regressions/haddock-api-2.18.1-check.check
tests/ParserTests/regressions/hidden-main-lib.cabal
tests/ParserTests/regressions/hidden-main-lib.expr
tests/ParserTests/regressions/hidden-main-lib.format
tests/ParserTests/regressions/issue-5055.cabal
tests/ParserTests/regressions/issue-5055.expr
tests/ParserTests/regressions/issue-5055.format
......@@ -120,6 +125,10 @@ extra-source-files:
tests/ParserTests/regressions/leading-comma.cabal
tests/ParserTests/regressions/leading-comma.expr
tests/ParserTests/regressions/leading-comma.format
tests/ParserTests/regressions/multiple-libs-2.cabal
tests/ParserTests/regressions/multiple-libs-2.check
tests/ParserTests/regressions/multiple-libs-2.expr
tests/ParserTests/regressions/multiple-libs-2.format
tests/ParserTests/regressions/noVersion.cabal
tests/ParserTests/regressions/noVersion.expr
tests/ParserTests/regressions/noVersion.format
......@@ -333,6 +342,7 @@ library
Distribution.Types.Executable
Distribution.Types.ExecutableScope
Distribution.Types.Library
Distribution.Types.LibraryVisibility
Distribution.Types.ForeignLib
Distribution.Types.ForeignLibType
Distribution.Types.ForeignLibOption
......
......@@ -56,6 +56,7 @@ import Distribution.Pretty (prettyShow)
import Distribution.Types.ExecutableScope
import Distribution.Types.ForeignLib
import Distribution.Types.ForeignLibType
import Distribution.Types.LibraryVisibility
import Distribution.Types.UnqualComponentName
import Distribution.Version (anyVersion)
......@@ -122,14 +123,25 @@ packageDescriptionFieldGrammar = PackageDescription
libraryFieldGrammar
:: (FieldGrammar g, Applicative (g Library), Applicative (g BuildInfo))
=> Maybe UnqualComponentName -> g Library Library
=> Maybe UnqualComponentName
-> g Library Library
libraryFieldGrammar n = Library n
<$> monoidalFieldAla "exposed-modules" (alaList' VCat MQuoted) L.exposedModules
<*> monoidalFieldAla "reexported-modules" (alaList CommaVCat) L.reexportedModules
<*> monoidalFieldAla "signatures" (alaList' VCat MQuoted) L.signatures
^^^ availableSince CabalSpecV2_0 []
<*> booleanFieldDef "exposed" L.libExposed True
<*> visibilityField
<*> blurFieldGrammar L.libBuildInfo buildInfoFieldGrammar
where
visibilityField
-- nameless/"main" libraries are public
| isNothing n = pure LibraryVisibilityPublic
-- named libraries have the field
| otherwise =
optionalFieldDef "visibility" L.libVisibility LibraryVisibilityPrivate
^^^ availableSince CabalSpecV3_0 LibraryVisibilityPrivate
{-# SPECIALIZE libraryFieldGrammar :: Maybe UnqualComponentName -> ParsecFieldGrammar' Library #-}
{-# SPECIALIZE libraryFieldGrammar :: Maybe UnqualComponentName -> PrettyFieldGrammar' Library #-}
......
......@@ -62,6 +62,7 @@ import Distribution.Types.Dependency (Dependency)
import Distribution.Types.ForeignLib
import Distribution.Types.ForeignLibType (knownForeignLibTypes)
import Distribution.Types.GenericPackageDescription (emptyGenericPackageDescription)
import Distribution.Types.LibraryVisibility (LibraryVisibility (..))
import Distribution.Types.PackageDescription (specVersion')
import Distribution.Types.UnqualComponentName (UnqualComponentName, mkUnqualComponentName)
import Distribution.Utils.Generic (breakMaybe, unfoldrM, validateUTF8)
......@@ -236,8 +237,9 @@ goSections specVer = traverse_ process
-- we need signature, because this is polymorphic, but not-closed
parseCondTree'
:: FromBuildInfo a
:: L.HasBuildInfo a
=> ParsecFieldGrammar' a -- ^ grammar
-> (BuildInfo -> a)
-> Map String CondTreeBuildInfo -- ^ common stanzas
-> [Field Position]
-> ParseResult (CondTree ConfVar [Dependency] a)
......@@ -251,7 +253,7 @@ goSections specVer = traverse_ process
| name == "common" = do
commonStanzas <- use stateCommonStanzas
name' <- lift $ parseCommonName pos args
biTree <- lift $ parseCondTree' buildInfoFieldGrammar commonStanzas fields
biTree <- lift $ parseCondTree' buildInfoFieldGrammar id commonStanzas fields
case Map.lookup name' commonStanzas of
Nothing -> stateCommonStanzas .= Map.insert name' biTree commonStanzas
......@@ -259,9 +261,13 @@ goSections specVer = traverse_ process
"Duplicate common stanza: " ++ name'
| name == "library" && null args = do
prev <- use $ stateGpd . L.condLibrary
when (isJust prev) $ lift $ parseFailure pos $
"Multiple main libraries; have you forgotten to specify a name for an internal library?"
commonStanzas <- use stateCommonStanzas
lib <- lift $ parseCondTree' (libraryFieldGrammar Nothing) commonStanzas fields
-- TODO: check that library is defined once
lib <- lift $ parseCondTree' (libraryFieldGrammar Nothing) (libraryFromBuildInfo Nothing) commonStanzas fields
stateGpd . L.condLibrary ?= lib
-- Sublibraries
......@@ -269,7 +275,8 @@ goSections specVer = traverse_ process
| name == "library" = do
commonStanzas <- use stateCommonStanzas
name' <- parseUnqualComponentName pos args
lib <- lift $ parseCondTree' (libraryFieldGrammar $ Just name') commonStanzas fields
let name'' = Just name'
lib <- lift $ parseCondTree' (libraryFieldGrammar name'') (libraryFromBuildInfo name'') commonStanzas fields
-- TODO check duplicate name here?
stateGpd . L.condSubLibraries %= snoc (name', lib)
......@@ -277,7 +284,7 @@ goSections specVer = traverse_ process
| name == "foreign-library" = do
commonStanzas <- use stateCommonStanzas
name' <- parseUnqualComponentName pos args
flib <- lift $ parseCondTree' (foreignLibFieldGrammar name') commonStanzas fields
flib <- lift $ parseCondTree' (foreignLibFieldGrammar name') fromBuildInfo' commonStanzas fields
let hasType ts = foreignLibType ts /= foreignLibType mempty
unless (onAllBranches hasType flib) $ lift $ parseFailure pos $ concat
......@@ -294,14 +301,14 @@ goSections specVer = traverse_ process
| name == "executable" = do
commonStanzas <- use stateCommonStanzas
name' <- parseUnqualComponentName pos args
exe <- lift $ parseCondTree' (executableFieldGrammar name') commonStanzas fields
exe <- lift $ parseCondTree' (executableFieldGrammar name') fromBuildInfo' commonStanzas fields
-- TODO check duplicate name here?
stateGpd . L.condExecutables %= snoc (name', exe)
| name == "test-suite" = do
commonStanzas <- use stateCommonStanzas
name' <- parseUnqualComponentName pos args
testStanza <- lift $ parseCondTree' testSuiteFieldGrammar commonStanzas fields
testStanza <- lift $ parseCondTree' testSuiteFieldGrammar fromBuildInfo' commonStanzas fields
testSuite <- lift $ traverse (validateTestSuite pos) testStanza
let hasType ts = testInterface ts /= testInterface mempty
......@@ -319,7 +326,7 @@ goSections specVer = traverse_ process
| name == "benchmark" = do
commonStanzas <- use stateCommonStanzas
name' <- parseUnqualComponentName pos args
benchStanza <- lift $ parseCondTree' benchmarkFieldGrammar commonStanzas fields
benchStanza <- lift $ parseCondTree' benchmarkFieldGrammar fromBuildInfo' commonStanzas fields
bench <- lift $ traverse (validateBenchmark pos) benchStanza
let hasType ts = benchmarkInterface ts /= benchmarkInterface mempty
......@@ -532,27 +539,34 @@ type CondTreeBuildInfo = CondTree ConfVar [Dependency] BuildInfo
--
-- Law: @view buildInfo . fromBuildInfo = id@
class L.HasBuildInfo a => FromBuildInfo a where
fromBuildInfo :: BuildInfo -> a
fromBuildInfo' :: BuildInfo -> a
libraryFromBuildInfo :: Maybe UnqualComponentName -> BuildInfo -> Library
libraryFromBuildInfo n bi = emptyLibrary
{ libName = n
, libVisibility = if isNothing n then LibraryVisibilityPublic else LibraryVisibilityPrivate
, libBuildInfo = bi
}
instance FromBuildInfo BuildInfo where fromBuildInfo = id
instance FromBuildInfo Library where fromBuildInfo bi = set L.buildInfo bi emptyLibrary
instance FromBuildInfo ForeignLib where fromBuildInfo bi = set L.buildInfo bi emptyForeignLib
instance FromBuildInfo Executable where fromBuildInfo bi = set L.buildInfo bi emptyExecutable
instance FromBuildInfo BuildInfo where fromBuildInfo' = id
instance FromBuildInfo ForeignLib where fromBuildInfo' bi = set L.buildInfo bi emptyForeignLib
instance FromBuildInfo Executable where fromBuildInfo' bi = set L.buildInfo bi emptyExecutable
instance FromBuildInfo TestSuiteStanza where
fromBuildInfo = TestSuiteStanza Nothing Nothing Nothing
fromBuildInfo' = TestSuiteStanza Nothing Nothing Nothing
instance FromBuildInfo BenchmarkStanza where
fromBuildInfo = BenchmarkStanza Nothing Nothing Nothing
fromBuildInfo' = BenchmarkStanza Nothing Nothing Nothing
parseCondTreeWithCommonStanzas
:: forall a. FromBuildInfo a
:: forall a. L.HasBuildInfo a
=> CabalSpecVersion
-> ParsecFieldGrammar' a -- ^ grammar
-> (BuildInfo -> a) -- ^ construct fromBuildInfo
-> Map String CondTreeBuildInfo -- ^ common stanzas
-> [Field Position]
-> ParseResult (CondTree ConfVar [Dependency] a)
parseCondTreeWithCommonStanzas v grammar commonStanzas = goImports []
parseCondTreeWithCommonStanzas v grammar fromBuildInfo commonStanzas = goImports []
where
hasElif = specHasElif v
hasCommonStanzas = specHasCommonStanzas v
......@@ -585,14 +599,15 @@ parseCondTreeWithCommonStanzas v grammar commonStanzas = goImports []
go :: [CondTreeBuildInfo] -> [Field Position] -> ParseResult (CondTree ConfVar [Dependency] a)
go bis fields = do
x <- parseCondTree v hasElif grammar (view L.targetBuildDepends) fields
pure $ foldr mergeCommonStanza x bis
pure $ foldr (mergeCommonStanza fromBuildInfo) x bis
mergeCommonStanza
:: forall a. FromBuildInfo a
=> CondTree ConfVar [Dependency] BuildInfo
:: L.HasBuildInfo a
=> (BuildInfo -> a)
-> CondTree ConfVar [Dependency] BuildInfo
-> CondTree ConfVar [Dependency] a
-> CondTree ConfVar [Dependency] a
mergeCommonStanza (CondNode bi _ bis) (CondNode x _ cs) =
mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) =
CondNode x' (x' ^. L.targetBuildDepends) cs'
where
-- new value is old value with buildInfo field _prepended_.
......
......@@ -31,16 +31,17 @@ module Distribution.Simple.Build (
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Types.Dependency
import Distribution.Types.LocalBuildInfo
import Distribution.Types.TargetInfo
import Distribution.Types.ComponentLocalBuildInfo
import Distribution.Types.ComponentRequestedSpec
import Distribution.Types.Dependency
import Distribution.Types.ExecutableScope
import Distribution.Types.ForeignLib
import Distribution.Types.LibraryVisibility
import Distribution.Types.LocalBuildInfo
import Distribution.Types.MungedPackageId
import Distribution.Types.MungedPackageName
import Distribution.Types.TargetInfo
import Distribution.Types.UnqualComponentName
import Distribution.Types.ComponentLocalBuildInfo
import Distribution.Types.ExecutableScope
import Distribution.Package
import Distribution.Backpack
......@@ -458,6 +459,7 @@ testSuiteLibV09AsLibAndExe pkg_descr
reexportedModules = [],
signatures = [],
libExposed = True,
libVisibility = LibraryVisibilityPrivate,
libBuildInfo = bi
}
-- This is, like, the one place where we use a CTestName for a library.
......
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveGeneric #-}
module Distribution.Types.Library (
Library(..),
......@@ -9,13 +9,14 @@ module Distribution.Types.Library (
libModules,
) where
import Prelude ()
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.ModuleName
import Distribution.Types.BuildInfo
import Distribution.Types.LibraryVisibility
import Distribution.Types.ModuleReexport
import Distribution.Types.UnqualComponentName
import Distribution.ModuleName
import qualified Distribution.Types.BuildInfo.Lens as L
......@@ -23,8 +24,9 @@ data Library = Library
{ libName :: Maybe UnqualComponentName
, exposedModules :: [ModuleName]
, reexportedModules :: [ModuleReexport]
, signatures :: [ModuleName] -- ^ What sigs need implementations?
, libExposed :: Bool -- ^ Is the lib to be exposed by default?
, signatures :: [ModuleName] -- ^ What sigs need implementations?
, libExposed :: Bool -- ^ Is the lib to be exposed by default? (i.e. whether its modules available in GHCi for example)
, libVisibility :: LibraryVisibility -- ^ Whether this multilib can be dependent from outside.
, libBuildInfo :: BuildInfo
}
deriving (Generic, Show, Eq, Read, Typeable, Data)
......@@ -36,31 +38,41 @@ instance Binary Library
instance NFData Library where rnf = genericRnf
emptyLibrary :: Library
emptyLibrary = Library
{ libName = mempty
, exposedModules = mempty
, reexportedModules = mempty
, signatures = mempty
, libExposed = True
, libVisibility = mempty
, libBuildInfo = mempty
}
-- | This instance is not good.
--
-- We need it for 'PackageDescription.Configuration.addBuildableCondition'.
-- More correct method would be some kind of "create empty clone".
--
-- More concretely, 'addBuildableCondition' will make `libVisibility = False`
-- libraries when `buildable: false`. This may cause problems.
--
instance Monoid Library where
mempty = Library {
libName = mempty,
exposedModules = mempty,
reexportedModules = mempty,
signatures = mempty,
libExposed = True,
libBuildInfo = mempty
}
mappend = (<>)
mempty = emptyLibrary
mappend = (<>)
instance Semigroup Library where
a <> b = Library {
libName = combine libName,
exposedModules = combine exposedModules,
reexportedModules = combine reexportedModules,
signatures = combine signatures,
libExposed = libExposed a && libExposed b, -- so False propagates
libBuildInfo = combine libBuildInfo
}
a <> b = Library
{ libName = combine libName
, exposedModules = combine exposedModules
, reexportedModules = combine reexportedModules
, signatures = combine signatures
, libExposed = libExposed a && libExposed b -- so False propagates
, libVisibility = combine libVisibility
, libBuildInfo = combine libBuildInfo
}
where combine field = field a `mappend` field b
emptyLibrary :: Library
emptyLibrary = mempty
-- | Get all the module names from the library (exposed and internal modules)
-- which are explicitly listed in the package description which would
-- need to be compiled. (This does not include reexports, which
......
......@@ -3,13 +3,14 @@ module Distribution.Types.Library.Lens (
module Distribution.Types.Library.Lens,
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Compat.Lens
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.ModuleName (ModuleName)
import Distribution.Types.BuildInfo (BuildInfo)
import Distribution.Types.Library (Library)
import Distribution.Types.LibraryVisibility (LibraryVisibility)
import Distribution.Types.ModuleReexport (ModuleReexport)
import Distribution.Types.UnqualComponentName (UnqualComponentName)
......@@ -35,6 +36,10 @@ libExposed :: Lens' Library Bool
libExposed f s = fmap (\x -> s { T.libExposed = x }) (f (T.libExposed s))
{-# INLINE libExposed #-}
libVisibility :: Lens' Library LibraryVisibility
libVisibility f s = fmap (\x -> s { T.libVisibility = x }) (f (T.libVisibility s))
{-# INLINE libVisibility #-}
libBuildInfo :: Lens' Library BuildInfo
libBuildInfo f s = fmap (\x -> s { T.libBuildInfo = x }) (f (T.libBuildInfo s))
{-# INLINE libBuildInfo #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Distribution.Types.LibraryVisibility(
LibraryVisibility(..),
) where
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.Parsec.Class
import Distribution.Pretty
import qualified Distribution.Compat.CharParsing as P
import qualified Text.PrettyPrint as Disp
-- | Multi-lib visibility
--
-- @since 3.0.0.0
--
data LibraryVisibility
-- | Can be depenendent from other packages
= LibraryVisibilityPublic
-- | Internal library, default
| LibraryVisibilityPrivate
deriving (Generic, Show, Read, Eq, Typeable, Data)
instance Pretty LibraryVisibility where
pretty LibraryVisibilityPublic = Disp.text "public"
pretty LibraryVisibilityPrivate = Disp.text "private"
instance Parsec LibraryVisibility where
parsec = do
name <- P.munch1 isAlpha
case name of
"public" -> return LibraryVisibilityPublic
"private" -> return LibraryVisibilityPrivate
_ -> fail $ "Unknown visibility: " ++ name
instance Binary LibraryVisibility
instance NFData LibraryVisibility where rnf = genericRnf
instance Semigroup LibraryVisibility where
LibraryVisibilityPrivate <> LibraryVisibilityPrivate = LibraryVisibilityPrivate
_ <> _ = LibraryVisibilityPublic
instance Monoid LibraryVisibility where
mempty = LibraryVisibilityPrivate
mappend = (<>)
......@@ -1218,6 +1218,16 @@ The library section should contain the following fields:
that use a flat module namespace or where it is known that the
exposed modules would clash with other common modules.
.. pkg-field:: visibility: visibilty specifiers
:since 3.0
:default: ``private`` for internal libraries. Cannot be set for public library.
Cabal recognizes ``public`` and ``private`` here...
Multiple public libraries...
.. pkg-field:: reexported-modules: exportlist
:since: 1.22
......
......@@ -36,6 +36,7 @@ checkTests = testGroup "regressions"
, checkTest "cc-options-with-optimization.cabal"
, checkTest "cxx-options-with-optimization.cabal"
, checkTest "ghc-option-j.cabal"
, checkTest "multiple-libs-2.cabal"
]
checkTest :: FilePath -> TestTree
......
......@@ -31,6 +31,7 @@ import Distribution.Types.ForeignLibOption
import Distribution.Types.ForeignLibType
import Distribution.Types.IncludeRenaming (IncludeRenaming)
import Distribution.Types.LegacyExeDependency
import Distribution.Types.LibraryVisibility (LibraryVisibility)
import Distribution.Types.Mixin
import Distribution.Types.PkgconfigDependency
import Distribution.Types.UnitId (DefUnitId, UnitId)
......@@ -70,6 +71,7 @@ instance ToExpr InstalledPackageInfo
instance ToExpr LegacyExeDependency where toExpr = defaultExprViaShow
instance ToExpr LibVersionInfo where toExpr = defaultExprViaShow
instance ToExpr Library
instance ToExpr LibraryVisibility
instance ToExpr LibraryName
instance ToExpr Mixin where toExpr = defaultExprViaShow
instance ToExpr ModuleName where toExpr = defaultExprViaShow
......
......@@ -10,7 +10,7 @@ import Test.Tasty
import Test.Tasty.Golden.Advanced (goldenTest)
import Test.Tasty.HUnit
import Control.Monad (void)
import Control.Monad (unless, void)
import Data.Algorithm.Diff (Diff (..), getGroupedDiff)
import Data.Maybe (isNothing)
import Distribution.PackageDescription (GenericPackageDescription)
......@@ -28,7 +28,7 @@ import qualified Data.ByteString.Char8 as BS8
import qualified Distribution.InstalledPackageInfo as IPI
#ifdef MIN_VERSION_tree_diff
import Data.TreeDiff (toExpr)
import Data.TreeDiff (ansiWlEditExpr, ediff, toExpr)
import Data.TreeDiff.Golden (ediffGolden)
import Instances.TreeDiff ()
#endif
......@@ -102,6 +102,7 @@ errorTests = testGroup "errors"
, errorTest "issue-5055-2.cabal"
, errorTest "noVersion.cabal"
, errorTest "noVersion2.cabal"
, errorTest "multiple-libs.cabal"
, errorTest "spdx-1.cabal"
, errorTest "spdx-2.cabal"
, errorTest "spdx-3.cabal"
......@@ -132,6 +133,7 @@ regressionTests = testGroup "regressions"
[ regressionTest "encoding-0.8.cabal"
, regressionTest "Octree-0.5.cabal"
, regressionTest "nothing-unicode.cabal"
, regressionTest "multiple-libs-2.cabal"
, regressionTest "issue-774.cabal"
, regressionTest "generics-sop.cabal"
, regressionTest "elif.cabal"
......@@ -147,6 +149,7 @@ regressionTests = testGroup "regressions"
, regressionTest "spdx-1.cabal"
, regressionTest "spdx-2.cabal"
, regressionTest "spdx-3.cabal"
, regressionTest "hidden-main-lib.cabal"
]
regressionTest :: FilePath -> TestTree
......@@ -196,7 +199,21 @@ formatRoundTripTest fp = testCase "roundtrip" $ do
y <- parse (toUTF8BS contents')
-- previously we mangled licenses a bit
let y' = y
assertEqual "re-parsed doesn't match" x y'
unless (x == y') $
#ifdef MIN_VERSION_tree_diff
assertFailure $ unlines
[ "re-parsed doesn't match"
, show $ ansiWlEditExpr $ ediff x y
]
#else
assertFailure $ unlines
[ "re-parsed doesn't match"
, "expected"
, show x
, "actual"
, show y
]
#endif
where
parse :: BS.ByteString -> IO GenericPackageDescription
parse c = do
......
name: multipleLibs
version: 0
synopsis: multiple main/nameless libs
build-type: Simple
cabal-version: 1.20
library
default-language: Haskell2010
exposed-modules: ElseIf
build-depends: base
library
default-language: Haskell2010
exposed-modules: ElseIf
VERSION: Just (mkVersion [1,20])
multiple-libs.cabal:12:1: Multiple main libraries; have you forgotten to specify a name for an internal library?
......@@ -39,7 +39,7 @@ GenericPackageDescription
defaultExtensions = [],
defaultLanguage = Nothing,
extraBundledLibs = [],
extraDynLibFlavours = [],
extraDynLibFlavours = [],
extraFrameworkDirs = [],
extraGHCiLibs = [],
extraLibDirs = [],
......@@ -87,6 +87,7 @@ GenericPackageDescription
virtualModules = []},
libExposed = True,
libName = Nothing,
libVisibility = LibraryVisibilityPublic,
reexportedModules = [],
signatures = []}},
condSubLibraries = [],
......@@ -127,7 +128,7 @@ GenericPackageDescription
defaultExtensions = [],
defaultLanguage = Nothing,
extraBundledLibs = [],
extraDynLibFlavours = [],
extraDynLibFlavours = [],
extraFrameworkDirs = [],
extraGHCiLibs = [],
extraLibDirs = [],
......@@ -217,7 +218,7 @@ GenericPackageDescription
defaultExtensions = [],
defaultLanguage = Nothing,
extraBundledLibs = [],
extraDynLibFlavours = [],
extraDynLibFlavours = [],
extraFrameworkDirs = [],
extraGHCiLibs = [],
extraLibDirs = [],
......
......@@ -29,7 +29,7 @@ GenericPackageDescription
defaultExtensions = [],
defaultLanguage = Just Haskell2010,
extraBundledLibs = [],
extraDynLibFlavours = [],
extraDynLibFlavours = [],
extraFrameworkDirs = [],
extraGHCiLibs = [],
extraLibDirs = [],
......@@ -60,6 +60,7 @@ GenericPackageDescription
virtualModules = []},
libExposed = True,
libName = Nothing,
libVisibility = LibraryVisibilityPublic,
reexportedModules = [],
signatures = []}},
condSubLibraries = [],
......@@ -90,7 +91,7 @@ GenericPackageDescription
defaultExtensions = [],
defaultLanguage = Nothing,
extraBundledLibs = [],
extraDynLibFlavours = [],
extraDynLibFlavours = [],
extraFrameworkDirs = [],
extraGHCiLibs = [],
extraLibDirs = [],
......
......@@ -28,6 +28,16 @@ library
build-depends:
ghc-prim
-- .expr should show libVisible: False
library internal
import: deps
default-language: Haskell2010
exposed-modules: ElseIf2
build-depends:
ghc-prim