Commit 4a76b209 authored by Matt Renaud's avatar Matt Renaud
Browse files

Don't write Setup.hs file during cabal init.

When `build-type: Simple` the contents of Setup.hs MUST BE standard. It is only
in advanced cases where a custom setup file is needed.
parent 5392ac8c
......@@ -130,7 +130,6 @@ initCabal verbosity packageDBs repoCtxt comp progdb initFlags = do
case license initFlags' of
Flag PublicDomain -> return ()
_ -> writeLicense initFlags'
writeSetupFile initFlags'
writeChangeLog initFlags'
createDirectories (sourceDirs initFlags')
createLibHs initFlags'
......@@ -861,16 +860,6 @@ getYear = do
(y, _, _) = toGregorian $ localDay l
return y
writeSetupFile :: InitFlags -> IO ()
writeSetupFile flags = do
message flags "Generating Setup.hs..."
writeFileSafe flags "Setup.hs" setupFile
where
setupFile = unlines
[ "import Distribution.Simple"
, "main = defaultMain"
]
writeChangeLog :: InitFlags -> IO ()
writeChangeLog flags = when ((defaultChangeLog `elem`) $ fromMaybe [] (extraSrc flags)) $ do
message flags ("Generating "++ defaultChangeLog ++"...")
......
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