Commit fbbb5f6e authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Lift the restriction that libraries must have exposed-modules

This allows libs that have only private modules or C code. This
might be used to make libs that have non-exposed modules and only
export C APIs. It could also be used to make packages that consist
only of C code. That might be useful for bindings where it may
make sense to split the C and Haskell code into separate packages.
parent 716d3a18
...@@ -189,11 +189,7 @@ checkLibrary :: Library -> [PackageCheck] ...@@ -189,11 +189,7 @@ checkLibrary :: Library -> [PackageCheck]
checkLibrary lib = checkLibrary lib =
catMaybes [ catMaybes [
check (buildable (libBuildInfo lib) && null (exposedModules lib)) $ check (not (null moduleDuplicates)) $
PackageBuildImpossible
"A library was specified, but no 'exposed-modules' list has been given."
, check (not (null moduleDuplicates)) $
PackageBuildWarning $ PackageBuildWarning $
"Duplicate modules in library: " ++ commaSep moduleDuplicates "Duplicate modules in library: " ++ commaSep moduleDuplicates
] ]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment