ae7d05c6dcd2b4ba1954e1e831ab4c4d4984f3e6
[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         -- For GHC < 6.5:
113         cbits/unicode.c
114
115     if flag(dynlibs)
116         c-sources:
117             ghci/keepCAFsForGHCi.c
118
119     hs-source-dirs:
120         basicTypes
121         cmm
122         codeGen
123         coreSyn
124         cprAnalysis
125         deSugar
126         ghci
127         hsSyn
128         iface
129         main
130         parser
131         prelude
132         profiling
133         rename
134         simplCore
135         simplStg
136         specialise
137         stgSyn
138         stranal
139         typecheck
140         types
141         utils
142         vectorise
143
144     Exposed-Modules:
145         BasicTypes
146         DataCon
147         Demand
148         Exception
149         Id
150         IdInfo
151         Literal
152         MkId
153         Module
154         Name
155         NameEnv
156         NameSet
157         NewDemand
158         OccName
159         RdrName
160         SrcLoc
161         UniqSupply
162         Unique
163         Var
164         VarEnv
165         VarSet
166         BlockId
167         CLabel
168         Cmm
169         CmmBrokenBlock
170         CmmCPS
171         CmmCPSGen
172         CmmCPSZ
173         CmmCallConv
174         CmmCommonBlockElimZ
175         CmmContFlowOpt
176         CmmCvt
177         CmmExpr
178         CmmInfo
179         CmmLex
180         CmmLint
181         CmmLive
182         CmmLiveZ
183         CmmOpt
184         CmmParse
185         CmmProcPoint
186         CmmProcPointZ
187         CmmSpillReload
188         CmmTx
189         CmmUtils
190         CmmZipUtil
191         DFMonad
192         Dataflow
193         MachOp
194         MkZipCfg
195         MkZipCfgCmm
196         OptimizationFuel
197         PprC
198         PprCmm
199         PprCmmZ
200         StackColor
201         StackPlacements
202         ZipCfg
203         ZipCfgCmmRep
204         ZipCfgExtras
205         ZipDataflow
206         Bitmap
207         CgBindery
208         CgCallConv
209         CgCase
210         CgClosure
211         CgCon
212         CgExpr
213         CgForeignCall
214         CgHeapery
215         CgHpc
216         CgInfoTbls
217         CgLetNoEscape
218         CgMonad
219         CgParallel
220         CgPrimOp
221         CgProf
222         CgStackery
223         CgTailCall
224         CgTicky
225         CgUtils
226         ClosureInfo
227         CodeGen
228         SMRep
229         CoreFVs
230         CoreLint
231         CorePrep
232         CoreSubst
233         CoreSyn
234         CoreTidy
235         CoreUnfold
236         CoreUtils
237         ExternalCore
238         MkCore
239         MkExternalCore
240         PprCore
241         PprExternalCore
242         CprAnalyse
243         Check
244         Coverage
245         Desugar
246         DsArrows
247         DsBinds
248         DsCCall
249         DsExpr
250         DsForeign
251         DsGRHSs
252         DsListComp
253         DsMonad
254         DsUtils
255         Match
256         MatchCon
257         MatchLit
258         HsBinds
259         HsDecls
260         HsDoc
261         HsExpr
262         HsImpExp
263         HsLit
264         HsPat
265         HsSyn
266         HsTypes
267         HsUtils
268         BinIface
269         BuildTyCl
270         IfaceEnv
271         IfaceSyn
272         IfaceType
273         LoadIface
274         MkIface
275         TcIface
276         BreakArray
277         CmdLineParser
278         CodeOutput
279         Config
280         Constants
281         DriverMkDepend
282         DriverPhases
283         DriverPipeline
284         DynFlags
285         ErrUtils
286         Finder
287         GHC
288         HeaderInfo
289         HscMain
290         HscStats
291         HscTypes
292         InteractiveEval
293         PackageConfig
294         Packages
295         ParsePkgConf
296         PprTyThing
297         StaticFlags
298         StaticFlagParser
299         SysTools
300         TidyPgm
301         Ctype
302         HaddockLex
303         HaddockParse
304         HaddockUtils
305         LexCore
306         Lexer
307         Parser
308         ParserCore
309         ParserCoreUtils
310         RdrHsSyn
311         ForeignCall
312         PrelInfo
313         PrelNames
314         PrelRules
315         PrimOp
316         TysPrim
317         TysWiredIn
318         CostCentre
319         SCCfinal
320         RnBinds
321         RnEnv
322         RnExpr
323         RnHsDoc
324         RnHsSyn
325         RnNames
326         RnPat
327         RnSource
328         RnTypes
329         CSE
330         FloatIn
331         FloatOut
332         LiberateCase
333         OccurAnal
334         SAT
335         SetLevels
336         SimplCore
337         SimplEnv
338         SimplMonad
339         SimplUtils
340         Simplify
341         SRT
342         SimplStg
343         StgStats
344         Rules
345         SpecConstr
346         Specialise
347         CoreToStg
348         StgLint
349         StgSyn
350         DmdAnal
351         SaAbsInt
352         SaLib
353         StrictAnal
354         WorkWrap
355         WwLib
356         FamInst
357         Inst
358         TcArrows
359         TcBinds
360         TcClassDcl
361         TcDefaults
362         TcDeriv
363         TcEnv
364         TcExpr
365         TcForeign
366         TcGenDeriv
367         TcHsSyn
368         TcHsType
369         TcInstDcls
370         TcMType
371         TcMatches
372         TcPat
373         TcRnDriver
374         TcRnMonad
375         TcRnTypes
376         TcRules
377         TcSimplify
378         TcTyClsDecls
379         TcTyDecls
380         TcTyFuns
381         TcType
382         TcUnify
383         Class
384         Coercion
385         FamInstEnv
386         FunDeps
387         Generics
388         InstEnv
389         TyCon
390         Type
391         TypeRep
392         Unify
393         Bag
394         Binary
395         BufWrite
396         Digraph
397         Encoding
398         FastBool
399         FastFunctions
400         FastMutInt
401         FastString
402         FastTypes
403         Fingerprint
404         FiniteMap
405         GraphBase
406         GraphColor
407         GraphOps
408         GraphPpr
409         IOEnv
410         Interval
411         LazyUniqFM
412         ListSetOps
413         Maybes
414         MonadUtils
415         OrdList
416         Outputable
417         Panic
418         Pretty
419         State
420         StringBuffer
421         Unicode
422         UniqFM
423         UniqSet
424         Util
425         VectBuiltIn
426         VectCore
427         VectMonad
428         VectType
429         VectUtils
430         Vectorise
431
432     if flag(ncg)
433         hs-source-dirs:
434             nativeGen
435
436         Exposed-Modules:
437             AsmCodeGen
438             MachCodeGen
439             MachInstrs
440             MachRegs
441             NCGMonad
442             PositionIndependentCode
443             PprMach
444             RegAllocColor
445             RegAllocInfo
446             RegAllocLinear
447             RegAllocStats
448             RegArchBase
449             RegArchX86
450             RegCoalesce
451             RegLiveness
452             RegSpill
453             RegSpillClean
454             RegSpillCost
455
456     if flag(ghci)
457         Exposed-Modules:
458             DsMeta
459             TcSplice
460             Convert
461             ByteCodeAsm
462             ByteCodeFFI
463             ByteCodeGen
464             ByteCodeInstr
465             ByteCodeItbls
466             ByteCodeLink
467             Debugger
468             GhciMonad
469             GhciTags
470             InteractiveUI
471             LibFFI
472             Linker
473             ObjLink
474             RtClosureInspect
475