Skip to content

Commit

Permalink
Set cabal files to default-language:Haskell2010
Browse files Browse the repository at this point in the history
This is a first step towards eliminating `default-extensions` in favour of
per-file declared `{-# LANGUAGE ... #-}` pragmas.

Signed-off-by: Herbert Valerio Riedel <[email protected]>
  • Loading branch information
hvr committed May 14, 2014
1 parent 0148a1c commit dd92e21
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 35 deletions.
10 changes: 4 additions & 6 deletions compiler/ghc.cabal.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -41,6 +41,7 @@ Flag stage3
Manual: True

Library
Default-Language: Haskell2010
Exposed: False

Build-Depends: base >= 4 && < 5,
Expand Down Expand Up @@ -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

Expand Down
9 changes: 5 additions & 4 deletions ghc/ghc-bin.cabal.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ Category: XXX
Data-Dir: ..
Data-Files: settings
Build-Type: Simple
Cabal-Version: >= 1.2
Cabal-Version: >=1.10

Flag ghci
Description: Build GHCi support.
Default: False
Manual: True

Executable ghc
Default-Language: Haskell2010

Main-Is: Main.hs
Build-Depends: base >= 3 && < 5,
array >= 0.1 && < 0.6,
Expand All @@ -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
16 changes: 8 additions & 8 deletions libraries/bin-package-db/bin-package-db.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ license: BSD3
maintainer: [email protected]
bug-reports: [email protected]
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
12 changes: 6 additions & 6 deletions libraries/integer-simple/integer-simple.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ maintainer: [email protected]
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
type: git
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
}
4 changes: 3 additions & 1 deletion utils/compare_sizes/compareSizes.cabal
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,6 +10,8 @@ description: Size comparison util
category: Development

executable compareSizes
default-language: Haskell2010

build-depends:
base >= 4 && < 5,
directory,
Expand Down
3 changes: 2 additions & 1 deletion utils/dll-split/dll-split.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion utils/ghc-cabal/ghc-cabal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions utils/ghc-pkg/ghc-pkg.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion utils/ghc-pwd/ghc-pwd.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion utils/ghctags/ghctags.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions utils/hpc/hpc-bin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -45,5 +46,5 @@ Executable hpc
containers >= 0.1 && < 0.6,
array >= 0.1 && < 0.6
Build-Depends: hpc
Extensions: CPP
Default-Extensions: CPP

3 changes: 2 additions & 1 deletion utils/mkUserGuidePart/mkUserGuidePart.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion utils/runghc/runghc.cabal.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dd92e21

Please sign in to comment.