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