Merging in the new codegen branch
[ghc-hetmet.git] / compiler / ghc.cabal.in
1 Name: ghc
2 Version: @ProjectVersion@
3 License: BSD3
4 License-File: ../LICENSE
5 Author: The GHC Team
6 Maintainer: glasgow-haskell-users@haskell.org
7 Homepage: http://www.haskell.org/ghc/
8 Synopsis: The GHC API
9 Description:
10     GHC's functionality can be useful for more things than just
11     compiling Haskell programs. Important use cases are programs
12     that analyse (and perhaps transform) Haskell code. Others
13     include loading Haskell code dynamically in a GHCi-like manner.
14     For this reason, a lot of GHC's functionality is made available
15     through this package.
16 Category: Development
17 Build-Type: Simple
18 Cabal-Version: >= 1.2
19
20 Flag base4
21     Description: Choose the even newer, even smaller, split-up base package.
22
23 Flag base3
24     Description: Choose the new smaller, split-up base package.
25
26 Flag dynlibs
27     Description: Dynamic library support
28     Default: False
29     Manual: True
30
31 Flag editline
32     Description: Use editline
33     Default: False
34     Manual: True
35
36 Flag ghci
37     Description: Build GHCi support.
38     Default: False
39     Manual: True
40
41 Flag ncg
42     Description: Build the NCG.
43     Default: False
44     Manual: True
45
46 Flag stage1
47     Description: Is this stage 1?
48
49 Library
50     Exposed: False
51
52     if flag(base4)
53         Build-Depends: base       >= 4   && < 5
54     if flag(base3)
55         Build-Depends: base       >= 3   && < 4
56     if !flag(base3) && !flag(base4)
57         Build-Depends: base       < 3
58
59     if flag(base3) || flag(base4)
60         Build-Depends: directory  >= 1   && < 1.1,
61                        process    >= 1   && < 1.1,
62                        bytestring >= 0.9 && < 0.10,
63                        old-time   >= 1   && < 1.1,
64                        containers >= 0.1 && < 0.3,
65                        array      >= 0.1 && < 0.3
66
67     Build-Depends: filepath >= 1 && < 1.2
68     Build-Depends: haskell98, Cabal, hpc
69     if os(windows)
70         Build-Depends: Win32
71     else
72         Build-Depends: unix
73
74     if flag(editline)
75         Build-Depends: editline
76         CPP-Options: -DUSE_EDITLINE
77
78     GHC-Options: -Wall -fno-warn-name-shadowing -fno-warn-orphans
79
80     if flag(ghci)
81         Build-Depends: template-haskell
82         CPP-Options: -DGHCI
83         Include-Dirs: ../libffi/build/include
84
85     if !flag(ncg)
86         CPP-Options: -DOMIT_NATIVE_CODEGEN
87
88     -- GHC 6.4.2 needs to be able to find WCsubst.c, which needs to be
89     -- able to find WCsubst.h
90     Include-Dirs: ../libraries/base/cbits, ../libraries/base/include
91
92     Extensions: CPP, MagicHash, UnboxedTuples, PatternGuards,
93                 ForeignFunctionInterface, EmptyDataDecls,
94                 TypeSynonymInstances, MultiParamTypeClasses,
95                 FlexibleInstances, Rank2Types, ScopedTypeVariables,
96                 DeriveDataTypeable
97
98     Include-Dirs: . parser utils
99
100     if flag(stage1)
101         Include-Dirs: stage1
102         if impl(ghc < 6.9)
103             Build-Depends: extensible-exceptions
104             Extensions: PatternSignatures
105     else
106         Include-Dirs: stage2plus
107     Install-Includes: HsVersions.h, ghc_boot_platform.h
108
109     c-sources:
110         parser/cutils.c
111         utils/md5.c
112
113     if flag(dynlibs)
114         c-sources:
115             ghci/keepCAFsForGHCi.c
116
117     hs-source-dirs:
118         basicTypes
119         cmm
120         codeGen
121         coreSyn
122         cprAnalysis
123         deSugar
124         ghci
125         hsSyn
126         iface
127         main
128         parser
129         prelude
130         profiling
131         rename
132         simplCore
133         simplStg
134         specialise
135         stgSyn
136         stranal
137         typecheck
138         types
139         utils
140         vectorise
141
142     Exposed-Modules:
143         BasicTypes
144         DataCon
145         Demand
146         Exception
147         Id
148         IdInfo
149         Literal
150         MkId
151         Module
152         Name
153         NameEnv
154         NameSet
155         NewDemand
156         OccName
157         RdrName
158         SrcLoc
159         UniqSupply
160         Unique
161         Var
162         VarEnv
163         VarSet
164         BlockId
165         CLabel
166         Cmm
167         CmmBrokenBlock
168         CmmCPS
169         CmmCPSGen
170         CmmCPSZ
171         CmmCallConv
172         CmmCommonBlockElimZ
173         CmmContFlowOpt
174         CmmCvt
175         CmmExpr
176         CmmInfo
177         CmmLex
178         CmmLint
179         CmmLive
180         CmmLiveZ
181         CmmOpt
182         CmmParse
183         CmmProcPoint
184         CmmProcPointZ
185         CmmSpillReload
186         CmmTx
187         CmmUtils
188         CmmZipUtil
189         DFMonad
190         Dataflow
191         MkZipCfg
192         MkZipCfgCmm
193         OptimizationFuel
194         PprC
195         PprCmm
196         PprCmmZ
197         StackColor
198         StackPlacements
199         ZipCfg
200         ZipCfgCmmRep
201         ZipCfgExtras
202         ZipDataflow
203         Bitmap
204         CgBindery
205         CgCallConv
206         CgCase
207         CgClosure
208         CgCon
209         CgExpr
210         CgForeignCall
211         CgHeapery
212         CgHpc
213         CgInfoTbls
214         CgLetNoEscape
215         CgMonad
216         CgParallel
217         CgPrimOp
218         CgProf
219         CgStackery
220         CgTailCall
221         CgTicky
222         CgUtils
223         StgCmm
224         StgCmmBind
225         StgCmmClosure
226         StgCmmCon
227         StgCmmEnv
228         StgCmmExpr
229         StgCmmForeign
230         StgCmmGran
231         StgCmmHeap
232         StgCmmHpc
233         StgCmmLayout
234         StgCmmMonad
235         StgCmmPrim
236         StgCmmProf
237         StgCmmTicky
238         StgCmmUtils
239         ClosureInfo
240         CodeGen
241         SMRep
242         CoreFVs
243         CoreLint
244         CorePrep
245         CoreSubst
246         CoreSyn
247         CoreTidy
248         CoreUnfold
249         CoreUtils
250         ExternalCore
251         MkCore
252         MkExternalCore
253         PprCore
254         PprExternalCore
255         CprAnalyse
256         Check
257         Coverage
258         Desugar
259         DsArrows
260         DsBinds
261         DsCCall
262         DsExpr
263         DsForeign
264         DsGRHSs
265         DsListComp
266         DsMonad
267         DsUtils
268         Match
269         MatchCon
270         MatchLit
271         HsBinds
272         HsDecls
273         HsDoc
274         HsExpr
275         HsImpExp
276         HsLit
277         HsPat
278         HsSyn
279         HsTypes
280         HsUtils
281         BinIface
282         BuildTyCl
283         IfaceEnv
284         IfaceSyn
285         IfaceType
286         LoadIface
287         MkIface
288         TcIface
289         Annotations
290         BreakArray
291         CmdLineParser
292         CodeOutput
293         Config
294         Constants
295         DriverMkDepend
296         DriverPhases
297         DriverPipeline
298         DynFlags
299         ErrUtils
300         Finder
301         GHC
302         HeaderInfo
303         HscMain
304         HscStats
305         HscTypes
306         InteractiveEval
307         PackageConfig
308         Packages
309         ParsePkgConf
310         PprTyThing
311         StaticFlags
312         StaticFlagParser
313         SysTools
314         TidyPgm
315         Ctype
316         HaddockLex
317         HaddockParse
318         HaddockUtils
319         LexCore
320         Lexer
321         Parser
322         ParserCore
323         ParserCoreUtils
324         RdrHsSyn
325         ForeignCall
326         PrelInfo
327         PrelNames
328         PrelRules
329         PrimOp
330         TysPrim
331         TysWiredIn
332         CostCentre
333         SCCfinal
334         RnBinds
335         RnEnv
336         RnExpr
337         RnHsDoc
338         RnHsSyn
339         RnNames
340         RnPat
341         RnSource
342         RnTypes
343         CoreMonad
344         CSE
345         FloatIn
346         FloatOut
347         LiberateCase
348         OccurAnal
349         SAT
350         SetLevels
351         SimplCore
352         SimplEnv
353         SimplMonad
354         SimplUtils
355         Simplify
356         SRT
357         SimplStg
358         StgStats
359         Rules
360         SpecConstr
361         Specialise
362         CoreToStg
363         StgLint
364         StgSyn
365         DmdAnal
366         SaAbsInt
367         SaLib
368         StrictAnal
369         WorkWrap
370         WwLib
371         FamInst
372         Inst
373         TcAnnotations
374         TcArrows
375         TcBinds
376         TcClassDcl
377         TcDefaults
378         TcDeriv
379         TcEnv
380         TcExpr
381         TcForeign
382         TcGenDeriv
383         TcHsSyn
384         TcHsType
385         TcInstDcls
386         TcMType
387         TcMatches
388         TcPat
389         TcRnDriver
390         TcRnMonad
391         TcRnTypes
392         TcRules
393         TcSimplify
394         TcTyClsDecls
395         TcTyDecls
396         TcTyFuns
397         TcType
398         TcUnify
399         Class
400         Coercion
401         FamInstEnv
402         FunDeps
403         Generics
404         InstEnv
405         TyCon
406         Type
407         TypeRep
408         Unify
409         Bag
410         Binary
411         BufWrite
412         Digraph
413         Encoding
414         FastBool
415         FastFunctions
416         FastMutInt
417         FastString
418         FastTypes
419         Fingerprint
420         FiniteMap
421         GraphBase
422         GraphColor
423         GraphOps
424         GraphPpr
425         IOEnv
426         Interval
427         LazyUniqFM
428         ListSetOps
429         Maybes
430         MonadUtils
431         OrdList
432         Outputable
433         Panic
434         Pretty
435         Serialized
436         State
437         StringBuffer
438         UniqFM
439         UniqSet
440         Util
441         VectBuiltIn
442         VectCore
443         VectMonad
444         VectType
445         VectUtils
446         Vectorise
447
448     if flag(ncg)
449         hs-source-dirs:
450             nativeGen
451
452         Exposed-Modules:
453             AsmCodeGen
454             MachCodeGen
455             MachInstrs
456             MachRegs
457             NCGMonad
458             PositionIndependentCode
459             PprMach
460             RegAllocColor
461             RegAllocInfo
462             RegAllocLinear
463             RegAllocStats
464             RegArchBase
465             RegArchX86
466             RegCoalesce
467             RegLiveness
468             RegSpill
469             RegSpillClean
470             RegSpillCost
471
472     if flag(ghci)
473         Exposed-Modules:
474             DsMeta
475             TcSplice
476             Convert
477             ByteCodeAsm
478             ByteCodeFFI
479             ByteCodeGen
480             ByteCodeInstr
481             ByteCodeItbls
482             ByteCodeLink
483             Debugger
484             GhciMonad
485             GhciTags
486             InteractiveUI
487             LibFFI
488             Linker
489             ObjLink
490             RtClosureInspect
491