cabalProject :: CabalNew -> FilePath -> Sh (Sh ())
cabalProject config@CabalNew{..} _projectDir = do
    let mainFile = "Main.hs"
        projectExecutable = projectTarget == Executable
    withCommit projectGitLevel "cabal init" $
        cabalInit config
    stubProgram projectGitLevel projectExecutable projectName mainFile
    when (projectTarget == GhcJs) $
        copyDataFile "templates/ghcjs.cabal.config" "cabal.config"
    return $ do
        copyDataFile "templates/ghci" ".ghci"
        unless (projectGitLevel == Gitless) $
            copyDataFile "templates/gitignore" ".gitignore"
        mkdir_p "specs"
        copyDataFile "templates/Specs.hs" "specs/Specs.hs"
        when (projectTarget == Executable) $
            appendTemplate config "templates/executable.cabal.mustache" cabalFile
        appendTemplate config "templates/specs.cabal.mustache" cabalFile
        where cabalFile = FS.decodeString projectName FS.<.> "cabal"
cabalProject :: CabalNew -> FilePath -> Sh (Sh ())
cabalProject config@CabalNew{..} _projectDir = do
    let mainFile = "Main.hs"
        projectExecutable = projectTarget == Executable
    withCommit projectGitLevel "cabal init" $
        cabalInit config
    stubProgram projectGitLevel projectExecutable projectName mainFile
    when (projectTarget == GhcJs) $
        copyDataFile "templates/ghcjs.cabal.config" "cabal.config"
    return $ do
        copyDataFile "templates/ghci" ".ghci"
        unless (projectGitLevel == Gitless) $
            copyDataFile "templates/gitignore" ".gitignore"
        mkdir_p "specs"
        copyDataFile "templates/Specs.hs" "specs/Specs.hs"
        when (projectTarget == Executable) $
            appendTemplate config "templates/executable.cabal.mustache" cabalFile
        appendTemplate config "templates/specs.cabal.mustache" cabalFile
        where cabalFile = FS.decodeString projectName FS.<.> "cabal"
cabalProject config@CabalNew{..} _projectDir = do
    let mainFile = "Main.hs"
        projectExecutable = projectTarget == Executable
    withCommit projectGitLevel "cabal init" $
        cabalInit config
    stubProgram projectGitLevel projectExecutable projectName mainFile
    when (projectTarget == GhcJs) $
        copyDataFile "templates/ghcjs.cabal.config" "cabal.config"
    return $ do
        copyDataFile "templates/ghci" ".ghci"
        unless (projectGitLevel == Gitless) $
            copyDataFile "templates/gitignore" ".gitignore"
        mkdir_p "specs"
        copyDataFile "templates/Specs.hs" "specs/Specs.hs"
        when (projectTarget == Executable) $
            appendTemplate config "templates/executable.cabal.mustache" cabalFile
        appendTemplate config "templates/specs.cabal.mustache" cabalFile
        where cabalFile = FS.decodeString projectName FS.<.> "cabal"