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