ghc.cabal.in 14.1 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 30 31 32
Flag ext-interp
    Description: Support external interpreter
    Default: True
    Manual: True

33 34
Flag stage1
    Description: Is this stage 1?
Ian Lynagh's avatar
Ian Lynagh committed
35
    Default: False
36
    Manual: True
Ian Lynagh's avatar
Ian Lynagh committed
37 38 39 40

Flag stage2
    Description: Is this stage 2?
    Default: False
41
    Manual: True
Ian Lynagh's avatar
Ian Lynagh committed
42 43 44 45

Flag stage3
    Description: Is this stage 3?
    Default: False
46
    Manual: True
47

Rufflewind's avatar
Rufflewind committed
48 49 50 51 52
Flag terminfo
    Description: Build GHC with terminfo support on non-Windows platforms.
    Default: True
    Manual: True

53 54 55 56 57
Flag integer-simple
    Description: Use integer-simple
    Manual: True
    Default: False

58 59 60 61 62
Flag integer-gmp
    Description: Use integer-gmp
    Manual: True
    Default: False

63
Library
64
    Default-Language: Haskell2010
65 66
    Exposed: False

67
    Build-Depends: base       >= 4.11 && < 4.14,
68
                   deepseq    >= 1.4 && < 1.5,
Ben Gamari's avatar
Ben Gamari committed
69
                   directory  >= 1   && < 1.4,
Ben Gamari's avatar
Ben Gamari committed
70
                   process    >= 1   && < 1.7,
Ian Lynagh's avatar
Ian Lynagh committed
71
                   bytestring >= 0.9 && < 0.11,
72
                   binary     == 0.8.*,
Ben Gamari's avatar
Ben Gamari committed
73
                   time       >= 1.4 && < 1.10,
Ben Gamari's avatar
Ben Gamari committed
74
                   containers >= 0.5 && < 0.7,
75
                   array      >= 0.1 && < 0.6,
76
                   filepath   >= 1   && < 1.5,
77
                   template-haskell == 2.15.*,
78 79 80
                   hpc        == 0.6.*,
                   transformers == 0.5.*,
                   ghc-boot   == @ProjectVersionMunged@,
81
                   ghc-boot-th == @ProjectVersionMunged@,
patrickdoc's avatar
patrickdoc committed
82
                   ghc-heap   == @ProjectVersionMunged@,
83
                   ghci == @ProjectVersionMunged@
Ian Lynagh's avatar
Ian Lynagh committed
84

85
    if os(windows)
86
        Build-Depends: Win32  >= 2.3 && < 2.7
87
    else
Rufflewind's avatar
Rufflewind committed
88 89
        if flag(terminfo)
            Build-Depends: terminfo == 0.4.*
90
        Build-Depends: unix   >= 2.7 && < 2.9
91

92 93 94 95
    GHC-Options: -Wall
                 -Wno-name-shadowing
                 -Wnoncanonical-monad-instances
                 -Wnoncanonical-monoid-instances
96 97

    if flag(ghci)
98
        CPP-Options: -DHAVE_INTERNAL_INTERPRETER
99
        Include-Dirs: ../rts/dist/build @FFIIncludeDir@
100

101 102 103 104 105 106
    if flag(ext-interp)
        CPP-Options: -DHAVE_EXTERNAL_INTERPRETER

    if flag(ghci) || flag(ext-interp)
        CPP-Options: -DHAVE_INTERPRETER

107 108 109 110
    -- 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

111 112 113 114 115
    -- 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

116 117 118 119 120
    -- 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

121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
    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
149 150 151

    Include-Dirs: . parser utils

152
    -- We need to set the unit id to ghc (without a version number)
153 154
    -- as it's magic.
    GHC-Options: -this-unit-id ghc
155

156 157 158
    if flag(stage1)
        Include-Dirs: stage1
    else
Ian Lynagh's avatar
Ian Lynagh committed
159 160 161 162 163 164
        if flag(stage2)
            Include-Dirs: stage2
        else
            if flag(stage3)
                Include-Dirs: stage2

165 166 167 168
    Install-Includes: HsVersions.h, ghc_boot_platform.h

    c-sources:
        parser/cutils.c
169
        ghci/keepCAFsForGHCi.c
170
        cbits/genSym.c
171 172

    hs-source-dirs:
Edward Z. Yang's avatar
Edward Z. Yang committed
173
        backpack
174 175 176 177 178 179 180 181
        basicTypes
        cmm
        codeGen
        coreSyn
        deSugar
        ghci
        hsSyn
        iface
182
        llvmGen
183
        main
184
        nativeGen
185 186 187 188 189 190 191 192 193 194 195 196
        parser
        prelude
        profiling
        rename
        simplCore
        simplStg
        specialise
        stgSyn
        stranal
        typecheck
        types
        utils
197
        hieFile
198

199 200 201 202 203 204 205
    -- we use an explicit Prelude
    Default-Extensions:
        NoImplicitPrelude

    Other-Modules:
        GhcPrelude

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

599
    Exposed-Modules:
600
            AsmCodeGen
601 602 603
            TargetReg
            NCGMonad
            Instruction
604 605
            BlockLayout
            CFG
606
            Format
607 608 609
            Reg
            RegClass
            PIC
tibbe's avatar
tibbe committed
610
            CPrim
611
            X86.Regs
612
            X86.RegInfo
613
            X86.Instr
614
            X86.Cond
615
            X86.Ppr
616
            X86.CodeGen
617
            PPC.Regs
618
            PPC.RegInfo
619
            PPC.Instr
620
            PPC.Cond
621
            PPC.Ppr
622
            PPC.CodeGen
623
            SPARC.Base
624
            SPARC.Regs
625
            SPARC.Imm
Simon Marlow's avatar
Simon Marlow committed
626
            SPARC.AddrMode
627
            SPARC.Cond
628
            SPARC.Instr
Simon Marlow's avatar
Simon Marlow committed
629
            SPARC.Stack
630
            SPARC.ShortcutJump
631
            SPARC.Ppr
632
            SPARC.CodeGen
633 634 635 636 637
            SPARC.CodeGen.Amode
            SPARC.CodeGen.Base
            SPARC.CodeGen.CondCode
            SPARC.CodeGen.Gen32
            SPARC.CodeGen.Gen64
638
            SPARC.CodeGen.Sanity
639
            SPARC.CodeGen.Expand
640
            RegAlloc.Liveness
641 642 643 644 645 646 647 648
            RegAlloc.Graph.Main
            RegAlloc.Graph.Stats
            RegAlloc.Graph.ArchBase
            RegAlloc.Graph.ArchX86
            RegAlloc.Graph.Coalesce
            RegAlloc.Graph.Spill
            RegAlloc.Graph.SpillClean
            RegAlloc.Graph.SpillCost
649
            RegAlloc.Graph.TrivColorable
650 651 652 653 654 655 656 657
            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
658
            RegAlloc.Linear.X86_64.FreeRegs
659 660
            RegAlloc.Linear.PPC.FreeRegs
            RegAlloc.Linear.SPARC.FreeRegs
Peter Wortmann's avatar
Peter Wortmann committed
661 662 663
            Dwarf
            Dwarf.Types
            Dwarf.Constants
664
            Convert
665
            ByteCodeTypes
666 667 668 669 670 671
            ByteCodeAsm
            ByteCodeGen
            ByteCodeInstr
            ByteCodeItbls
            ByteCodeLink
            Debugger
672
            LinkerTypes
673 674
            Linker
            RtClosureInspect
675
            GHCi