[commit: packages/haskell2010] master: Modernize and refactor `haskell2010.cabal` (e8d3695)

git at git.haskell.org git at git.haskell.org
Sat Oct 26 19:42:08 UTC 2013


Repository : ssh://git@git.haskell.org/haskell2010

On branch  : master
Link       : http://git.haskell.org/packages/haskell2010.git/commitdiff/e8d369591eb7737a3a4fcb8d21983952a0395cd1

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

commit e8d369591eb7737a3a4fcb8d21983952a0395cd1
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sat Oct 26 21:09:04 2013 +0200

    Modernize and refactor `haskell2010.cabal`
    
     - Update to `cabal-version>=0.10`
     - add missing `Setup.hs`
     - add `Prelude` category
     - set proper version constraints
     - order module list according to H2010 report TOC
     - update homepage & bug-reports URL
    
    Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>


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

e8d369591eb7737a3a4fcb8d21983952a0395cd1
 Setup.hs          |    2 +
 haskell2010.cabal |  134 ++++++++++++++++++++++++++++++++---------------------
 2 files changed, 83 insertions(+), 53 deletions(-)

diff --git a/Setup.hs b/Setup.hs
new file mode 100644
index 0000000..9a994af
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/haskell2010.cabal b/haskell2010.cabal
index 8f9dee3..35d10a0 100644
--- a/haskell2010.cabal
+++ b/haskell2010.cabal
@@ -1,69 +1,97 @@
-name:		haskell2010
-version:	1.1.1.1
+name:           haskell2010
+version:        1.1.1.1
 -- GHC 7.6.1 released with 1.1.1.0
-license:	BSD3
-license-file:	LICENSE
-maintainer:	libraries at haskell.org
-bug-reports: http://hackage.haskell.org/trac/ghc/newticket?component=libraries/haskell2010
-synopsis:	Compatibility with Haskell 2010
-category:   Haskell2010
-description:
-        This package provides exactly the library modules defined by
-        the Haskell 2010 standard.
-homepage:	http://www.haskell.org/definition/
+license:        BSD3
+license-file:   LICENSE
+maintainer:     libraries at haskell.org
+bug-reports:    http://ghc.haskell.org/trac/ghc/newticket?component=libraries/haskell2010
+synopsis:       Compatibility with Haskell 2010
+category:       Haskell2010, Prelude
+homepage:       http://www.haskell.org/onlinereport/haskell2010/
 build-type:     Simple
-Cabal-Version: >= 1.6
+Cabal-Version:  >=1.10
+description:
+    This package provides exactly the library modules defined by
+    the <http://www.haskell.org/onlinereport/haskell2010/ Haskell 2010 standard>.
+
+source-repository head
+    type:     git
+    location: http://git.haskell.org/packages/haskell2010.git
+
+source-repository this
+    type:     git
+    location: http://git.haskell.org/packages/haskell2010.git
+    tag:      haskell2010-1.1.1.1-release
 
 Library
-    build-depends:	base >= 4.5 && < 5, array
+    default-language: Haskell2010
+    other-extensions:
+        BangPatterns
+        CPP
+        NoImplicitPrelude
+        Safe
+        Trustworthy
+    if impl(ghc)
+        other-extensions: Safe, Trustworthy
+
+    build-depends:
+        array >= 0.5 && < 0.6,
+        base  >= 4.7 && < 4.8
 
     -- this hack adds a dependency on ghc-prim for Haddock.  The GHC
     -- build system doesn't seem to track transitive dependencies when
     -- running Haddock, and if we don't do this then Haddock can't
     -- find the docs for things defined in ghc-prim.
-    if impl(ghc) {
-       build-depends: ghc-prim
-    }
+    if impl(ghc)
+        build-depends: ghc-prim >= 0.3.1 && < 0.4
+
+    -- haskell2010 is a "hidden" package
+    exposed: False
 
+    -- The modules below are listed in the order they occur in the
+    -- "Haskell 2010 Language Report" table of contents.
     exposed-modules:
-        Data.Array,
-        Data.Char,
-        Data.Complex,
-        System.IO,
-        System.IO.Error,
-        Data.Ix,
-        Data.List,
-        Data.Maybe,
-        Control.Monad,
-        Data.Ratio,
-        System.Environment,
-        System.Exit,
-        Numeric,
-        Prelude,
+        -- chapter 9 "Standard Prelude"
+        -- http://www.haskell.org/onlinereport/haskell2010/haskellch9.html
+        Prelude
 
-        -- FFI modules
-        Data.Int,
-        Data.Word,
-        Data.Bits,
+        -- Part II "The Haskell 2010 Libraries"
+        -- http://www.haskell.org/onlinereport/haskell2010/haskellpa2.html
+        --
+        -- chapter [13..23]
+        Control.Monad
+        Data.Array
+        Data.Bits
+        Data.Char
+        Data.Complex
+        Data.Int
+        Data.Ix
+        Data.List
+        Data.Maybe
+        Data.Ratio
+        Data.Word
 
-        Foreign,
-        Foreign.Ptr,
-        Foreign.ForeignPtr,
-        Foreign.StablePtr,
-        Foreign.Storable,
-        Foreign.C,
-        Foreign.C.Error,
-        Foreign.C.String,
-        Foreign.C.Types,
-        Foreign.Marshal,
-        Foreign.Marshal.Alloc,
-        Foreign.Marshal.Array,
-        Foreign.Marshal.Error,
+        -- FFI modules, chapter [24..37]
+        Foreign
+        Foreign.C
+        Foreign.C.Error
+        Foreign.C.String
+        Foreign.C.Types
+        Foreign.ForeignPtr
+        Foreign.Marshal
+        Foreign.Marshal.Alloc
+        Foreign.Marshal.Array
+        Foreign.Marshal.Error
         Foreign.Marshal.Utils
-    exposed: False
-    extensions: PackageImports, CPP
+        Foreign.Ptr
+        Foreign.StablePtr
+        Foreign.Storable
 
-source-repository head
-    type:     git
-    location: http://git.haskell.org/packages/haskell2010.git
+        -- chapter [38..42]
+        Numeric
+        System.Environment
+        System.Exit
+        System.IO
+        System.IO.Error
 
+    ghc-options: -Wall



More information about the ghc-commits mailing list