Add new LLVM code generator to GHC. (Version 2)
[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.3
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     else
108         if flag(stage2)
109             Include-Dirs: stage2
110         else
111             if flag(stage3)
112                 Include-Dirs: stage2
113
114     Install-Includes: HsVersions.h, ghc_boot_platform.h
115
116     c-sources:
117         parser/cutils.c
118         utils/md5.c
119
120     if flag(dynlibs)
121         c-sources:
122             ghci/keepCAFsForGHCi.c
123
124     hs-source-dirs:
125         basicTypes
126         cmm
127         codeGen
128         coreSyn
129         deSugar
130         ghci
131         hsSyn
132         iface
133         llvmGen
134         main
135         nativeGen
136         parser
137         prelude
138         profiling
139         rename
140         simplCore
141         simplStg
142         specialise
143         stgSyn
144         stranal
145         typecheck
146         types
147         utils
148         vectorise
149
150     Exposed-Modules:
151         BasicTypes
152         DataCon
153         Demand
154         Exception
155         Id
156         IdInfo
157         Literal
158         Llvm
159         Llvm.AbsSyn
160         Llvm.PpLlvm
161         Llvm.Types
162         LlvmCodeGen
163         LlvmCodeGen.Base
164         LlvmCodeGen.CodeGen
165         LlvmCodeGen.Data
166         LlvmCodeGen.Ppr
167         LlvmCodeGen.Regs
168         MkId
169         Module
170         Name
171         NameEnv
172         NameSet
173         OccName
174         RdrName
175         SrcLoc
176         UniqSupply
177         Unique
178         Var
179         VarEnv
180         VarSet
181         BlockId
182         CLabel
183         Cmm
184         CmmBrokenBlock
185         CmmBuildInfoTables
186         CmmCPS
187         CmmCPSGen
188         CmmCPSZ
189         CmmCallConv
190         CmmCommonBlockElimZ
191         CmmContFlowOpt
192         CmmCvt
193         CmmExpr
194         CmmInfo
195         CmmLex
196         CmmLint
197         CmmLive
198         CmmLiveZ
199         CmmOpt
200         CmmParse
201         CmmProcPoint
202         CmmProcPointZ
203         CmmSpillReload
204         CmmStackLayout
205         CmmTx
206         CmmUtils
207         CmmZipUtil
208         DFMonad
209         Dataflow
210         MkZipCfg
211         MkZipCfgCmm
212         OptimizationFuel
213         PprBase
214         PprC
215         PprCmm
216         PprCmmZ
217         StackColor
218         StackPlacements
219         ZipCfg
220         ZipCfgCmmRep
221         ZipCfgExtras
222         ZipDataflow
223         Bitmap
224         CgBindery
225         CgCallConv
226         CgCase
227         CgClosure
228         CgCon
229         CgExpr
230         CgExtCode
231         CgForeignCall
232         CgHeapery
233         CgHpc
234         CgInfoTbls
235         CgLetNoEscape
236         CgMonad
237         CgParallel
238         CgPrimOp
239         CgProf
240         CgStackery
241         CgTailCall
242         CgTicky
243         CgUtils
244         StgCmm
245         StgCmmBind
246         StgCmmClosure
247         StgCmmCon
248         StgCmmEnv
249         StgCmmExpr
250         StgCmmForeign
251         StgCmmGran
252         StgCmmHeap
253         StgCmmHpc
254         StgCmmLayout
255         StgCmmMonad
256         StgCmmPrim
257         StgCmmProf
258         StgCmmTicky
259         StgCmmUtils
260         ClosureInfo
261         CodeGen
262         SMRep
263         CoreArity
264         CoreFVs
265         CoreLint
266         CorePrep
267         CoreSubst
268         CoreSyn
269         CoreTidy
270         CoreUnfold
271         CoreUtils
272         ExternalCore
273         MkCore
274         MkExternalCore
275         PprCore
276         PprExternalCore
277         Check
278         Coverage
279         Desugar
280         DsArrows
281         DsBinds
282         DsCCall
283         DsExpr
284         DsForeign
285         DsGRHSs
286         DsListComp
287         DsMonad
288         DsUtils
289         Match
290         MatchCon
291         MatchLit
292         HsBinds
293         HsDecls
294         HsDoc
295         HsExpr
296         HsImpExp
297         HsLit
298         HsPat
299         HsSyn
300         HsTypes
301         HsUtils
302         BinIface
303         BuildTyCl
304         IfaceEnv
305         IfaceSyn
306         IfaceType
307         LoadIface
308         MkIface
309         TcIface
310         Annotations
311         BreakArray
312         CmdLineParser
313         CodeOutput
314         Config
315         Constants
316         DriverMkDepend
317         DriverPhases
318         DriverPipeline
319         DynFlags
320         ErrUtils
321         Finder
322         GHC
323         HeaderInfo
324         HscMain
325         HscStats
326         HscTypes
327         InteractiveEval
328         PackageConfig
329         Packages
330         PprTyThing
331         StaticFlags
332         StaticFlagParser
333         SysTools
334         TidyPgm
335         Ctype
336         HaddockUtils
337         LexCore
338         Lexer
339         OptCoercion
340         Parser
341         ParserCore
342         ParserCoreUtils
343         RdrHsSyn
344         ForeignCall
345         PrelInfo
346         PrelNames
347         PrelRules
348         PrimOp
349         TysPrim
350         TysWiredIn
351         CostCentre
352         SCCfinal
353         RnBinds
354         RnEnv
355         RnExpr
356         RnHsDoc
357         RnHsSyn
358         RnNames
359         RnPat
360         RnSource
361         RnTypes
362         CoreMonad
363         CSE
364         FloatIn
365         FloatOut
366         LiberateCase
367         OccurAnal
368         SAT
369         SetLevels
370         SimplCore
371         SimplEnv
372         SimplMonad
373         SimplUtils
374         Simplify
375         SRT
376         SimplStg
377         StgStats
378         Rules
379         SpecConstr
380         Specialise
381         CoreToStg
382         StgLint
383         StgSyn
384         DmdAnal
385         WorkWrap
386         WwLib
387         FamInst
388         Inst
389         TcAnnotations
390         TcArrows
391         TcBinds
392         TcClassDcl
393         TcDefaults
394         TcDeriv
395         TcEnv
396         TcExpr
397         TcForeign
398         TcGenDeriv
399         TcHsSyn
400         TcHsType
401         TcInstDcls
402         TcMType
403         TcMatches
404         TcPat
405         TcRnDriver
406         TcRnMonad
407         TcRnTypes
408         TcRules
409         TcSimplify
410         TcTyClsDecls
411         TcTyDecls
412         TcTyFuns
413         TcType
414         TcUnify
415         Class
416         Coercion
417         FamInstEnv
418         FunDeps
419         Generics
420         InstEnv
421         TyCon
422         Type
423         TypeRep
424         Unify
425         Bag
426         Binary
427         BufWrite
428         Digraph
429         Encoding
430         FastBool
431         FastFunctions
432         FastMutInt
433         FastString
434         FastTypes
435         Fingerprint
436         FiniteMap
437         GraphBase
438         GraphColor
439         GraphOps
440         GraphPpr
441         IOEnv
442         Interval
443         ListSetOps
444         Maybes
445         MonadUtils
446         OrdList
447         Outputable
448         Panic
449         Pretty
450         Serialized
451         State
452         StringBuffer
453         UniqFM
454         UniqSet
455         Util
456         VectBuiltIn
457         VectCore
458         VectMonad
459         VectType
460         VectUtils
461         Vectorise
462
463     -- We only need to expose more modules as some of the ncg code is used
464     -- by the LLVM backend so its always included
465     if flag(ncg)
466         Exposed-Modules:
467             AsmCodeGen
468             TargetReg
469             NCGMonad
470             Instruction
471             Size
472             Reg
473             RegClass
474             PIC
475             Platform
476             Alpha.Regs
477             Alpha.RegInfo
478             Alpha.Instr
479             Alpha.CodeGen
480             X86.Regs
481             X86.RegInfo
482             X86.Instr
483             X86.Cond
484             X86.Ppr
485             X86.CodeGen
486             PPC.Regs
487             PPC.RegInfo
488             PPC.Instr
489             PPC.Cond
490             PPC.Ppr
491             PPC.CodeGen
492             SPARC.Base
493             SPARC.Regs
494             SPARC.RegPlate
495             SPARC.Imm
496             SPARC.AddrMode
497             SPARC.Cond
498             SPARC.Instr
499             SPARC.Stack
500             SPARC.ShortcutJump
501             SPARC.Ppr
502             SPARC.CodeGen
503             SPARC.CodeGen.Amode
504             SPARC.CodeGen.Base
505             SPARC.CodeGen.CCall
506             SPARC.CodeGen.CondCode
507             SPARC.CodeGen.Gen32
508             SPARC.CodeGen.Gen64
509             SPARC.CodeGen.Sanity
510             SPARC.CodeGen.Expand
511             RegAlloc.Liveness
512             RegAlloc.Graph.Main
513             RegAlloc.Graph.Stats
514             RegAlloc.Graph.ArchBase
515             RegAlloc.Graph.ArchX86
516             RegAlloc.Graph.Coalesce
517             RegAlloc.Graph.Spill
518             RegAlloc.Graph.SpillClean
519             RegAlloc.Graph.SpillCost
520             RegAlloc.Graph.TrivColorable
521             RegAlloc.Linear.Main
522             RegAlloc.Linear.JoinToTargets
523             RegAlloc.Linear.State
524             RegAlloc.Linear.Stats
525             RegAlloc.Linear.FreeRegs
526             RegAlloc.Linear.StackMap
527             RegAlloc.Linear.Base
528             RegAlloc.Linear.X86.FreeRegs
529             RegAlloc.Linear.PPC.FreeRegs
530             RegAlloc.Linear.SPARC.FreeRegs
531
532     if flag(ghci)
533         Exposed-Modules:
534             DsMeta
535             TcSplice
536             Convert
537             ByteCodeAsm
538             ByteCodeFFI
539             ByteCodeGen
540             ByteCodeInstr
541             ByteCodeItbls
542             ByteCodeLink
543             Debugger
544             LibFFI
545             Linker
546             ObjLink
547             RtClosureInspect
548