diff --git a/cabal-install/Distribution/Client/Init.hs b/cabal-install/Distribution/Client/Init.hs index b6545a5e217..be79adfd7c9 100644 --- a/cabal-install/Distribution/Client/Init.hs +++ b/cabal-install/Distribution/Client/Init.hs @@ -419,9 +419,13 @@ writeCabalFile flags@(InitFlags{packageName = Flag p}) = do -- structure onto a low-level AST structure and use the existing -- pretty-printing code to generate the file. generateCabalFile :: String -> InitFlags -> String -generateCabalFile fileName c = render $ +generateCabalFile fileName c = + renderStyle style { lineLength = 79, ribbonsPerLine = 1.1 } $ (if (minimal c /= Flag True) - then showComment (Just $ fileName ++ " auto-generated by cabal init. For additional options, see http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html#pkg-descr.") + then showComment (Just $ "Initial " ++ fileName ++ " generated by cabal " + ++ "init. For further documentation, see " + ++ "http://haskell.org/cabal/users-guide/") + $$ text "" else empty) $$ vcat [ fieldS "name" (packageName c) @@ -552,7 +556,11 @@ generateCabalFile fileName c = render $ showComment :: Maybe String -> Doc showComment (Just t) = vcat . map text . map ("-- "++) . lines - . render . fsep . map text . words $ t + . renderStyle style { + lineLength = 76, + ribbonsPerLine = 1.05 + } + . fsep . map text . words $ t showComment Nothing = text "" -- | Generate warnings for missing fields etc.