Introduce and use EnumSet in DynFlags
[ghc.git] / compiler / ghc.cabal.in
1 -- WARNING: ghc.cabal is automatically generated from ghc.cabal.in by
2 -- ./configure.  Make sure you are editing ghc.cabal.in, not ghc.cabal.
3
4 Name: ghc
5 Version: @ProjectVersionMunged@
6 License: BSD3
7 License-File: ../LICENSE
8 Author: The GHC Team
9 Maintainer: glasgow-haskell-users@haskell.org
10 Homepage: http://www.haskell.org/ghc/
11 Synopsis: The GHC API
12 Description:
13     GHC's functionality can be useful for more things than just
14     compiling Haskell programs. Important use cases are programs
15     that analyse (and perhaps transform) Haskell code. Others
16     include loading Haskell code dynamically in a GHCi-like manner.
17     For this reason, a lot of GHC's functionality is made available
18     through this package.
19 Category: Development
20 Build-Type: Simple
21 Cabal-Version: >=1.10
22
23 Flag ghci
24     Description: Build GHCi support.
25     Default: False
26     Manual: True
27
28 Flag stage1
29     Description: Is this stage 1?
30     Default: False
31     Manual: True
32
33 Flag stage2
34     Description: Is this stage 2?
35     Default: False
36     Manual: True
37
38 Flag stage3
39     Description: Is this stage 3?
40     Default: False
41     Manual: True
42
43 Flag terminfo
44     Description: Build GHC with terminfo support on non-Windows platforms.
45     Default: True
46     Manual: True
47
48 Library
49     Default-Language: Haskell2010
50     Exposed: False
51
52     Build-Depends: base       >= 4   && < 5,
53                    deepseq    >= 1.4 && < 1.5,
54                    directory  >= 1   && < 1.4,
55                    process    >= 1   && < 1.5,
56                    bytestring >= 0.9 && < 0.11,
57                    binary     == 0.8.*,
58                    time       >= 1.4 && < 1.9,
59                    containers >= 0.5 && < 0.6,
60                    array      >= 0.1 && < 0.6,
61                    filepath   >= 1   && < 1.5,
62                    template-haskell == 2.12.*,
63                    hpc        == 0.6.*,
64                    transformers == 0.5.*,
65                    ghc-boot   == @ProjectVersionMunged@,
66                    ghc-boot-th == @ProjectVersionMunged@,
67                    ghci == @ProjectVersionMunged@,
68                    hoopl      >= 3.10.2 && < 3.11
69
70     if os(windows)
71         Build-Depends: Win32  >= 2.3 && < 2.6
72     else
73         if flag(terminfo)
74             Build-Depends: terminfo == 0.4.*
75         Build-Depends: unix   == 2.7.*
76
77     GHC-Options: -Wall -fno-warn-name-shadowing
78
79     if flag(ghci)
80         CPP-Options: -DGHCI
81         Include-Dirs: ../rts/dist/build @FFIIncludeDir@
82
83     Other-Extensions:
84         BangPatterns
85         CPP
86         DataKinds
87         DeriveDataTypeable
88         DeriveFoldable
89         DeriveFunctor
90         DeriveTraversable
91         DisambiguateRecordFields
92         ExplicitForAll
93         FlexibleContexts
94         FlexibleInstances
95         GADTs
96         GeneralizedNewtypeDeriving
97         MagicHash
98         MultiParamTypeClasses
99         NamedFieldPuns
100         NondecreasingIndentation
101         RankNTypes
102         RecordWildCards
103         ScopedTypeVariables
104         StandaloneDeriving
105         Trustworthy
106         TupleSections
107         TypeFamilies
108         TypeSynonymInstances
109         UnboxedTuples
110         UndecidableInstances
111
112     Include-Dirs: . parser utils
113
114     -- We need to set the unit id to ghc (without a version number)
115     -- as it's magic.  But we can't set it for old versions of GHC (e.g.
116     -- when bootstrapping) because those versions of GHC don't understand
117     -- that GHC is wired-in.
118     if impl ( ghc >= 7.11 )
119         GHC-Options: -this-unit-id ghc
120     else
121         if impl( ghc >= 7.9 )
122             GHC-Options: -this-package-key ghc
123
124     if flag(stage1)
125         Include-Dirs: stage1
126     else
127         if flag(stage2)
128             Include-Dirs: stage2
129         else
130             if flag(stage3)
131                 Include-Dirs: stage2
132
133     Install-Includes: HsVersions.h, ghc_boot_platform.h
134
135     c-sources:
136         parser/cutils.c
137         ghci/keepCAFsForGHCi.c
138         cbits/genSym.c
139
140     hs-source-dirs:
141         backpack
142         basicTypes
143         cmm
144         codeGen
145         coreSyn
146         deSugar
147         ghci
148         hsSyn
149         iface
150         llvmGen
151         main
152         nativeGen
153         parser
154         prelude
155         profiling
156         rename
157         simplCore
158         simplStg
159         specialise
160         stgSyn
161         stranal
162         typecheck
163         types
164         utils
165         vectorise
166
167     Exposed-Modules:
168         DriverBkp
169         BkpSyn
170         NameShape
171         RnModIface
172         Avail
173         BasicTypes
174         ConLike
175         DataCon
176         PatSyn
177         Demand
178         Debug
179         Exception
180         FieldLabel
181         GhcMonad
182         Hooks
183         Id
184         IdInfo
185         Lexeme
186         Literal
187         Llvm
188         Llvm.AbsSyn
189         Llvm.MetaData
190         Llvm.PpLlvm
191         Llvm.Types
192         LlvmCodeGen
193         LlvmCodeGen.Base
194         LlvmCodeGen.CodeGen
195         LlvmCodeGen.Data
196         LlvmCodeGen.Ppr
197         LlvmCodeGen.Regs
198         LlvmMangler
199         MkId
200         Module
201         Name
202         NameEnv
203         NameSet
204         OccName
205         RdrName
206         NameCache
207         SrcLoc
208         UniqSupply
209         Unique
210         Var
211         VarEnv
212         VarSet
213         UnVarGraph
214         BlockId
215         CLabel
216         Cmm
217         CmmBuildInfoTables
218         CmmPipeline
219         CmmCallConv
220         CmmCommonBlockElim
221         CmmImplementSwitchPlans
222         CmmContFlowOpt
223         CmmExpr
224         CmmInfo
225         CmmLex
226         CmmLint
227         CmmLive
228         CmmMachOp
229         CmmMonad
230         CmmSwitch
231         CmmNode
232         CmmOpt
233         CmmParse
234         CmmProcPoint
235         CmmSink
236         CmmType
237         CmmUtils
238         CmmLayoutStack
239         EnumSet
240         MkGraph
241         PprBase
242         PprC
243         PprCmm
244         PprCmmDecl
245         PprCmmExpr
246         Bitmap
247         CodeGen.Platform
248         CodeGen.Platform.ARM
249         CodeGen.Platform.ARM64
250         CodeGen.Platform.NoRegs
251         CodeGen.Platform.PPC
252         CodeGen.Platform.PPC_Darwin
253         CodeGen.Platform.SPARC
254         CodeGen.Platform.X86
255         CodeGen.Platform.X86_64
256         CgUtils
257         StgCmm
258         StgCmmBind
259         StgCmmClosure
260         StgCmmCon
261         StgCmmEnv
262         StgCmmExpr
263         StgCmmForeign
264         StgCmmHeap
265         StgCmmHpc
266         StgCmmArgRep
267         StgCmmLayout
268         StgCmmMonad
269         StgCmmPrim
270         StgCmmProf
271         StgCmmTicky
272         StgCmmUtils
273         StgCmmExtCode
274         SMRep
275         CoreArity
276         CoreFVs
277         CoreLint
278         CorePrep
279         CoreSubst
280         CoreSyn
281         TrieMap
282         CoreTidy
283         CoreUnfold
284         CoreUtils
285         CoreSeq
286         CoreStats
287         MkCore
288         PprCore
289         PmExpr
290         TmOracle
291         Check
292         Coverage
293         Desugar
294         DsArrows
295         DsBinds
296         DsCCall
297         DsExpr
298         DsForeign
299         DsGRHSs
300         DsListComp
301         DsMonad
302         DsUsage
303         DsUtils
304         Match
305         MatchCon
306         MatchLit
307         HsBinds
308         HsDecls
309         HsDoc
310         HsExpr
311         HsImpExp
312         HsLit
313         PlaceHolder
314         HsPat
315         HsSyn
316         HsTypes
317         HsUtils
318         HsDumpAst
319         BinIface
320         BinFingerprint
321         BuildTyCl
322         IfaceEnv
323         IfaceSyn
324         IfaceType
325         ToIface
326         LoadIface
327         MkIface
328         TcIface
329         FlagChecker
330         Annotations
331         CmdLineParser
332         CodeOutput
333         Config
334         Constants
335         DriverMkDepend
336         DriverPhases
337         PipelineMonad
338         DriverPipeline
339         DynFlags
340         ErrUtils
341         Finder
342         GHC
343         GhcMake
344         GhcPlugins
345         DynamicLoading
346         HeaderInfo
347         HscMain
348         HscStats
349         HscTypes
350         InteractiveEval
351         InteractiveEvalTypes
352         PackageConfig
353         Packages
354         PlatformConstants
355         Plugins
356         TcPluginM
357         PprTyThing
358         StaticPtrTable
359         SysTools
360         SysTools.Terminal
361         Elf
362         TidyPgm
363         Ctype
364         HaddockUtils
365         Lexer
366         OptCoercion
367         Parser
368         RdrHsSyn
369         ApiAnnotation
370         ForeignCall
371         KnownUniques
372         PrelInfo
373         PrelNames
374         PrelRules
375         PrimOp
376         TysPrim
377         TysWiredIn
378         CostCentre
379         ProfInit
380         SCCfinal
381         RnBinds
382         RnEnv
383         RnExpr
384         RnHsDoc
385         RnNames
386         RnPat
387         RnSource
388         RnSplice
389         RnTypes
390         CoreMonad
391         CSE
392         FloatIn
393         FloatOut
394         LiberateCase
395         OccurAnal
396         SAT
397         SetLevels
398         SimplCore
399         SimplEnv
400         SimplMonad
401         SimplUtils
402         Simplify
403         SimplStg
404         StgStats
405         StgCse
406         UnariseStg
407         RepType
408         Rules
409         SpecConstr
410         Specialise
411         CoreToStg
412         StgLint
413         StgSyn
414         CallArity
415         DmdAnal
416         WorkWrap
417         WwLib
418         FamInst
419         Inst
420         TcAnnotations
421         TcArrows
422         TcBinds
423         TcSigs
424         TcClassDcl
425         TcDefaults
426         TcDeriv
427         TcDerivInfer
428         TcDerivUtils
429         TcEnv
430         TcExpr
431         TcForeign
432         TcGenDeriv
433         TcGenFunctor
434         TcGenGenerics
435         TcHsSyn
436         TcHsType
437         TcInstDcls
438         TcMType
439         TcValidity
440         TcMatches
441         TcPat
442         TcPatSyn
443         TcRnDriver
444         TcBackpack
445         TcRnExports
446         TcRnMonad
447         TcRnTypes
448         TcRules
449         TcSimplify
450         TcErrors
451         TcTyClsDecls
452         TcTyDecls
453         TcTypeable
454         TcType
455         TcEvidence
456         TcUnify
457         TcInteract
458         TcCanonical
459         TcFlatten
460         TcSMonad
461         TcTypeNats
462         TcSplice
463         Class
464         Coercion
465         DsMeta
466         THNames
467         FamInstEnv
468         FunDeps
469         InstEnv
470         TyCon
471         CoAxiom
472         Kind
473         Type
474         TyCoRep
475         Unify
476         Bag
477         Binary
478         BooleanFormula
479         BufWrite
480         Digraph
481         Encoding
482         FastFunctions
483         FastMutInt
484         FastString
485         FastStringEnv
486         Fingerprint
487         FiniteMap
488         FV
489         GraphBase
490         GraphColor
491         GraphOps
492         GraphPpr
493         IOEnv
494         Json
495         ListSetOps
496         ListT
497         Maybes
498         MonadUtils
499         OrdList
500         Outputable
501         Pair
502         Panic
503         Pretty
504         State
505         Stream
506         StringBuffer
507         UniqDFM
508         UniqDSet
509         UniqFM
510         UniqSet
511         Util
512         Vectorise.Builtins.Base
513         Vectorise.Builtins.Initialise
514         Vectorise.Builtins
515         Vectorise.Monad.Base
516         Vectorise.Monad.Naming
517         Vectorise.Monad.Local
518         Vectorise.Monad.Global
519         Vectorise.Monad.InstEnv
520         Vectorise.Monad
521         Vectorise.Utils.Base
522         Vectorise.Utils.Closure
523         Vectorise.Utils.Hoisting
524         Vectorise.Utils.PADict
525         Vectorise.Utils.Poly
526         Vectorise.Utils
527         Vectorise.Generic.Description
528         Vectorise.Generic.PAMethods
529         Vectorise.Generic.PADict
530         Vectorise.Generic.PData
531         Vectorise.Type.Env
532         Vectorise.Type.Type
533         Vectorise.Type.TyConDecl
534         Vectorise.Type.Classify
535         Vectorise.Convert
536         Vectorise.Vect
537         Vectorise.Var
538         Vectorise.Env
539         Vectorise.Exp
540         Vectorise
541         Hoopl.Dataflow
542         Hoopl
543 --        CgInfoTbls used in ghci/DebuggerUtils
544 --        CgHeapery  mkVirtHeapOffsets used in ghci
545
546     Exposed-Modules:
547             AsmCodeGen
548             TargetReg
549             NCGMonad
550             Instruction
551             Format
552             Reg
553             RegClass
554             PIC
555             Platform
556             CPrim
557             X86.Regs
558             X86.RegInfo
559             X86.Instr
560             X86.Cond
561             X86.Ppr
562             X86.CodeGen
563             PPC.Regs
564             PPC.RegInfo
565             PPC.Instr
566             PPC.Cond
567             PPC.Ppr
568             PPC.CodeGen
569             SPARC.Base
570             SPARC.Regs
571             SPARC.Imm
572             SPARC.AddrMode
573             SPARC.Cond
574             SPARC.Instr
575             SPARC.Stack
576             SPARC.ShortcutJump
577             SPARC.Ppr
578             SPARC.CodeGen
579             SPARC.CodeGen.Amode
580             SPARC.CodeGen.Base
581             SPARC.CodeGen.CondCode
582             SPARC.CodeGen.Gen32
583             SPARC.CodeGen.Gen64
584             SPARC.CodeGen.Sanity
585             SPARC.CodeGen.Expand
586             RegAlloc.Liveness
587             RegAlloc.Graph.Main
588             RegAlloc.Graph.Stats
589             RegAlloc.Graph.ArchBase
590             RegAlloc.Graph.ArchX86
591             RegAlloc.Graph.Coalesce
592             RegAlloc.Graph.Spill
593             RegAlloc.Graph.SpillClean
594             RegAlloc.Graph.SpillCost
595             RegAlloc.Graph.TrivColorable
596             RegAlloc.Linear.Main
597             RegAlloc.Linear.JoinToTargets
598             RegAlloc.Linear.State
599             RegAlloc.Linear.Stats
600             RegAlloc.Linear.FreeRegs
601             RegAlloc.Linear.StackMap
602             RegAlloc.Linear.Base
603             RegAlloc.Linear.X86.FreeRegs
604             RegAlloc.Linear.X86_64.FreeRegs
605             RegAlloc.Linear.PPC.FreeRegs
606             RegAlloc.Linear.SPARC.FreeRegs
607             Dwarf
608             Dwarf.Types
609             Dwarf.Constants
610             Convert
611             ByteCodeTypes
612             ByteCodeAsm
613             ByteCodeGen
614             ByteCodeInstr
615             ByteCodeItbls
616             ByteCodeLink
617             Debugger
618             Linker
619             RtClosureInspect
620             DebuggerUtils
621             GHCi
622
623     if !flag(stage1)
624         -- ghc:Serialized moved to ghc-boot:GHC.Serialized.  So for
625         -- compatibility with GHC 7.10 and earlier, we reexport it
626         -- under the old name.
627         reexported-modules:
628             ghc-boot:GHC.Serialized as Serialized