Minor refactoring
[ghc-hetmet.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.2.3
22
23 Flag base4
24     Description: Choose the even newer, even smaller, split-up base package.
25
26 Flag base3
27     Description: Choose the new smaller, split-up base package.
28
29 Flag dynlibs
30     Description: Dynamic library support
31     Default: False
32     Manual: True
33
34 Flag ghci
35     Description: Build GHCi support.
36     Default: False
37     Manual: True
38
39 Flag ncg
40     Description: Build the NCG.
41     Default: False
42     Manual: True
43
44 Flag stage1
45     Description: Is this stage 1?
46     Default: False
47
48 Flag stage2
49     Description: Is this stage 2?
50     Default: False
51
52 Flag stage3
53     Description: Is this stage 3?
54     Default: False
55
56 Library
57     Exposed: False
58
59     if flag(base4)
60         Build-Depends: base       >= 4   && < 5
61     if flag(base3)
62         Build-Depends: base       >= 3   && < 4
63     if !flag(base3) && !flag(base4)
64         Build-Depends: base       < 3
65
66     if flag(base3) || flag(base4)
67         Build-Depends: directory  >= 1   && < 1.1,
68                        process    >= 1   && < 1.1,
69                        bytestring >= 0.9 && < 0.10,
70                        old-time   >= 1   && < 1.1,
71                        containers >= 0.1 && < 0.4,
72                        array      >= 0.1 && < 0.4
73
74     Build-Depends: filepath >= 1 && < 1.2
75     Build-Depends: Cabal, hpc
76     if os(windows)
77         Build-Depends: Win32
78     else
79         Build-Depends: unix
80
81     GHC-Options: -Wall -fno-warn-name-shadowing -fno-warn-orphans
82
83     if flag(ghci)
84         Build-Depends: template-haskell
85         CPP-Options: -DGHCI
86         Include-Dirs: ../libffi/build/include
87
88     if !flag(ncg)
89         CPP-Options: -DOMIT_NATIVE_CODEGEN
90
91     Build-Depends: bin-package-db
92
93     -- GHC 6.4.2 needs to be able to find WCsubst.c, which needs to be
94     -- able to find WCsubst.h
95     Include-Dirs: ../libraries/base/cbits, ../libraries/base/include
96
97     Extensions: CPP, MagicHash, UnboxedTuples, PatternGuards,
98                 ForeignFunctionInterface, EmptyDataDecls,
99                 TypeSynonymInstances, MultiParamTypeClasses,
100                 FlexibleInstances, Rank2Types, ScopedTypeVariables,
101                 DeriveDataTypeable, RelaxedPolyRec
102
103     Include-Dirs: . parser utils
104
105     if flag(stage1)
106         Include-Dirs: stage1
107         if impl(ghc < 6.9)
108             Build-Depends: extensible-exceptions
109             Extensions: PatternSignatures
110     else
111         if flag(stage2)
112             Include-Dirs: stage2
113         else
114             if flag(stage3)
115                 Include-Dirs: stage2
116
117     Install-Includes: HsVersions.h, ghc_boot_platform.h
118
119     c-sources:
120         parser/cutils.c
121         utils/md5.c
122
123     if flag(dynlibs)
124         c-sources:
125             ghci/keepCAFsForGHCi.c
126
127     hs-source-dirs:
128         basicTypes
129         cmm
130         codeGen
131         coreSyn
132         cprAnalysis
133         deSugar
134         ghci
135         hsSyn
136         iface
137         main
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         BasicTypes
154         DataCon
155         Demand
156         Exception
157         Id
158         IdInfo
159         Literal
160         MkId
161         Module
162         Name
163         NameEnv
164         NameSet
165         NewDemand
166         OccName
167         RdrName
168         SrcLoc
169         UniqSupply
170         Unique
171         Var
172         VarEnv
173         VarSet
174         BlockId
175         CLabel
176         Cmm
177         CmmBrokenBlock
178         CmmBuildInfoTables
179         CmmCPS
180         CmmCPSGen
181         CmmCPSZ
182         CmmCallConv
183         CmmCommonBlockElimZ
184         CmmContFlowOpt
185         CmmCvt
186         CmmExpr
187         CmmInfo
188         CmmLex
189         CmmLint
190         CmmLive
191         CmmLiveZ
192         CmmOpt
193         CmmParse
194         CmmProcPoint
195         CmmProcPointZ
196         CmmSpillReload
197         CmmStackLayout
198         CmmTx
199         CmmUtils
200         CmmZipUtil
201         DFMonad
202         Dataflow
203         MkZipCfg
204         MkZipCfgCmm
205         OptimizationFuel
206         PprC
207         PprCmm
208         PprCmmZ
209         StackColor
210         StackPlacements
211         ZipCfg
212         ZipCfgCmmRep
213         ZipCfgExtras
214         ZipDataflow
215         Bitmap
216         CgBindery
217         CgCallConv
218         CgCase
219         CgClosure
220         CgCon
221         CgExpr
222         CgForeignCall
223         CgHeapery
224         CgHpc
225         CgInfoTbls
226         CgLetNoEscape
227         CgMonad
228         CgParallel
229         CgPrimOp
230         CgProf
231         CgStackery
232         CgTailCall
233         CgTicky
234         CgUtils
235         StgCmm
236         StgCmmBind
237         StgCmmClosure
238         StgCmmCon
239         StgCmmEnv
240         StgCmmExpr
241         StgCmmForeign
242         StgCmmGran
243         StgCmmHeap
244         StgCmmHpc
245         StgCmmLayout
246         StgCmmMonad
247         StgCmmPrim
248         StgCmmProf
249         StgCmmTicky
250         StgCmmUtils
251         ClosureInfo
252         CodeGen
253         SMRep
254         CoreArity
255         CoreFVs
256         CoreLint
257         CorePrep
258         CoreSubst
259         CoreSyn
260         CoreTidy
261         CoreUnfold
262         CoreUtils
263         ExternalCore
264         MkCore
265         MkExternalCore
266         PprCore
267         PprExternalCore
268         CprAnalyse
269         Check
270         Coverage
271         Desugar
272         DsArrows
273         DsBinds
274         DsCCall
275         DsExpr
276         DsForeign
277         DsGRHSs
278         DsListComp
279         DsMonad
280         DsUtils
281         Match
282         MatchCon
283         MatchLit
284         HsBinds
285         HsDecls
286         HsDoc
287         HsExpr
288         HsImpExp
289         HsLit
290         HsPat
291         HsSyn
292         HsTypes
293         HsUtils
294         BinIface
295         BuildTyCl
296         IfaceEnv
297         IfaceSyn
298         IfaceType
299         LoadIface
300         MkIface
301         TcIface
302         Annotations
303         BreakArray
304         CmdLineParser
305         CodeOutput
306         Config
307         Constants
308         DriverMkDepend
309         DriverPhases
310         DriverPipeline
311         DynFlags
312         ErrUtils
313         Finder
314         GHC
315         HeaderInfo
316         HscMain
317         HscStats
318         HscTypes
319         InteractiveEval
320         PackageConfig
321         Packages
322         PprTyThing
323         StaticFlags
324         StaticFlagParser
325         SysTools
326         TidyPgm
327         Ctype
328         HaddockUtils
329         LexCore
330         Lexer
331         Parser
332         ParserCore
333         ParserCoreUtils
334         RdrHsSyn
335         ForeignCall
336         PrelInfo
337         PrelNames
338         PrelRules
339         PrimOp
340         TysPrim
341         TysWiredIn
342         CostCentre
343         SCCfinal
344         RnBinds
345         RnEnv
346         RnExpr
347         RnHsDoc
348         RnHsSyn
349         RnNames
350         RnPat
351         RnSource
352         RnTypes
353         CoreMonad
354         CSE
355         FloatIn
356         FloatOut
357         LiberateCase
358         OccurAnal
359         SAT
360         SetLevels
361         SimplCore
362         SimplEnv
363         SimplMonad
364         SimplUtils
365         Simplify
366         SRT
367         SimplStg
368         StgStats
369         Rules
370         SpecConstr
371         Specialise
372         CoreToStg
373         StgLint
374         StgSyn
375         DmdAnal
376         SaAbsInt
377         SaLib
378         StrictAnal
379         WorkWrap
380         WwLib
381         FamInst
382         Inst
383         TcAnnotations
384         TcArrows
385         TcBinds
386         TcClassDcl
387         TcDefaults
388         TcDeriv
389         TcEnv
390         TcExpr
391         TcForeign
392         TcGenDeriv
393         TcHsSyn
394         TcHsType
395         TcInstDcls
396         TcMType
397         TcMatches
398         TcPat
399         TcRnDriver
400         TcRnMonad
401         TcRnTypes
402         TcRules
403         TcSimplify
404         TcTyClsDecls
405         TcTyDecls
406         TcTyFuns
407         TcType
408         TcUnify
409         Class
410         Coercion
411         FamInstEnv
412         FunDeps
413         Generics
414         InstEnv
415         TyCon
416         Type
417         TypeRep
418         Unify
419         Bag
420         Binary
421         BufWrite
422         Digraph
423         Encoding
424         FastBool
425         FastFunctions
426         FastMutInt
427         FastString
428         FastTypes
429         Fingerprint
430         FiniteMap
431         GraphBase
432         GraphColor
433         GraphOps
434         GraphPpr
435         IOEnv
436         Interval
437         LazyUniqFM
438         ListSetOps
439         Maybes
440         MonadUtils
441         OrdList
442         Outputable
443         Panic
444         Pretty
445         Serialized
446         State
447         StringBuffer
448         UniqFM
449         UniqSet
450         Util
451         VectBuiltIn
452         VectCore
453         VectMonad
454         VectType
455         VectUtils
456         Vectorise
457
458     if flag(ncg)
459         hs-source-dirs:
460             nativeGen
461
462         Exposed-Modules:
463             AsmCodeGen
464             TargetReg
465             NCGMonad
466             Instruction
467             Size
468             Reg
469             RegClass
470             PprBase
471             PIC
472             Platform
473             Alpha.Regs
474             Alpha.RegInfo
475             Alpha.Instr
476             Alpha.CodeGen
477             X86.Regs
478             X86.RegInfo
479             X86.Instr
480             X86.Cond
481             X86.Ppr
482             X86.CodeGen
483             PPC.Regs
484             PPC.RegInfo
485             PPC.Instr
486             PPC.Cond
487             PPC.Ppr
488             PPC.CodeGen
489             SPARC.Base
490             SPARC.Regs
491             SPARC.RegPlate
492             SPARC.Imm
493             SPARC.AddrMode
494             SPARC.Cond
495             SPARC.Instr
496             SPARC.Stack
497             SPARC.ShortcutJump
498             SPARC.Ppr
499             SPARC.CodeGen
500             SPARC.CodeGen.Amode
501             SPARC.CodeGen.Base
502             SPARC.CodeGen.CCall
503             SPARC.CodeGen.CondCode
504             SPARC.CodeGen.Gen32
505             SPARC.CodeGen.Gen64
506             SPARC.CodeGen.Sanity
507             SPARC.CodeGen.Expand
508             RegAlloc.Liveness
509             RegAlloc.Graph.Main
510             RegAlloc.Graph.Stats
511             RegAlloc.Graph.ArchBase
512             RegAlloc.Graph.ArchX86
513             RegAlloc.Graph.Coalesce
514             RegAlloc.Graph.Spill
515             RegAlloc.Graph.SpillClean
516             RegAlloc.Graph.SpillCost
517             RegAlloc.Graph.TrivColorable
518             RegAlloc.Linear.Main
519             RegAlloc.Linear.JoinToTargets
520             RegAlloc.Linear.State
521             RegAlloc.Linear.Stats
522             RegAlloc.Linear.FreeRegs
523             RegAlloc.Linear.StackMap
524             RegAlloc.Linear.Base
525             RegAlloc.Linear.X86.FreeRegs
526             RegAlloc.Linear.PPC.FreeRegs
527             RegAlloc.Linear.SPARC.FreeRegs
528
529     if flag(ghci)
530         Exposed-Modules:
531             DsMeta
532             TcSplice
533             Convert
534             ByteCodeAsm
535             ByteCodeFFI
536             ByteCodeGen
537             ByteCodeInstr
538             ByteCodeItbls
539             ByteCodeLink
540             Debugger
541             LibFFI
542             Linker
543             ObjLink
544             RtClosureInspect
545