The Backpack patch.
[ghc.git] / compiler / ghc.cabal.in
index cf105a0..67f0aa6 100644 (file)
@@ -2,7 +2,7 @@
 -- ./configure.  Make sure you are editing ghc.cabal.in, not ghc.cabal.
 
 Name: ghc
-Version: @ProjectVersion@
+Version: @ProjectVersionMunged@
 License: BSD3
 License-File: ../LICENSE
 Author: The GHC Team
@@ -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,48 +41,81 @@ Flag stage3
     Manual: True
 
 Library
+    Default-Language: Haskell2010
     Exposed: False
 
     Build-Depends: base       >= 4   && < 5,
+                   deepseq    >= 1.4 && < 1.5,
                    directory  >= 1   && < 1.3,
-                   process    >= 1   && < 1.3,
+                   process    >= 1   && < 1.5,
                    bytestring >= 0.9 && < 0.11,
-                   time                 < 1.5,
-                   containers >= 0.1 && < 0.6,
-                   array      >= 0.1 && < 0.5,
-                   filepath   >= 1   && < 1.4,
-                   Cabal,
-                   hpc,
-                   transformers
-
-    if flag(stage1) && impl(ghc < 7.5)
-        Build-Depends: old-time   >= 1   && < 1.2
+                   binary     == 0.8.*,
+                   time       >= 1.4 && < 1.7,
+                   containers >= 0.5 && < 0.6,
+                   array      >= 0.1 && < 0.6,
+                   filepath   >= 1   && < 1.5,
+                   template-haskell == 2.11.*,
+                   hpc        == 0.6.*,
+                   transformers == 0.5.*,
+                   ghc-boot   == @ProjectVersionMunged@,
+                   ghc-boot-th == @ProjectVersionMunged@,
+                   hoopl      >= 3.10.2 && < 3.11
 
     if os(windows)
-        Build-Depends: Win32
+        Build-Depends: Win32  == 2.3.*
     else
-        Build-Depends: unix
+        Build-Depends: unix   == 2.7.*
+
+    if flag(ghci)
+        Build-Depends: ghci == @ProjectVersionMunged@
 
     GHC-Options: -Wall -fno-warn-name-shadowing
 
     if flag(ghci)
-        Build-Depends: template-haskell
         CPP-Options: -DGHCI
-        Include-Dirs: ../rts/dist/build
+        Include-Dirs: ../rts/dist/build @FFIIncludeDir@
 
-    Build-Depends: bin-package-db
-    Build-Depends: hoopl
-
-    Extensions: CPP, MagicHash, UnboxedTuples, PatternGuards,
-                ForeignFunctionInterface, EmptyDataDecls,
-                TypeSynonymInstances, MultiParamTypeClasses,
-                FlexibleInstances, RankNTypes, ScopedTypeVariables,
-                DeriveDataTypeable, BangPatterns
-    if impl(ghc >= 7.1)
-        Extensions: NondecreasingIndentation
+    Other-Extensions:
+        BangPatterns
+        CPP
+        DataKinds
+        DeriveDataTypeable
+        DeriveFoldable
+        DeriveFunctor
+        DeriveTraversable
+        DisambiguateRecordFields
+        ExplicitForAll
+        FlexibleContexts
+        FlexibleInstances
+        GADTs
+        GeneralizedNewtypeDeriving
+        MagicHash
+        MultiParamTypeClasses
+        NamedFieldPuns
+        NondecreasingIndentation
+        RankNTypes
+        RecordWildCards
+        ScopedTypeVariables
+        StandaloneDeriving
+        Trustworthy
+        TupleSections
+        TypeFamilies
+        TypeSynonymInstances
+        UnboxedTuples
+        UndecidableInstances
 
     Include-Dirs: . parser utils
 
+    -- We need to set the unit id to ghc (without a version number)
+    -- as it's magic.  But we can't set it for old versions of GHC (e.g.
+    -- when bootstrapping) because those versions of GHC don't understand
+    -- that GHC is wired-in.
+    if impl ( ghc >= 7.11 )
+        GHC-Options: -this-unit-id ghc
+    else
+        if impl( ghc >= 7.9 )
+            GHC-Options: -this-package-key ghc
+
     if flag(stage1)
         Include-Dirs: stage1
     else
@@ -96,11 +129,11 @@ Library
 
     c-sources:
         parser/cutils.c
-
-    c-sources:
         ghci/keepCAFsForGHCi.c
+        cbits/genSym.c
 
     hs-source-dirs:
+        backpack
         basicTypes
         cmm
         codeGen
@@ -127,17 +160,28 @@ Library
         vectorise
 
     Exposed-Modules:
+        DriverBkp
+        BkpSyn
+        NameShape
+        RnModIface
         Avail
         BasicTypes
+        ConLike
         DataCon
+        PatSyn
         Demand
+        Debug
         Exception
+        FieldLabel
         GhcMonad
+        Hooks
         Id
         IdInfo
+        Lexeme
         Literal
         Llvm
         Llvm.AbsSyn
+        Llvm.MetaData
         Llvm.PpLlvm
         Llvm.Types
         LlvmCodeGen
@@ -160,6 +204,7 @@ Library
         Var
         VarEnv
         VarSet
+        UnVarGraph
         BlockId
         CLabel
         Cmm
@@ -167,6 +212,7 @@ Library
         CmmPipeline
         CmmCallConv
         CmmCommonBlockElim
+        CmmImplementSwitchPlans
         CmmContFlowOpt
         CmmExpr
         CmmInfo
@@ -174,11 +220,12 @@ Library
         CmmLint
         CmmLive
         CmmMachOp
+        CmmMonad
+        CmmSwitch
         CmmNode
         CmmOpt
         CmmParse
         CmmProcPoint
-        CmmRewriteAssignments
         CmmSink
         CmmType
         CmmUtils
@@ -192,6 +239,7 @@ Library
         Bitmap
         CodeGen.Platform
         CodeGen.Platform.ARM
+        CodeGen.Platform.ARM64
         CodeGen.Platform.NoRegs
         CodeGen.Platform.PPC
         CodeGen.Platform.PPC_Darwin
@@ -206,7 +254,6 @@ Library
         StgCmmEnv
         StgCmmExpr
         StgCmmForeign
-        StgCmmGran
         StgCmmHeap
         StgCmmHpc
         StgCmmArgRep
@@ -228,11 +275,12 @@ Library
         CoreTidy
         CoreUnfold
         CoreUtils
-        ExternalCore
+        CoreSeq
+        CoreStats
         MkCore
-        MkExternalCore
         PprCore
-        PprExternalCore
+        PmExpr
+        TmOracle
         Check
         Coverage
         Desugar
@@ -254,6 +302,7 @@ Library
         HsExpr
         HsImpExp
         HsLit
+        PlaceHolder
         HsPat
         HsSyn
         HsTypes
@@ -268,13 +317,13 @@ Library
         TcIface
         FlagChecker
         Annotations
-        BreakArray
         CmdLineParser
         CodeOutput
         Config
         Constants
         DriverMkDepend
         DriverPhases
+        PipelineMonad
         DriverPipeline
         DynFlags
         ErrUtils
@@ -288,22 +337,25 @@ Library
         HscStats
         HscTypes
         InteractiveEval
+        InteractiveEvalTypes
         PackageConfig
         Packages
         PlatformConstants
+        Plugins
+        TcPluginM
         PprTyThing
         StaticFlags
+        StaticPtrTable
         SysTools
+        Elf
         TidyPgm
         Ctype
         HaddockUtils
-        LexCore
         Lexer
         OptCoercion
         Parser
-        ParserCore
-        ParserCoreUtils
         RdrHsSyn
+        ApiAnnotation
         ForeignCall
         PrelInfo
         PrelNames
@@ -321,6 +373,7 @@ Library
         RnNames
         RnPat
         RnSource
+        RnSplice
         RnTypes
         CoreMonad
         CSE
@@ -338,12 +391,14 @@ Library
         SimplStg
         StgStats
         UnariseStg
+        RepType
         Rules
         SpecConstr
         Specialise
         CoreToStg
         StgLint
         StgSyn
+        CallArity
         DmdAnal
         WorkWrap
         WwLib
@@ -352,13 +407,17 @@ Library
         TcAnnotations
         TcArrows
         TcBinds
+        TcSigs
         TcClassDcl
         TcDefaults
         TcDeriv
+        TcDerivInfer
+        TcDerivUtils
         TcEnv
         TcExpr
         TcForeign
         TcGenDeriv
+        TcGenFunctor
         TcGenGenerics
         TcHsSyn
         TcHsType
@@ -367,7 +426,9 @@ Library
         TcValidity
         TcMatches
         TcPat
+        TcPatSyn
         TcRnDriver
+        TcBackpack
         TcRnMonad
         TcRnTypes
         TcRules
@@ -375,14 +436,20 @@ Library
         TcErrors
         TcTyClsDecls
         TcTyDecls
+        TcTypeable
         TcType
         TcEvidence
         TcUnify
         TcInteract
         TcCanonical
+        TcFlatten
         TcSMonad
+        TcTypeNats
+        TcSplice
         Class
         Coercion
+        DsMeta
+        THNames
         FamInstEnv
         FunDeps
         InstEnv
@@ -390,20 +457,21 @@ Library
         CoAxiom
         Kind
         Type
-        TypeRep
+        TyCoRep
         Unify
         Bag
         Binary
+        BooleanFormula
         BufWrite
         Digraph
         Encoding
-        FastBool
         FastFunctions
         FastMutInt
         FastString
-        FastTypes
+        FastStringEnv
         Fingerprint
         FiniteMap
+        FV
         GraphBase
         GraphColor
         GraphOps
@@ -417,10 +485,11 @@ Library
         Pair
         Panic
         Pretty
-        Serialized
         State
         Stream
         StringBuffer
+        UniqDFM
+        UniqDSet
         UniqFM
         UniqSet
         Util
@@ -455,7 +524,6 @@ Library
         Vectorise
         Hoopl.Dataflow
         Hoopl
-
 --        CgInfoTbls used in ghci/DebuggerUtils
 --        CgHeapery  mkVirtHeapOffsets used in ghci
 
@@ -464,7 +532,7 @@ Library
             TargetReg
             NCGMonad
             Instruction
-            Size
+            Format
             Reg
             RegClass
             PIC
@@ -520,20 +588,28 @@ Library
             RegAlloc.Linear.X86_64.FreeRegs
             RegAlloc.Linear.PPC.FreeRegs
             RegAlloc.Linear.SPARC.FreeRegs
+            Dwarf
+            Dwarf.Types
+            Dwarf.Constants
+
+    if !flag(stage1)
+        -- ghc:Serialized moved to ghc-boot:GHC.Serialized.  So for
+        -- compatibility with GHC 7.10 and earlier, we reexport it
+        -- under the old name.
+        reexported-modules:
+            ghc-boot:GHC.Serialized as Serialized
 
     if flag(ghci)
         Exposed-Modules:
-            DsMeta
-            TcSplice
             Convert
+            ByteCodeTypes
             ByteCodeAsm
             ByteCodeGen
             ByteCodeInstr
             ByteCodeItbls
             ByteCodeLink
             Debugger
-            LibFFI
             Linker
-            ObjLink
             RtClosureInspect
             DebuggerUtils
+            GHCi