compiler: Write .o files atomically. See #14533
[ghc.git] / compiler / ghc.cabal.in
index 1710321..a02ce12 100644 (file)
@@ -2,9 +2,9 @@
 -- ./configure.  Make sure you are editing ghc.cabal.in, not ghc.cabal.
 
 Name: ghc
-Version: @ProjectVersion@
+Version: @ProjectVersionMunged@
 License: BSD3
-License-File: ../LICENSE
+License-File: LICENSE
 Author: The GHC Team
 Maintainer: glasgow-haskell-users@haskell.org
 Homepage: http://www.haskell.org/ghc/
@@ -40,36 +40,74 @@ Flag stage3
     Default: False
     Manual: True
 
+Flag terminfo
+    Description: Build GHC with terminfo support on non-Windows platforms.
+    Default: True
+    Manual: True
+
+Flag integer-simple
+    Description: Use integer-simple
+    Manual: True
+    Default: False
+
+Flag integer-gmp
+    Description: Use integer-gmp
+    Manual: True
+    Default: False
+
 Library
     Default-Language: Haskell2010
     Exposed: False
 
-    Build-Depends: base       >= 4   && < 5,
-                   directory  >= 1   && < 1.3,
-                   process    >= 1   && < 1.5,
+    Build-Depends: base       >= 4.11 && < 4.14,
+                   deepseq    >= 1.4 && < 1.5,
+                   directory  >= 1   && < 1.4,
+                   process    >= 1   && < 1.7,
                    bytestring >= 0.9 && < 0.11,
-                   binary     >= 0.7 && < 0.8,
-                   time                 < 1.6,
-                   containers >= 0.5 && < 0.6,
+                   binary     == 0.8.*,
+                   time       >= 1.4 && < 1.10,
+                   containers >= 0.5 && < 0.7,
                    array      >= 0.1 && < 0.6,
                    filepath   >= 1   && < 1.5,
-                   template-haskell,
-                   hpc,
-                   transformers,
-                   ghc-boot,
-                   hoopl
+                   template-haskell == 2.15.*,
+                   hpc        == 0.6.*,
+                   transformers == 0.5.*,
+                   ghc-boot   == @ProjectVersionMunged@,
+                   ghc-boot-th == @ProjectVersionMunged@,
+                   ghc-heap   == @ProjectVersionMunged@,
+                   ghci == @ProjectVersionMunged@
 
     if os(windows)
-        Build-Depends: Win32
+        Build-Depends: Win32  >= 2.3 && < 2.7
     else
-        Build-Depends: unix
+        if flag(terminfo)
+            Build-Depends: terminfo == 0.4.*
+        Build-Depends: unix   >= 2.7 && < 2.9
 
-    GHC-Options: -Wall -fno-warn-name-shadowing
+    GHC-Options: -Wall
+                 -Wno-name-shadowing
+                 -Wnoncanonical-monad-instances
+                 -Wnoncanonical-monadfail-instances
+                 -Wnoncanonical-monoid-instances
 
     if flag(ghci)
         CPP-Options: -DGHCI
         Include-Dirs: ../rts/dist/build @FFIIncludeDir@
 
+    -- sanity-check to ensure not more than one integer flag is set
+    if flag(integer-gmp) && flag(integer-simple)
+        build-depends: invalid-cabal-flag-settings<0
+
+    -- gmp internals are used by the GHCi debugger if available
+    if flag(integer-gmp)
+        CPP-Options: -DINTEGER_GMP
+        build-depends: integer-gmp >= 1.0.2
+
+    -- simple internals are used by the GHCi debugger if available
+    if flag(integer-simple)
+        CPP-Options: -DINTEGER_SIMPLE
+        build-depends: integer-simple >= 0.1.1.1
+
     Other-Extensions:
         BangPatterns
         CPP
@@ -101,12 +139,9 @@ Library
 
     Include-Dirs: . parser utils
 
-    if impl( ghc >= 7.9 )
-        -- 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.
-        GHC-Options: -this-package-key ghc
+    -- We need to set the unit id to ghc (without a version number)
+    -- as it's magic.
+    GHC-Options: -this-unit-id ghc
 
     if flag(stage1)
         Include-Dirs: stage1
@@ -149,10 +184,29 @@ Library
         typecheck
         types
         utils
-        vectorise
+        hieFile
+
+    -- we use an explicit Prelude
+    Default-Extensions:
+        NoImplicitPrelude
+
+    Other-Modules:
+        GhcPrelude
 
     Exposed-Modules:
+        HieTypes
+        HieDebug
+        HieBin
+        HieUtils
+        HieAst
+        Ar
+        FileCleanup
+        DriverBkp
+        BkpSyn
+        NameShape
+        RnModIface
         Avail
+        AsmUtils
         BasicTypes
         ConLike
         DataCon
@@ -186,6 +240,7 @@ Library
         NameSet
         OccName
         RdrName
+        NameCache
         SrcLoc
         UniqSupply
         Unique
@@ -208,6 +263,7 @@ Library
         CmmLint
         CmmLive
         CmmMachOp
+        CmmMonad
         CmmSwitch
         CmmNode
         CmmOpt
@@ -217,6 +273,7 @@ Library
         CmmType
         CmmUtils
         CmmLayoutStack
+        EnumSet
         MkGraph
         PprBase
         PprC
@@ -229,7 +286,6 @@ Library
         CodeGen.Platform.ARM64
         CodeGen.Platform.NoRegs
         CodeGen.Platform.PPC
-        CodeGen.Platform.PPC_Darwin
         CodeGen.Platform.SPARC
         CodeGen.Platform.X86
         CodeGen.Platform.X86_64
@@ -257,11 +313,13 @@ Library
         CoreLint
         CorePrep
         CoreSubst
+        CoreOpt
         CoreSyn
         TrieMap
         CoreTidy
         CoreUnfold
         CoreUtils
+        CoreMap
         CoreSeq
         CoreStats
         MkCore
@@ -279,7 +337,9 @@ Library
         DsGRHSs
         DsListComp
         DsMonad
+        DsUsage
         DsUtils
+        ExtractDocs
         Match
         MatchCon
         MatchLit
@@ -290,21 +350,25 @@ Library
         HsImpExp
         HsLit
         PlaceHolder
+        HsExtension
+        HsInstances
         HsPat
         HsSyn
         HsTypes
         HsUtils
+        HsDumpAst
         BinIface
+        BinFingerprint
         BuildTyCl
         IfaceEnv
         IfaceSyn
         IfaceType
+        ToIface
         LoadIface
         MkIface
         TcIface
         FlagChecker
         Annotations
-        BreakArray
         CmdLineParser
         CodeOutput
         Config
@@ -332,9 +396,14 @@ Library
         Plugins
         TcPluginM
         PprTyThing
-        StaticFlags
         StaticPtrTable
         SysTools
+        SysTools.BaseDir
+        SysTools.Terminal
+        SysTools.ExtraObj
+        SysTools.Info
+        SysTools.Process
+        SysTools.Tasks
         Elf
         TidyPgm
         Ctype
@@ -345,6 +414,7 @@ Library
         RdrHsSyn
         ApiAnnotation
         ForeignCall
+        KnownUniques
         PrelInfo
         PrelNames
         PrelRules
@@ -352,8 +422,8 @@ Library
         TysPrim
         TysWiredIn
         CostCentre
+        CostCentreState
         ProfInit
-        SCCfinal
         RnBinds
         RnEnv
         RnExpr
@@ -363,6 +433,9 @@ Library
         RnSource
         RnSplice
         RnTypes
+        RnFixity
+        RnUtils
+        RnUnbound
         CoreMonad
         CSE
         FloatIn
@@ -378,29 +451,43 @@ Library
         Simplify
         SimplStg
         StgStats
+        StgCse
+        StgLiftLams
+        StgLiftLams.Analysis
+        StgLiftLams.LiftM
+        StgLiftLams.Transformation
+        StgSubst
         UnariseStg
+        RepType
         Rules
         SpecConstr
         Specialise
         CoreToStg
         StgLint
         StgSyn
+        StgFVs
         CallArity
         DmdAnal
+        Exitify
         WorkWrap
         WwLib
         FamInst
+        ClsInst
         Inst
         TcAnnotations
         TcArrows
         TcBinds
+        TcSigs
         TcClassDcl
         TcDefaults
         TcDeriv
+        TcDerivInfer
+        TcDerivUtils
         TcEnv
         TcExpr
         TcForeign
         TcGenDeriv
+        TcGenFunctor
         TcGenGenerics
         TcHsSyn
         TcHsType
@@ -411,16 +498,20 @@ Library
         TcPat
         TcPatSyn
         TcRnDriver
+        TcBackpack
+        TcRnExports
         TcRnMonad
         TcRnTypes
         TcRules
         TcSimplify
+        TcHoleErrors
         TcErrors
         TcTyClsDecls
         TcTyDecls
         TcTypeable
         TcType
         TcEvidence
+        TcEvTerm
         TcUnify
         TcInteract
         TcCanonical
@@ -439,7 +530,7 @@ Library
         CoAxiom
         Kind
         Type
-        TypeRep
+        TyCoRep
         Unify
         Bag
         Binary
@@ -459,54 +550,31 @@ Library
         GraphOps
         GraphPpr
         IOEnv
+        Json
         ListSetOps
+        ListT
         Maybes
         MonadUtils
         OrdList
         Outputable
         Pair
         Panic
+        PprColour
         Pretty
-        Serialized
         State
         Stream
         StringBuffer
         UniqDFM
         UniqDSet
         UniqFM
+        UniqMap
         UniqSet
         Util
-        Vectorise.Builtins.Base
-        Vectorise.Builtins.Initialise
-        Vectorise.Builtins
-        Vectorise.Monad.Base
-        Vectorise.Monad.Naming
-        Vectorise.Monad.Local
-        Vectorise.Monad.Global
-        Vectorise.Monad.InstEnv
-        Vectorise.Monad
-        Vectorise.Utils.Base
-        Vectorise.Utils.Closure
-        Vectorise.Utils.Hoisting
-        Vectorise.Utils.PADict
-        Vectorise.Utils.Poly
-        Vectorise.Utils
-        Vectorise.Generic.Description
-        Vectorise.Generic.PAMethods
-        Vectorise.Generic.PADict
-        Vectorise.Generic.PData
-        Vectorise.Type.Env
-        Vectorise.Type.Type
-        Vectorise.Type.TyConDecl
-        Vectorise.Type.Classify
-        Vectorise.Convert
-        Vectorise.Vect
-        Vectorise.Var
-        Vectorise.Env
-        Vectorise.Exp
-        Vectorise
+        Hoopl.Block
+        Hoopl.Collections
         Hoopl.Dataflow
-        Hoopl
+        Hoopl.Graph
+        Hoopl.Label
 --        CgInfoTbls used in ghci/DebuggerUtils
 --        CgHeapery  mkVirtHeapOffsets used in ghci
 
@@ -515,6 +583,8 @@ Library
             TargetReg
             NCGMonad
             Instruction
+            BlockLayout
+            CFG
             Format
             Reg
             RegClass
@@ -574,18 +644,14 @@ Library
             Dwarf
             Dwarf.Types
             Dwarf.Constants
-
-    if flag(ghci)
-        Exposed-Modules:
             Convert
+            ByteCodeTypes
             ByteCodeAsm
             ByteCodeGen
             ByteCodeInstr
             ByteCodeItbls
             ByteCodeLink
             Debugger
-            LibFFI
             Linker
-            ObjLink
             RtClosureInspect
-            DebuggerUtils
+            GHCi