Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/40e46437b33d3ce9f254ff4be1cb3046c4318b68

>---------------------------------------------------------------

commit 40e46437b33d3ce9f254ff4be1cb3046c4318b68
Author: Duncan Coutts <[email protected]>
Date:   Mon May 16 08:34:29 2011 +0000

    Generate lower case field names in cabal init

>---------------------------------------------------------------

 cabal-install/Distribution/Client/Init.hs |   44 ++++++++++++++--------------
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/cabal-install/Distribution/Client/Init.hs 
b/cabal-install/Distribution/Client/Init.hs
index 429a484..6f68d54 100644
--- a/cabal-install/Distribution/Client/Init.hs
+++ b/cabal-install/Distribution/Client/Init.hs
@@ -403,75 +403,75 @@ generateCabalFile fileName c = render $
     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.";)
     else empty)
   $$
-  vcat [ fieldS "Name"          (packageName   c)
+  vcat [ fieldS "name"          (packageName   c)
                 (Just "The name of the package.")
                 True
 
-       , field  "Version"       (version       c)
+       , field  "version"       (version       c)
                 (Just "The package version.  See the Haskell package 
versioning policy 
(http://www.haskell.org/haskellwiki/Package_versioning_policy) for standards 
guiding when and how versions should be incremented.")
                 True
 
-       , fieldS "Synopsis"      (synopsis      c)
+       , fieldS "synopsis"      (synopsis      c)
                 (Just "A short (one-line) description of the package.")
                 True
 
-       , fieldS "Description"   NoFlag
+       , fieldS "description"   NoFlag
                 (Just "A longer description of the package.")
                 True
 
-       , fieldS "Homepage"      (homepage     c)
+       , fieldS "homepage"      (homepage     c)
                 (Just "URL for the project homepage or repository.")
                 False
 
-       , fieldS "Bug-reports"   NoFlag
+       , fieldS "bug-reports"   NoFlag
                 (Just "A URL where users can report bugs.")
                 False
 
-       , field  "License"       (license      c)
+       , field  "license"       (license      c)
                 (Just "The license under which the package is released.")
                 True
 
-       , fieldS "License-file" (Flag "LICENSE")
+       , fieldS "license-file" (Flag "LICENSE")
                 (Just "The file containing the license text.")
                 True
 
-       , fieldS "Author"        (author       c)
+       , fieldS "author"        (author       c)
                 (Just "The package author(s).")
                 True
 
-       , fieldS "Maintainer"    (email        c)
+       , fieldS "maintainer"    (email        c)
                 (Just "An email address to which users can send suggestions, 
bug reports, and patches.")
                 True
 
-       , fieldS "Copyright"     NoFlag
+       , fieldS "copyright"     NoFlag
                 (Just "A copyright notice.")
                 True
 
-       , fieldS "Category"      (either id display `fmap` category c)
+       , fieldS "category"      (either id display `fmap` category c)
                 Nothing
                 True
 
-       , fieldS "Build-type"    (Flag "Simple")
+       , fieldS "build-type"    (Flag "Simple")
                 Nothing
                 True
 
-       , fieldS "Extra-source-files" NoFlag
+       , fieldS "extra-source-files" NoFlag
                 (Just "Extra files to be distributed with the package, such as 
examples or a README.")
                 True
 
-       , field  "Cabal-version" (Flag $ orLaterVersion (Version [1,2] []))
+       , field  "cabal-version" (Flag $ orLaterVersion (Version [1,2] []))
                 (Just "Constraint on the version of Cabal needed to build this 
package.")
                 False
 
        , case packageType c of
            Flag Executable ->
-             text "\nExecutable" <+> text (fromMaybe "" . flagToMaybe $ 
packageName c) $$ (nest 2 $ vcat
-             [ fieldS "Main-is" NoFlag (Just ".hs or .lhs file containing the 
Main module.") True
+             text "\nexecutable" <+> text (fromMaybe "" . flagToMaybe $ 
packageName c) $$ (nest 2 $ vcat
+             [ fieldS "main-is" NoFlag (Just ".hs or .lhs file containing the 
Main module.") True
 
              , generateBuildInfo c
              ])
-           Flag Library    -> text "\nLibrary" $$ (nest 2 $ vcat
-             [ fieldS "Exposed-modules" (listField (exposedModules c))
+           Flag Library    -> text "\nlibrary" $$ (nest 2 $ vcat
+             [ fieldS "exposed-modules" (listField (exposedModules c))
                       (Just "Modules exported by the library.")
                       True
 
@@ -482,11 +482,11 @@ generateCabalFile fileName c = render $
  where
    generateBuildInfo :: InitFlags -> Doc
    generateBuildInfo c' = vcat
-     [ fieldS "Build-depends" (listField (dependencies c'))
+     [ fieldS "build-depends" (listField (dependencies c'))
               (Just "Packages needed in order to build this package.")
               True
 
-     , fieldS "Other-modules" (listField (otherModules c'))
+     , fieldS "other-modules" (listField (otherModules c'))
               (Just "Modules not exported by this package.")
               True
 
@@ -494,7 +494,7 @@ generateCabalFile fileName c = render $
               (Just "Directories other than the root containing source files.")
               False
 
-     , fieldS "Build-tools" (listFieldS (buildTools c'))
+     , fieldS "build-tools" (listFieldS (buildTools c'))
               (Just "Extra tools (e.g. alex, hsc2hs, ...) needed to build the 
source.")
               True
      ]



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to