Refactor & modernize `.cabal` to `cabal-version>=1.10`
authorHerbert Valerio Riedel <hvr@gnu.org>
Thu, 24 Oct 2013 08:01:08 +0000 (10:01 +0200)
committerHerbert Valerio Riedel <hvr@gnu.org>
Thu, 24 Oct 2013 08:09:05 +0000 (10:09 +0200)
Updates the `description` include a link to the Haskell wiki and list
potantially used extensions in `other-extensions`.

This also sets proper `build-depends` which effectively tie
`template-haskell` to GHC 7.7/7.8 and thus should help keep
`cabal-install` from attempting to compile the `template-haskell`
package with older/newer GHCs.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
template-haskell.cabal

index 7885a78..ada86b8 100644 (file)
@@ -1,32 +1,56 @@
-name:          template-haskell
-version:       2.9.0.0
+name:           template-haskell
+version:        2.9.0.0
 -- GHC 7.6.1 released with 2.8.0.0
-license:       BSD3
-license-file:  LICENSE
-maintainer:    libraries@haskell.org
-bug-reports: http://hackage.haskell.org/trac/ghc/newticket?component=Template%20Haskell
+license:        BSD3
+license-file:   LICENSE
+category:       Template Haskell
+maintainer:     libraries@haskell.org
+bug-reports:    http://ghc.haskell.org/trac/ghc/newticket?component=Template%20Haskell
+synopsis:       Support library for Template Haskell
+build-type:     Simple
+Cabal-Version:  >= 1.10
 description:
-    Facilities for manipulating Haskell source code using Template Haskell.
-build-type: Simple
-Cabal-Version: >= 1.6
+    This package provides modules containing facilities for manipulating
+    Haskell source code using Template Haskell.
+    .
+    See <http://www.haskell.org/haskellwiki/Template_Haskell> for more
+    information.
+
+source-repository head
+    type:     git
+    location: http://git.haskell.org/packages/template-haskell.git
+
+source-repository this
+    type:     git
+    location: http://git.haskell.org/packages/template-haskell.git
+    tag:      template-haskell-2.9.0.0-release
 
 Library
-    build-depends: base >= 4.5 && < 5,
-                   pretty, containers
+    default-language: Haskell2010
+    other-extensions:
+        DeriveDataTypeable
+        FlexibleInstances
+        MagicHash
+        PolymorphicComponents
+        RankNTypes
+        RoleAnnotations
+        ScopedTypeVariables
+        TemplateHaskell
+        UnboxedTuples
+
     exposed-modules:
-        Language.Haskell.TH.Syntax
-        Language.Haskell.TH.PprLib
-        Language.Haskell.TH.Ppr
+        Language.Haskell.TH
         Language.Haskell.TH.Lib
+        Language.Haskell.TH.Ppr
+        Language.Haskell.TH.PprLib
         Language.Haskell.TH.Quote
-        Language.Haskell.TH
-    extensions: MagicHash, PatternGuards, PolymorphicComponents,
-                DeriveDataTypeable
-    -- We need to set the package name to template-haskell (without a
-    -- version number) as it's magic.
-    ghc-options: -package-name template-haskell
+        Language.Haskell.TH.Syntax
 
-source-repository head
-    type:     git
-    location: http://git.haskell.org/packages/template-haskell.git
+    build-depends:
+        base       == 4.7.*,
+        containers == 0.5.*,
+        pretty     == 1.1.*
 
+    -- We need to set the package name to template-haskell (without a
+    -- version number) as it's magic.
+    ghc-options: -Wall -package-name template-haskell