Set cabal files to default-language:Haskell2010
authorHerbert Valerio Riedel <hvr@gnu.org>
Wed, 14 May 2014 07:24:10 +0000 (09:24 +0200)
committerHerbert Valerio Riedel <hvr@gnu.org>
Wed, 14 May 2014 08:21:35 +0000 (10:21 +0200)
This is a first step towards eliminating `default-extensions` in favour of
per-file declared `{-# LANGUAGE ... #-}` pragmas.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
13 files changed:
compiler/ghc.cabal.in
ghc/ghc-bin.cabal.in
libraries/bin-package-db/bin-package-db.cabal
libraries/integer-simple/integer-simple.cabal
utils/compare_sizes/compareSizes.cabal
utils/dll-split/dll-split.cabal
utils/ghc-cabal/ghc-cabal.cabal
utils/ghc-pkg/ghc-pkg.cabal
utils/ghc-pwd/ghc-pwd.cabal
utils/ghctags/ghctags.cabal
utils/hpc/hpc-bin.cabal
utils/mkUserGuidePart/mkUserGuidePart.cabal
utils/runghc/runghc.cabal.in

index 1b160ac..9dc7826 100644 (file)
@@ -18,7 +18,7 @@ Description:
     through this package.
 Category: Development
 Build-Type: Simple
-Cabal-Version: >= 1.2.3
+Cabal-Version: >=1.10
 
 Flag ghci
     Description: Build GHCi support.
@@ -41,6 +41,7 @@ Flag stage3
     Manual: True
 
 Library
+    Default-Language: Haskell2010
     Exposed: False
 
     Build-Depends: base       >= 4   && < 5,
@@ -73,13 +74,10 @@ Library
     Build-Depends: bin-package-db
     Build-Depends: hoopl
 
-    Extensions: CPP, MagicHash, UnboxedTuples, PatternGuards,
-                ForeignFunctionInterface, EmptyDataDecls,
+    Default-Extensions: CPP, MagicHash, UnboxedTuples
                 TypeSynonymInstances, MultiParamTypeClasses,
                 FlexibleInstances, RankNTypes, ScopedTypeVariables,
-                DeriveDataTypeable, BangPatterns
-    if impl(ghc >= 7.1)
-        Extensions: NondecreasingIndentation
+                DeriveDataTypeable, BangPatterns, NondecreasingIndentation
 
     Include-Dirs: . parser utils
 
index 68338f3..5b40e25 100644 (file)
@@ -16,7 +16,7 @@ Category: XXX
 Data-Dir: ..
 Data-Files: settings
 Build-Type: Simple
-Cabal-Version: >= 1.2
+Cabal-Version: >=1.10
 
 Flag ghci
     Description: Build GHCi support.
@@ -24,6 +24,8 @@ Flag ghci
     Manual: True
 
 Executable ghc
+    Default-Language: Haskell2010
+
     Main-Is: Main.hs
     Build-Depends: base       >= 3   && < 5,
                    array      >= 0.1 && < 0.6,
@@ -45,10 +47,9 @@ Executable ghc
         GHC-Options: -fno-warn-name-shadowing
         Other-Modules: InteractiveUI, GhciMonad, GhciTags
         Build-Depends: transformers, haskeline
-        Extensions: ForeignFunctionInterface,
-                    UnboxedTuples,
+        Default-Extensions: UnboxedTuples,
                     FlexibleInstances,
                     TupleSections,
                     MagicHash
 
-    Extensions: CPP, PatternGuards, NondecreasingIndentation
+    Default-Extensions: CPP, NondecreasingIndentation
index 44408a7..699a1dd 100644 (file)
@@ -4,22 +4,22 @@ license:        BSD3
 maintainer:     ghc-devs@haskell.org
 bug-reports:    glasgow-haskell-bugs@haskell.org
 synopsis:       A binary format for the package database
-cabal-version:  >=1.6
-build-type: Simple
+cabal-version:  >=1.10
+build-type:     Simple
 
 source-repository head
     type:     git
     location: http://git.haskell.org/ghc.git
     subdir:   libraries/bin-package-db
 
-Library {
+Library
+    default-language: Haskell2010
+
     exposed-modules:
             Distribution.InstalledPackageInfo.Binary
 
-    build-depends: base >= 4 && < 5
-
-    build-depends: binary >= 0.5 && < 0.8,
+    build-depends: base >= 4 && < 5,
+                   binary >= 0.5 && < 0.8,
                    Cabal >= 1.20 && < 1.21
 
-    extensions: CPP
-}
+    default-extensions: CPP
index fa41c24..51d3cc7 100644 (file)
@@ -7,7 +7,7 @@ maintainer:     igloo@earth.li
 synopsis:       Simple Integer library
 description:
     This package contains an simple Integer library.
-cabal-version:  >=1.6
+cabal-version:  >=1.10
 build-type: Simple
 
 source-repository head
@@ -15,17 +15,17 @@ source-repository head
     location: http://git.haskell.org/ghc.git
     subdir:   libraries/integer-simple
 
-Library {
+Library
+    default-language: Haskell2010
+
     build-depends: ghc-prim
     exposed-modules: GHC.Integer
                      GHC.Integer.Simple.Internals
                      GHC.Integer.Logarithms
                      GHC.Integer.Logarithms.Internals
     other-modules: GHC.Integer.Type
-    extensions: CPP, MagicHash, BangPatterns, UnboxedTuples,
-                ForeignFunctionInterface, UnliftedFFITypes,
-                NoImplicitPrelude
+    default-extensions: CPP, MagicHash, BangPatterns, UnboxedTuples,
+                UnliftedFFITypes, NoImplicitPrelude
     -- We need to set the package name to integer-simple
     -- (without a version number) as it's magic.
     ghc-options: -package-name integer-simple -Wall
-}
index 32acb1d..f8f4263 100644 (file)
@@ -1,6 +1,6 @@
 name:                 compareSizes
 version:              0.1.0.0
-cabal-version:        >= 1.6
+cabal-version:        >=1.10
 license:              BSD3
 build-type:           Simple
 license-file:         LICENSE
@@ -10,6 +10,8 @@ description:          Size comparison util
 category:             Development
 
 executable compareSizes
+  default-language: Haskell2010
+
   build-depends:
     base >= 4 && < 5,
     directory,
index bece0a4..290af06 100644 (file)
@@ -10,9 +10,10 @@ Description:
        XXX
 Category: Development
 build-type: Simple
-cabal-version: >=1.2
+cabal-version: >=1.10
 
 Executable dll-split
+    Default-Language: Haskell2010
     Main-Is: Main.hs
 
     Build-Depends: base       >= 4   && < 5,
index 74399ce..0f13b9d 100644 (file)
@@ -10,9 +10,10 @@ Description:
        XXX
 Category: Development
 build-type: Simple
-cabal-version: >=1.2
+cabal-version: >=1.10
 
 Executable ghc-cabal
+    Default-Language: Haskell2010
     Main-Is: ghc-cabal.hs
 
     Build-Depends: base       >= 3   && < 5,
index 2f42e31..265721d 100644 (file)
@@ -11,12 +11,13 @@ Description:
        XXX
 Category: Development
 build-type: Simple
-cabal-version: >=1.4
+cabal-version: >=1.10
 
 Executable ghc-pkg
+    Default-Language: Haskell2010
     Main-Is: Main.hs
     Other-Modules: Version
-    Extensions: CPP, ForeignFunctionInterface, NondecreasingIndentation
+    Default-Extensions: CPP, NondecreasingIndentation
 
     Build-Depends: base       >= 4   && < 5,
                    directory  >= 1   && < 1.3,
index ba2eb63..4d155b0 100644 (file)
@@ -9,9 +9,10 @@ Synopsis: XXX
 Description:
        XXX
 build-type: Simple
-cabal-version: >=1.2
+cabal-version: >=1.10
 
 Executable ghc-pwd
+    Default-Language: Haskell2010
     Main-Is: ghc-pwd.hs
     Build-Depends: base       >= 3   && < 5,
                    directory  >= 1   && < 1.3
index 0e97cca..31e80b2 100644 (file)
@@ -10,9 +10,11 @@ Description:
        XXX
 Category: Development
 build-type: Simple
-cabal-version: >=1.2
+cabal-version: >=1.10
 
 Executable ghctags
+    Default-Language: Haskell2010
+
     Main-Is: Main.hs
 
     Build-Depends: base       >= 4   && < 5,
index 4f94ab0..6d15e8b 100644 (file)
@@ -11,7 +11,7 @@ Description:
        XXX
 Category: Development
 build-type: Simple
-cabal-version: >=1.2
+cabal-version: >=1.10
 
 Flag base4
     Description: Choose the even newer, even smaller, split-up base package.
@@ -20,6 +20,7 @@ Flag base3
     Description: Choose the new smaller, split-up base package.
 
 Executable hpc
+    Default-Language: Haskell2010
     Main-Is: Hpc.hs
     Other-Modules: HpcParser
                    HpcCombine
@@ -45,5 +46,5 @@ Executable hpc
                        containers >= 0.1 && < 0.6,
                        array      >= 0.1 && < 0.6
     Build-Depends: hpc
-    Extensions: CPP
+    Default-Extensions: CPP
 
index 3cadaac..112bbf6 100644 (file)
@@ -9,9 +9,10 @@ Synopsis: XXX
 Description:
        XXX
 build-type: Simple
-cabal-version: >=1.2
+cabal-version: >=1.10
 
 Executable mkUserGuidePart
+    Default-Language: Haskell2010
     Main-Is: Main.hs
     Build-Depends: base       >= 3   && < 5,
                    ghc
index f9cbacc..fde6b9a 100644 (file)
@@ -10,12 +10,13 @@ Description:
        XXX
 Category: Development
 build-type: Simple
-cabal-version: >=1.2
+cabal-version: >=1.10
 
 Flag base3
     Description: Choose the new smaller, split-up base package.
 
 Executable runghc
+    Default-Language: Haskell2010
     Main-Is: runghc.hs
 
     if flag(base3)