Commit 7d0e840e authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Include .hs-boot files into the sdist tarball

Tested using Agda which uses several .hs-boot files.
parent 2236045c
......@@ -73,6 +73,7 @@ import Control.Exception (finally)
import Control.Monad(when, unless)
import Data.Char (isSpace, toLower)
import Data.List (partition, isPrefixOf)
import Data.Maybe (catMaybes)
import System.Time (getClockTime, toCalendarTime, CalendarTime(..))
import System.Directory (doesFileExist, doesDirectoryExist,
......@@ -237,8 +238,13 @@ prepareDir verbosity inPref pps modules bi
in findFileWithExtension suffixes (hsSourceDirs bi) file
>>= maybe (notFound module_) return
| module_ <- modules ++ otherModules bi ]
bootFiles <- sequence
[ let file = dotToSep module_
in findFileWithExtension ["hs-boot"] (hsSourceDirs bi) file
| module_ <- modules ++ otherModules bi ]
copyFiles verbosity inPref (zip (repeat []) (sources ++ cSources bi))
let allSources = sources ++ catMaybes bootFiles ++ cSources bi
copyFiles verbosity inPref (zip (repeat []) allSources)
where suffixes = ppSuffixes pps ++ ["hs", "lhs"]
notFound m = die $ "Error: Could not find module: " ++ m
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