avoid a crash: don't return unless the run queue has some threads in it
[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, RelaxedPolyRec
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         CmmBuildInfoTables
169         CmmCPS
170         CmmCPSGen
171         CmmCPSZ
172         CmmCallConv
173         CmmCommonBlockElimZ
174         CmmContFlowOpt
175         CmmCvt
176         CmmExpr
177         CmmInfo
178         CmmLex
179         CmmLint
180         CmmLive
181         CmmLiveZ
182         CmmOpt
183         CmmParse
184         CmmProcPoint
185         CmmProcPointZ
186         CmmSpillReload
187         CmmStackLayout
188         CmmTx
189         CmmUtils
190         CmmZipUtil
191         DFMonad
192         Dataflow
193         MkZipCfg
194         MkZipCfgCmm
195         OptimizationFuel
196         PprC
197         PprCmm
198         PprCmmZ
199         StackColor
200         StackPlacements
201         ZipCfg
202         ZipCfgCmmRep
203         ZipCfgExtras
204         ZipDataflow
205         Bitmap
206         CgBindery
207         CgCallConv
208         CgCase
209         CgClosure
210         CgCon
211         CgExpr
212         CgForeignCall
213         CgHeapery
214         CgHpc
215         CgInfoTbls
216         CgLetNoEscape
217         CgMonad
218         CgParallel
219         CgPrimOp
220         CgProf
221         CgStackery
222         CgTailCall
223         CgTicky
224         CgUtils
225         StgCmm
226         StgCmmBind
227         StgCmmClosure
228         StgCmmCon
229         StgCmmEnv
230         StgCmmExpr
231         StgCmmForeign
232         StgCmmGran
233         StgCmmHeap
234         StgCmmHpc
235         StgCmmLayout
236         StgCmmMonad
237         StgCmmPrim
238         StgCmmProf
239         StgCmmTicky
240         StgCmmUtils
241         ClosureInfo
242         CodeGen
243         SMRep
244         CoreArity
245         CoreFVs
246         CoreLint
247         CorePrep
248         CoreSubst
249         CoreSyn
250         CoreTidy
251         CoreUnfold
252         CoreUtils
253         ExternalCore
254         MkCore
255         MkExternalCore
256         PprCore
257         PprExternalCore
258         CprAnalyse
259         Check
260         Coverage
261         Desugar
262         DsArrows
263         DsBinds
264         DsCCall
265         DsExpr
266         DsForeign
267         DsGRHSs
268         DsListComp
269         DsMonad
270         DsUtils
271         Match
272         MatchCon
273         MatchLit
274         HsBinds
275         HsDecls
276         HsDoc
277         HsExpr
278         HsImpExp
279         HsLit
280         HsPat
281         HsSyn
282         HsTypes
283         HsUtils
284         BinIface
285         BuildTyCl
286         IfaceEnv
287         IfaceSyn
288         IfaceType
289         LoadIface
290         MkIface
291         TcIface
292         Annotations
293         BreakArray
294         CmdLineParser
295         CodeOutput
296         Config
297         Constants
298         DriverMkDepend
299         DriverPhases
300         DriverPipeline
301         DynFlags
302         ErrUtils
303         Finder
304         GHC
305         HeaderInfo
306         HscMain
307         HscStats
308         HscTypes
309         InteractiveEval
310         PackageConfig
311         Packages
312         ParsePkgConf
313         PprTyThing
314         StaticFlags
315         StaticFlagParser
316         SysTools
317         TidyPgm
318         Ctype
319         HaddockLex
320         HaddockParse
321         HaddockUtils
322         LexCore
323         Lexer
324         Parser
325         ParserCore
326         ParserCoreUtils
327         RdrHsSyn
328         ForeignCall
329         PrelInfo
330         PrelNames
331         PrelRules
332         PrimOp
333         TysPrim
334         TysWiredIn
335         CostCentre
336         SCCfinal
337         RnBinds
338         RnEnv
339         RnExpr
340         RnHsDoc
341         RnHsSyn
342         RnNames
343         RnPat
344         RnSource
345         RnTypes
346         CoreMonad
347         CSE
348         FloatIn
349         FloatOut
350         LiberateCase
351         OccurAnal
352         SAT
353         SetLevels
354         SimplCore
355         SimplEnv
356         SimplMonad
357         SimplUtils
358         Simplify
359         SRT
360         SimplStg
361         StgStats
362         Rules
363         SpecConstr
364         Specialise
365         CoreToStg
366         StgLint
367         StgSyn
368         DmdAnal
369         SaAbsInt
370         SaLib
371         StrictAnal
372         WorkWrap
373         WwLib
374         FamInst
375         Inst
376         TcAnnotations
377         TcArrows
378         TcBinds
379         TcClassDcl
380         TcDefaults
381         TcDeriv
382         TcEnv
383         TcExpr
384         TcForeign
385         TcGenDeriv
386         TcHsSyn
387         TcHsType
388         TcInstDcls
389         TcMType
390         TcMatches
391         TcPat
392         TcRnDriver
393         TcRnMonad
394         TcRnTypes
395         TcRules
396         TcSimplify
397         TcTyClsDecls
398         TcTyDecls
399         TcTyFuns
400         TcType
401         TcUnify
402         Class
403         Coercion
404         FamInstEnv
405         FunDeps
406         Generics
407         InstEnv
408         TyCon
409         Type
410         TypeRep
411         Unify
412         Bag
413         Binary
414         BufWrite
415         Digraph
416         Encoding
417         FastBool
418         FastFunctions
419         FastMutInt
420         FastString
421         FastTypes
422         Fingerprint
423         FiniteMap
424         GraphBase
425         GraphColor
426         GraphOps
427         GraphPpr
428         IOEnv
429         Interval
430         LazyUniqFM
431         ListSetOps
432         Maybes
433         MonadUtils
434         OrdList
435         Outputable
436         Panic
437         Pretty
438         Serialized
439         State
440         StringBuffer
441         UniqFM
442         UniqSet
443         Util
444         VectBuiltIn
445         VectCore
446         VectMonad
447         VectType
448         VectUtils
449         Vectorise
450
451     if flag(ncg)
452         hs-source-dirs:
453             nativeGen
454
455         Exposed-Modules:
456             AsmCodeGen
457             TargetReg
458             NCGMonad
459             Instruction
460             Size
461             Reg
462             RegClass
463             PprBase
464             PIC
465             Platform
466             Alpha.Regs
467             Alpha.RegInfo
468             Alpha.Instr
469             Alpha.CodeGen
470             X86.Regs
471             X86.RegInfo
472             X86.Instr
473             X86.Cond
474             X86.Ppr
475             X86.CodeGen
476             PPC.Regs
477             PPC.RegInfo
478             PPC.Instr
479             PPC.Cond
480             PPC.Ppr
481             PPC.CodeGen
482             SPARC.Base
483             SPARC.Regs
484             SPARC.Imm
485             SPARC.AddrMode          
486             SPARC.Cond
487             SPARC.Instr
488             SPARC.Stack    
489             SPARC.ShortcutJump
490             SPARC.Ppr
491             SPARC.CodeGen
492             SPARC.CodeGen.Amode
493             SPARC.CodeGen.Base
494             SPARC.CodeGen.CCall
495             SPARC.CodeGen.CondCode
496             SPARC.CodeGen.Gen32
497             SPARC.CodeGen.Gen64
498             SPARC.CodeGen.Sanity
499             RegAlloc.Liveness
500             RegAlloc.Graph.Main
501             RegAlloc.Graph.Stats
502             RegAlloc.Graph.ArchBase
503             RegAlloc.Graph.ArchX86
504             RegAlloc.Graph.Coalesce
505             RegAlloc.Graph.Spill
506             RegAlloc.Graph.SpillClean
507             RegAlloc.Graph.SpillCost
508             RegAlloc.Graph.TrivColorable
509             RegAlloc.Linear.Main
510             RegAlloc.Linear.JoinToTargets
511             RegAlloc.Linear.State
512             RegAlloc.Linear.Stats
513             RegAlloc.Linear.FreeRegs
514             RegAlloc.Linear.StackMap
515             RegAlloc.Linear.Base
516             RegAlloc.Linear.X86.FreeRegs
517             RegAlloc.Linear.PPC.FreeRegs
518             RegAlloc.Linear.SPARC.FreeRegs
519
520     if flag(ghci)
521         Exposed-Modules:
522             DsMeta
523             TcSplice
524             Convert
525             ByteCodeAsm
526             ByteCodeFFI
527             ByteCodeGen
528             ByteCodeInstr
529             ByteCodeItbls
530             ByteCodeLink
531             Debugger
532             GhciMonad
533             GhciTags
534             InteractiveUI
535             LibFFI
536             Linker
537             ObjLink
538             RtClosureInspect
539