From 9888ff97d6167f9a4b9e1125b71de1d83077d21e Mon Sep 17 00:00:00 2001 From: Matt Renaud Date: Sun, 20 Jan 2019 11:40:32 -0800 Subject: [PATCH] Default to initializing executable when none specified. --- cabal-install/Distribution/Client/Init.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cabal-install/Distribution/Client/Init.hs b/cabal-install/Distribution/Client/Init.hs index 8d43e32b50d..619a58ef246 100644 --- a/cabal-install/Distribution/Client/Init.hs +++ b/cabal-install/Distribution/Client/Init.hs @@ -380,11 +380,11 @@ guessExtraSourceFiles flags = do getLibOrExec :: InitFlags -> IO InitFlags getLibOrExec flags = do pkgType <- return (flagToMaybe $ packageType flags) - ?>> maybePrompt flags (either (const Library) id `fmap` + ?>> maybePrompt flags (either (const Executable) id `fmap` promptList "What does the package build" - [Library, Executable, LibraryAndExecutable] + [Executable, Library, LibraryAndExecutable] Nothing displayPackageType False) - ?>> return (Just Library) + ?>> return (Just Executable) -- If this package contains an executable, get the main file name. mainFile <- if pkgType == Just Library then return Nothing else