ghc.cabal.in 13.5 KB
Newer Older
Ian Lynagh's avatar
Ian Lynagh committed
1 2 3
-- WARNING: ghc.cabal is automatically generated from ghc.cabal.in by
-- ./configure.  Make sure you are editing ghc.cabal.in, not ghc.cabal.

4
Name: ghc
5
Version: @ProjectVersionMunged@
6
License: BSD3
7
License-File: ../LICENSE
8
Author: The GHC Team
9 10
Maintainer: glasgow-haskell-users@haskell.org
Homepage: http://www.haskell.org/ghc/
11
Synopsis: The GHC API
12
Description:
13 14 15 16 17 18 19
    GHC's functionality can be useful for more things than just
    compiling Haskell programs. Important use cases are programs
    that analyse (and perhaps transform) Haskell code. Others
    include loading Haskell code dynamically in a GHCi-like manner.
    For this reason, a lot of GHC's functionality is made available
    through this package.
Category: Development
20
Build-Type: Simple
21
Cabal-Version: >=1.10
22 23 24

Flag ghci
    Description: Build GHCi support.
25 26
    Default: False
    Manual: True
27 28 29

Flag stage1
    Description: Is this stage 1?
Ian Lynagh's avatar
Ian Lynagh committed
30
    Default: False
31
    Manual: True
Ian Lynagh's avatar
Ian Lynagh committed
32 33 34 35

Flag stage2
    Description: Is this stage 2?
    Default: False
36
    Manual: True
Ian Lynagh's avatar
Ian Lynagh committed
37 38 39 40

Flag stage3
    Description: Is this stage 3?
    Default: False
41
    Manual: True
42

Rufflewind's avatar
Rufflewind committed
43 44 45 46 47
Flag terminfo
    Description: Build GHC with terminfo support on non-Windows platforms.
    Default: True
    Manual: True

48
Library
49
    Default-Language: Haskell2010
50 51
    Exposed: False

Ian Lynagh's avatar
Ian Lynagh committed
52
    Build-Depends: base       >= 4   && < 5,
53
                   deepseq    >= 1.4 && < 1.5,
Ben Gamari's avatar
Ben Gamari committed
54
                   directory  >= 1   && < 1.4,
55
                   process    >= 1   && < 1.5,
Ian Lynagh's avatar
Ian Lynagh committed
56
                   bytestring >= 0.9 && < 0.11,
57
                   binary     == 0.8.*,
58
                   time       >= 1.4 && < 1.7,
Joachim Breitner's avatar
Joachim Breitner committed
59
                   containers >= 0.5 && < 0.6,
60
                   array      >= 0.1 && < 0.6,
61
                   filepath   >= 1   && < 1.5,
62
                   template-haskell == 2.12.*,
63 64 65
                   hpc        == 0.6.*,
                   transformers == 0.5.*,
                   ghc-boot   == @ProjectVersionMunged@,
66
                   ghc-boot-th == @ProjectVersionMunged@,
67
                   hoopl      >= 3.10.2 && < 3.11
Ian Lynagh's avatar
Ian Lynagh committed
68

69
    if os(windows)
70
        Build-Depends: Win32  == 2.3.*
71
    else
Rufflewind's avatar
Rufflewind committed
72 73
        if flag(terminfo)
            Build-Depends: terminfo == 0.4.*
74
        Build-Depends: unix   == 2.7.*
75

76
    if flag(ghci)
77
        Build-Depends: ghci == @ProjectVersionMunged@
78

79
    GHC-Options: -Wall -fno-warn-name-shadowing
80 81 82

    if flag(ghci)
        CPP-Options: -DGHCI
83
        Include-Dirs: ../rts/dist/build @FFIIncludeDir@
84

85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
    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
113 114 115

    Include-Dirs: . parser utils

116 117 118 119 120 121 122 123 124
    -- 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
125

126 127 128
    if flag(stage1)
        Include-Dirs: stage1
    else
Ian Lynagh's avatar
Ian Lynagh committed
129 130 131 132 133 134
        if flag(stage2)
            Include-Dirs: stage2
        else
            if flag(stage3)
                Include-Dirs: stage2

135 136 137 138
    Install-Includes: HsVersions.h, ghc_boot_platform.h

    c-sources:
        parser/cutils.c
139
        ghci/keepCAFsForGHCi.c
140
        cbits/genSym.c
141 142

    hs-source-dirs:
Edward Z. Yang's avatar
Edward Z. Yang committed
143
        backpack
144 145 146 147 148 149 150 151
        basicTypes
        cmm
        codeGen
        coreSyn
        deSugar
        ghci
        hsSyn
        iface
152
        llvmGen
153
        main
154
        nativeGen
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
        parser
        prelude
        profiling
        rename
        simplCore
        simplStg
        specialise
        stgSyn
        stranal
        typecheck
        types
        utils
        vectorise

    Exposed-Modules:
Edward Z. Yang's avatar
Edward Z. Yang committed
170 171 172 173
        DriverBkp
        BkpSyn
        NameShape
        RnModIface
174
        Avail
175
        BasicTypes
cactus's avatar
cactus committed
176
        ConLike
177
        DataCon
cactus's avatar
cactus committed
178
        PatSyn
179
        Demand
180
        Debug
181
        Exception
182
        FieldLabel
183
        GhcMonad
184
        Hooks
185 186
        Id
        IdInfo
187
        Lexeme
188
        Literal
189 190
        Llvm
        Llvm.AbsSyn
191
        Llvm.MetaData
192 193 194 195 196 197 198 199
        Llvm.PpLlvm
        Llvm.Types
        LlvmCodeGen
        LlvmCodeGen.Base
        LlvmCodeGen.CodeGen
        LlvmCodeGen.Data
        LlvmCodeGen.Ppr
        LlvmCodeGen.Regs
200
        LlvmMangler
201 202 203 204 205 206 207
        MkId
        Module
        Name
        NameEnv
        NameSet
        OccName
        RdrName
208
        NameCache
209 210 211 212 213 214
        SrcLoc
        UniqSupply
        Unique
        Var
        VarEnv
        VarSet
Joachim Breitner's avatar
Joachim Breitner committed
215
        UnVarGraph
216 217 218
        BlockId
        CLabel
        Cmm
219
        CmmBuildInfoTables
220
        CmmPipeline
221
        CmmCallConv
222
        CmmCommonBlockElim
223
        CmmImplementSwitchPlans
224 225 226 227 228 229
        CmmContFlowOpt
        CmmExpr
        CmmInfo
        CmmLex
        CmmLint
        CmmLive
230
        CmmMachOp
231
        CmmMonad
232
        CmmSwitch
233
        CmmNode
234 235 236
        CmmOpt
        CmmParse
        CmmProcPoint
237
        CmmSink
238
        CmmType
239
        CmmUtils
Simon Marlow's avatar
Simon Marlow committed
240
        CmmLayoutStack
241
        MkGraph
242
        PprBase
243 244
        PprC
        PprCmm
245 246
        PprCmmDecl
        PprCmmExpr
247
        Bitmap
248
        CodeGen.Platform
249
        CodeGen.Platform.ARM
250
        CodeGen.Platform.ARM64
251 252 253 254 255 256
        CodeGen.Platform.NoRegs
        CodeGen.Platform.PPC
        CodeGen.Platform.PPC_Darwin
        CodeGen.Platform.SPARC
        CodeGen.Platform.X86
        CodeGen.Platform.X86_64
257
        CgUtils
258 259 260 261 262 263 264 265 266
        StgCmm
        StgCmmBind
        StgCmmClosure
        StgCmmCon
        StgCmmEnv
        StgCmmExpr
        StgCmmForeign
        StgCmmHeap
        StgCmmHpc
nfrisby's avatar
nfrisby committed
267
        StgCmmArgRep
268 269 270 271 272 273
        StgCmmLayout
        StgCmmMonad
        StgCmmPrim
        StgCmmProf
        StgCmmTicky
        StgCmmUtils
274
        StgCmmExtCode
275
        SMRep
276
        CoreArity
277 278 279 280 281
        CoreFVs
        CoreLint
        CorePrep
        CoreSubst
        CoreSyn
Simon Peyton Jones's avatar
Simon Peyton Jones committed
282
        TrieMap
283 284 285
        CoreTidy
        CoreUnfold
        CoreUtils
286
        CoreSeq
287
        CoreStats
288
        MkCore
289
        PprCore
290 291
        PmExpr
        TmOracle
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312
        Check
        Coverage
        Desugar
        DsArrows
        DsBinds
        DsCCall
        DsExpr
        DsForeign
        DsGRHSs
        DsListComp
        DsMonad
        DsUtils
        Match
        MatchCon
        MatchLit
        HsBinds
        HsDecls
        HsDoc
        HsExpr
        HsImpExp
        HsLit
313
        PlaceHolder
314 315 316 317 318
        HsPat
        HsSyn
        HsTypes
        HsUtils
        BinIface
319
        BinFingerprint
320 321 322 323
        BuildTyCl
        IfaceEnv
        IfaceSyn
        IfaceType
Ben Gamari's avatar
Ben Gamari committed
324
        ToIface
325 326 327
        LoadIface
        MkIface
        TcIface
328
        FlagChecker
329
        Annotations
330 331 332 333 334 335
        CmdLineParser
        CodeOutput
        Config
        Constants
        DriverMkDepend
        DriverPhases
336
        PipelineMonad
337 338 339 340 341
        DriverPipeline
        DynFlags
        ErrUtils
        Finder
        GHC
342
        GhcMake
343 344
        GhcPlugins
        DynamicLoading
345 346 347 348 349
        HeaderInfo
        HscMain
        HscStats
        HscTypes
        InteractiveEval
350
        InteractiveEvalTypes
351 352
        PackageConfig
        Packages
353
        PlatformConstants
Adam Gundry's avatar
Adam Gundry committed
354 355
        Plugins
        TcPluginM
356 357
        PprTyThing
        StaticFlags
358
        StaticPtrTable
359
        SysTools
360
        SysTools.Terminal
361
        Elf
362 363 364 365
        TidyPgm
        Ctype
        HaddockUtils
        Lexer
366
        OptCoercion
367 368
        Parser
        RdrHsSyn
Alan Zimmerman's avatar
Alan Zimmerman committed
369
        ApiAnnotation
370
        ForeignCall
371
        KnownUniques
372 373 374 375 376 377 378
        PrelInfo
        PrelNames
        PrelRules
        PrimOp
        TysPrim
        TysWiredIn
        CostCentre
379
        ProfInit
380 381 382 383 384 385 386 387
        SCCfinal
        RnBinds
        RnEnv
        RnExpr
        RnHsDoc
        RnNames
        RnPat
        RnSource
388
        RnSplice
389
        RnTypes
390
        CoreMonad
391 392 393 394 395 396 397 398 399 400 401 402 403 404
        CSE
        FloatIn
        FloatOut
        LiberateCase
        OccurAnal
        SAT
        SetLevels
        SimplCore
        SimplEnv
        SimplMonad
        SimplUtils
        Simplify
        SimplStg
        StgStats
405
        UnariseStg
406
        RepType
407 408 409 410 411 412
        Rules
        SpecConstr
        Specialise
        CoreToStg
        StgLint
        StgSyn
413
        CallArity
414 415 416 417 418
        DmdAnal
        WorkWrap
        WwLib
        FamInst
        Inst
419
        TcAnnotations
420 421
        TcArrows
        TcBinds
422
        TcSigs
423 424 425
        TcClassDcl
        TcDefaults
        TcDeriv
Ryan Scott's avatar
Ryan Scott committed
426 427
        TcDerivInfer
        TcDerivUtils
428 429 430 431
        TcEnv
        TcExpr
        TcForeign
        TcGenDeriv
Ryan Scott's avatar
Ryan Scott committed
432
        TcGenFunctor
433
        TcGenGenerics
434 435 436 437
        TcHsSyn
        TcHsType
        TcInstDcls
        TcMType
438
        TcValidity
439 440
        TcMatches
        TcPat
cactus's avatar
cactus committed
441
        TcPatSyn
442
        TcRnDriver
Edward Z. Yang's avatar
Edward Z. Yang committed
443
        TcBackpack
444
        TcRnExports
445 446 447 448
        TcRnMonad
        TcRnTypes
        TcRules
        TcSimplify
449
        TcErrors
450 451
        TcTyClsDecls
        TcTyDecls
452
        TcTypeable
453
        TcType
454
        TcEvidence
455
        TcUnify
456 457
        TcInteract
        TcCanonical
458
        TcFlatten
459
        TcSMonad
460
        TcTypeNats
461
        TcSplice
462 463
        Class
        Coercion
464 465
        DsMeta
        THNames
466 467 468 469
        FamInstEnv
        FunDeps
        InstEnv
        TyCon
470
        CoAxiom
471
        Kind
472
        Type
473
        TyCoRep
474 475 476
        Unify
        Bag
        Binary
477
        BooleanFormula
478 479 480 481 482 483
        BufWrite
        Digraph
        Encoding
        FastFunctions
        FastMutInt
        FastString
484
        FastStringEnv
485 486
        Fingerprint
        FiniteMap
487
        FV
488 489 490 491 492 493
        GraphBase
        GraphColor
        GraphOps
        GraphPpr
        IOEnv
        ListSetOps
494
        ListT
495 496 497 498
        Maybes
        MonadUtils
        OrdList
        Outputable
499
        Pair
500 501 502
        Panic
        Pretty
        State
503
        Stream
504
        StringBuffer
505
        UniqDFM
506 507
        UniqDSet
        UniqFM
508 509
        UniqSet
        Util
510
        Vectorise.Builtins.Base
511 512 513 514 515 516 517 518
        Vectorise.Builtins.Initialise
        Vectorise.Builtins
        Vectorise.Monad.Base
        Vectorise.Monad.Naming
        Vectorise.Monad.Local
        Vectorise.Monad.Global
        Vectorise.Monad.InstEnv
        Vectorise.Monad
519 520 521 522 523 524
        Vectorise.Utils.Base
        Vectorise.Utils.Closure
        Vectorise.Utils.Hoisting
        Vectorise.Utils.PADict
        Vectorise.Utils.Poly
        Vectorise.Utils
525 526 527
        Vectorise.Generic.Description
        Vectorise.Generic.PAMethods
        Vectorise.Generic.PADict
528
        Vectorise.Generic.PData
529 530 531 532 533 534 535 536 537
        Vectorise.Type.Env
        Vectorise.Type.Type
        Vectorise.Type.TyConDecl
        Vectorise.Type.Classify
        Vectorise.Convert
        Vectorise.Vect
        Vectorise.Var
        Vectorise.Env
        Vectorise.Exp
538
        Vectorise
Simon Marlow's avatar
Simon Marlow committed
539 540
        Hoopl.Dataflow
        Hoopl
Simon Marlow's avatar
Simon Marlow committed
541 542 543
--        CgInfoTbls used in ghci/DebuggerUtils
--        CgHeapery  mkVirtHeapOffsets used in ghci

544
    Exposed-Modules:
545
            AsmCodeGen
546 547 548
            TargetReg
            NCGMonad
            Instruction
549
            Format
550 551 552 553
            Reg
            RegClass
            PIC
            Platform
tibbe's avatar
tibbe committed
554
            CPrim
555
            X86.Regs
556
            X86.RegInfo
557
            X86.Instr
558
            X86.Cond
559
            X86.Ppr
560
            X86.CodeGen
561
            PPC.Regs
562
            PPC.RegInfo
563
            PPC.Instr
564
            PPC.Cond
565
            PPC.Ppr
566
            PPC.CodeGen
567
            SPARC.Base
568
            SPARC.Regs
569
            SPARC.Imm
Simon Marlow's avatar
Simon Marlow committed
570
            SPARC.AddrMode
571
            SPARC.Cond
572
            SPARC.Instr
Simon Marlow's avatar
Simon Marlow committed
573
            SPARC.Stack
574
            SPARC.ShortcutJump
575
            SPARC.Ppr
576
            SPARC.CodeGen
577 578 579 580 581
            SPARC.CodeGen.Amode
            SPARC.CodeGen.Base
            SPARC.CodeGen.CondCode
            SPARC.CodeGen.Gen32
            SPARC.CodeGen.Gen64
582
            SPARC.CodeGen.Sanity
583
            SPARC.CodeGen.Expand
584
            RegAlloc.Liveness
585 586 587 588 589 590 591 592
            RegAlloc.Graph.Main
            RegAlloc.Graph.Stats
            RegAlloc.Graph.ArchBase
            RegAlloc.Graph.ArchX86
            RegAlloc.Graph.Coalesce
            RegAlloc.Graph.Spill
            RegAlloc.Graph.SpillClean
            RegAlloc.Graph.SpillCost
593
            RegAlloc.Graph.TrivColorable
594 595 596 597 598 599 600 601
            RegAlloc.Linear.Main
            RegAlloc.Linear.JoinToTargets
            RegAlloc.Linear.State
            RegAlloc.Linear.Stats
            RegAlloc.Linear.FreeRegs
            RegAlloc.Linear.StackMap
            RegAlloc.Linear.Base
            RegAlloc.Linear.X86.FreeRegs
ian@well-typed.com's avatar
ian@well-typed.com committed
602
            RegAlloc.Linear.X86_64.FreeRegs
603 604
            RegAlloc.Linear.PPC.FreeRegs
            RegAlloc.Linear.SPARC.FreeRegs
Peter Wortmann's avatar
Peter Wortmann committed
605 606 607
            Dwarf
            Dwarf.Types
            Dwarf.Constants
608

609 610 611 612 613 614 615
    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

616 617 618
    if flag(ghci)
        Exposed-Modules:
            Convert
619
            ByteCodeTypes
620 621 622 623 624 625 626 627
            ByteCodeAsm
            ByteCodeGen
            ByteCodeInstr
            ByteCodeItbls
            ByteCodeLink
            Debugger
            Linker
            RtClosureInspect
628
            DebuggerUtils
629
            GHCi