Commit 42af3567 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Include signatures in SrcDist

Count signatures as modules that we have to find, and when searching for
modules, look for .hsig or .lhsig files (in addition to the usual .hs
.lhs files)
parent beff9e87
......@@ -156,8 +156,12 @@ listPackageSourcesOrdinary verbosity pkg_descr pps =
[
-- Library sources.
fmap concat
. withAllLib $ \Library { exposedModules = modules, libBuildInfo = libBi } ->
allSourcesBuildInfo libBi pps modules
. withAllLib $ \Library {
exposedModules = modules,
signatures = sigs,
libBuildInfo = libBi
} ->
allSourcesBuildInfo libBi pps (modules ++ sigs)
-- Executables sources.
, fmap concat
......@@ -437,7 +441,7 @@ allSourcesBuildInfo bi pps modules = do
where
nonEmpty x _ [] = x
nonEmpty _ f xs = f xs
suffixes = ppSuffixes pps ++ ["hs", "lhs"]
suffixes = ppSuffixes pps ++ ["hs", "lhs", "hsig", "lhsig"]
notFound m = die $ "Error: Could not find module: " ++ display m
++ " with any suffix: " ++ show suffixes ++ ". If the module "
++ "is autogenerated it should be added to 'autogen-modules'."
......
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