do not link with -lrt on Solaris for threaded way
[ghc.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.10
22
23 Flag ghci
24     Description: Build GHCi support.
25     Default: False
26     Manual: True
27
28 Flag stage1
29     Description: Is this stage 1?
30     Default: False
31     Manual: True
32
33 Flag stage2
34     Description: Is this stage 2?
35     Default: False
36     Manual: True
37
38 Flag stage3
39     Description: Is this stage 3?
40     Default: False
41     Manual: True
42
43 Library
44     Default-Language: Haskell2010
45     Exposed: False
46
47     Build-Depends: base       >= 4   && < 5,
48                    directory  >= 1   && < 1.3,
49                    process    >= 1   && < 1.3,
50                    bytestring >= 0.9 && < 0.11,
51                    time                 < 1.5,
52                    containers >= 0.1 && < 0.6,
53                    array      >= 0.1 && < 0.6,
54                    filepath   >= 1   && < 1.4,
55                    Cabal,
56                    hpc,
57                    transformers,
58                    bin-package-db,
59                    hoopl
60
61     if flag(stage1) && impl(ghc < 7.5)
62         Build-Depends: old-time   >= 1   && < 1.2
63
64     if os(windows)
65         Build-Depends: Win32
66     else
67         Build-Depends: unix
68
69     GHC-Options: -Wall -fno-warn-name-shadowing
70
71     if flag(ghci)
72         Build-Depends: template-haskell
73         CPP-Options: -DGHCI
74         Include-Dirs: ../rts/dist/build @FFIIncludeDir@
75
76     Other-Extensions:
77         BangPatterns
78         CPP
79         DataKinds
80         DeriveDataTypeable
81         DeriveFoldable
82         DeriveFunctor
83         DeriveTraversable
84         DisambiguateRecordFields
85         ExplicitForAll
86         FlexibleContexts
87         FlexibleInstances
88         GADTs
89         GeneralizedNewtypeDeriving
90         MagicHash
91         MultiParamTypeClasses
92         NamedFieldPuns
93         NondecreasingIndentation
94         RankNTypes
95         RecordWildCards
96         ScopedTypeVariables
97         StandaloneDeriving
98         Trustworthy
99         TupleSections
100         TypeFamilies
101         TypeSynonymInstances
102         UnboxedTuples
103         UndecidableInstances
104
105     Include-Dirs: . parser utils
106
107     if impl( ghc >= 7.9 )
108         -- We need to set the package name to ghc (without a version number)
109         -- as it's magic.  But we can't set it for old versions of GHC (e.g.
110         -- when bootstrapping) because those versions of GHC don't understand
111         -- that GHC is wired-in.
112         GHC-Options: -package-name ghc
113
114     if flag(stage1)
115         Include-Dirs: stage1
116     else
117         if flag(stage2)
118             Include-Dirs: stage2
119         else
120             if flag(stage3)
121                 Include-Dirs: stage2
122
123     Install-Includes: HsVersions.h, ghc_boot_platform.h
124
125     c-sources:
126         parser/cutils.c
127         ghci/keepCAFsForGHCi.c
128         cbits/genSym.c
129
130     hs-source-dirs:
131         basicTypes
132         cmm
133         codeGen
134         coreSyn
135         deSugar
136         ghci
137         hsSyn
138         iface
139         llvmGen
140         main
141         nativeGen
142         parser
143         prelude
144         profiling
145         rename
146         simplCore
147         simplStg
148         specialise
149         stgSyn
150         stranal
151         typecheck
152         types
153         utils
154         vectorise
155
156     Exposed-Modules:
157         Avail
158         BasicTypes
159         ConLike
160         DataCon
161         PatSyn
162         Demand
163         Exception
164         GhcMonad
165         Hooks
166         Id
167         IdInfo
168         Literal
169         Llvm
170         Llvm.AbsSyn
171         Llvm.MetaData
172         Llvm.PpLlvm
173         Llvm.Types
174         LlvmCodeGen
175         LlvmCodeGen.Base
176         LlvmCodeGen.CodeGen
177         LlvmCodeGen.Data
178         LlvmCodeGen.Ppr
179         LlvmCodeGen.Regs
180         LlvmMangler
181         MkId
182         Module
183         Name
184         NameEnv
185         NameSet
186         OccName
187         RdrName
188         SrcLoc
189         UniqSupply
190         Unique
191         Var
192         VarEnv
193         VarSet
194         UnVarGraph
195         BlockId
196         CLabel
197         Cmm
198         CmmBuildInfoTables
199         CmmPipeline
200         CmmCallConv
201         CmmCommonBlockElim
202         CmmContFlowOpt
203         CmmExpr
204         CmmInfo
205         CmmLex
206         CmmLint
207         CmmLive
208         CmmMachOp
209         CmmNode
210         CmmOpt
211         CmmParse
212         CmmProcPoint
213         CmmSink
214         CmmType
215         CmmUtils
216         CmmLayoutStack
217         MkGraph
218         PprBase
219         PprC
220         PprCmm
221         PprCmmDecl
222         PprCmmExpr
223         Bitmap
224         CodeGen.Platform
225         CodeGen.Platform.ARM
226         CodeGen.Platform.NoRegs
227         CodeGen.Platform.PPC
228         CodeGen.Platform.PPC_Darwin
229         CodeGen.Platform.SPARC
230         CodeGen.Platform.X86
231         CodeGen.Platform.X86_64
232         CgUtils
233         StgCmm
234         StgCmmBind
235         StgCmmClosure
236         StgCmmCon
237         StgCmmEnv
238         StgCmmExpr
239         StgCmmForeign
240         StgCmmHeap
241         StgCmmHpc
242         StgCmmArgRep
243         StgCmmLayout
244         StgCmmMonad
245         StgCmmPrim
246         StgCmmProf
247         StgCmmTicky
248         StgCmmUtils
249         StgCmmExtCode
250         SMRep
251         CoreArity
252         CoreFVs
253         CoreLint
254         CorePrep
255         CoreSubst
256         CoreSyn
257         TrieMap
258         CoreTidy
259         CoreUnfold
260         CoreUtils
261         MkCore
262         PprCore
263         Check
264         Coverage
265         Desugar
266         DsArrows
267         DsBinds
268         DsCCall
269         DsExpr
270         DsForeign
271         DsGRHSs
272         DsListComp
273         DsMonad
274         DsUtils
275         Match
276         MatchCon
277         MatchLit
278         HsBinds
279         HsDecls
280         HsDoc
281         HsExpr
282         HsImpExp
283         HsLit
284         HsPat
285         HsSyn
286         HsTypes
287         HsUtils
288         BinIface
289         BuildTyCl
290         IfaceEnv
291         IfaceSyn
292         IfaceType
293         LoadIface
294         MkIface
295         TcIface
296         FlagChecker
297         Annotations
298         BreakArray
299         CmdLineParser
300         CodeOutput
301         Config
302         Constants
303         DriverMkDepend
304         DriverPhases
305         PipelineMonad
306         DriverPipeline
307         DynFlags
308         ErrUtils
309         Finder
310         GHC
311         GhcMake
312         GhcPlugins
313         DynamicLoading
314         HeaderInfo
315         HscMain
316         HscStats
317         HscTypes
318         InteractiveEval
319         InteractiveEvalTypes
320         PackageConfig
321         Packages
322         PlatformConstants
323         PprTyThing
324         StaticFlags
325         SysTools
326         TidyPgm
327         Ctype
328         HaddockUtils
329         Lexer
330         OptCoercion
331         Parser
332         RdrHsSyn
333         ForeignCall
334         PrelInfo
335         PrelNames
336         PrelRules
337         PrimOp
338         TysPrim
339         TysWiredIn
340         CostCentre
341         ProfInit
342         SCCfinal
343         RnBinds
344         RnEnv
345         RnExpr
346         RnHsDoc
347         RnNames
348         RnPat
349         RnSource
350         RnSplice
351         RnTypes
352         CoreMonad
353         CSE
354         FloatIn
355         FloatOut
356         LiberateCase
357         OccurAnal
358         SAT
359         SetLevels
360         SimplCore
361         SimplEnv
362         SimplMonad
363         SimplUtils
364         Simplify
365         SimplStg
366         StgStats
367         UnariseStg
368         Rules
369         SpecConstr
370         Specialise
371         CoreToStg
372         StgLint
373         StgSyn
374         CallArity
375         DmdAnal
376         WorkWrap
377         WwLib
378         FamInst
379         Inst
380         TcAnnotations
381         TcArrows
382         TcBinds
383         TcClassDcl
384         TcDefaults
385         TcDeriv
386         TcEnv
387         TcExpr
388         TcForeign
389         TcGenDeriv
390         TcGenGenerics
391         TcHsSyn
392         TcHsType
393         TcInstDcls
394         TcMType
395         TcValidity
396         TcMatches
397         TcPat
398         TcPatSyn
399         TcRnDriver
400         TcRnMonad
401         TcRnTypes
402         TcRules
403         TcSimplify
404         TcErrors
405         TcTyClsDecls
406         TcTyDecls
407         TcType
408         TcEvidence
409         TcUnify
410         TcInteract
411         TcCanonical
412         TcSMonad
413         TcTypeNats
414         TcSplice
415         Class
416         Coercion
417         FamInstEnv
418         FunDeps
419         InstEnv
420         TyCon
421         CoAxiom
422         Kind
423         Type
424         TypeRep
425         Unify
426         Bag
427         Binary
428         BooleanFormula
429         BufWrite
430         Digraph
431         Encoding
432         FastBool
433         FastFunctions
434         FastMutInt
435         FastString
436         FastTypes
437         Fingerprint
438         FiniteMap
439         GraphBase
440         GraphColor
441         GraphOps
442         GraphPpr
443         IOEnv
444         ListSetOps
445         Maybes
446         MonadUtils
447         OrdList
448         Outputable
449         Pair
450         Panic
451         Pretty
452         Serialized
453         State
454         Stream
455         StringBuffer
456         UniqFM
457         UniqSet
458         Util
459         ExtsCompat46
460 --      ^^^  a temporary module necessary to bootstrap with GHC <= 7.6
461         Vectorise.Builtins.Base
462         Vectorise.Builtins.Initialise
463         Vectorise.Builtins
464         Vectorise.Monad.Base
465         Vectorise.Monad.Naming
466         Vectorise.Monad.Local
467         Vectorise.Monad.Global
468         Vectorise.Monad.InstEnv
469         Vectorise.Monad
470         Vectorise.Utils.Base
471         Vectorise.Utils.Closure
472         Vectorise.Utils.Hoisting
473         Vectorise.Utils.PADict
474         Vectorise.Utils.Poly
475         Vectorise.Utils
476         Vectorise.Generic.Description
477         Vectorise.Generic.PAMethods
478         Vectorise.Generic.PADict
479         Vectorise.Generic.PData
480         Vectorise.Type.Env
481         Vectorise.Type.Type
482         Vectorise.Type.TyConDecl
483         Vectorise.Type.Classify
484         Vectorise.Convert
485         Vectorise.Vect
486         Vectorise.Var
487         Vectorise.Env
488         Vectorise.Exp
489         Vectorise
490         Hoopl.Dataflow
491         Hoopl
492 --        CgInfoTbls used in ghci/DebuggerUtils
493 --        CgHeapery  mkVirtHeapOffsets used in ghci
494
495     Exposed-Modules:
496             AsmCodeGen
497             TargetReg
498             NCGMonad
499             Instruction
500             Size
501             Reg
502             RegClass
503             PIC
504             Platform
505             CPrim
506             X86.Regs
507             X86.RegInfo
508             X86.Instr
509             X86.Cond
510             X86.Ppr
511             X86.CodeGen
512             PPC.Regs
513             PPC.RegInfo
514             PPC.Instr
515             PPC.Cond
516             PPC.Ppr
517             PPC.CodeGen
518             SPARC.Base
519             SPARC.Regs
520             SPARC.Imm
521             SPARC.AddrMode
522             SPARC.Cond
523             SPARC.Instr
524             SPARC.Stack
525             SPARC.ShortcutJump
526             SPARC.Ppr
527             SPARC.CodeGen
528             SPARC.CodeGen.Amode
529             SPARC.CodeGen.Base
530             SPARC.CodeGen.CondCode
531             SPARC.CodeGen.Gen32
532             SPARC.CodeGen.Gen64
533             SPARC.CodeGen.Sanity
534             SPARC.CodeGen.Expand
535             RegAlloc.Liveness
536             RegAlloc.Graph.Main
537             RegAlloc.Graph.Stats
538             RegAlloc.Graph.ArchBase
539             RegAlloc.Graph.ArchX86
540             RegAlloc.Graph.Coalesce
541             RegAlloc.Graph.Spill
542             RegAlloc.Graph.SpillClean
543             RegAlloc.Graph.SpillCost
544             RegAlloc.Graph.TrivColorable
545             RegAlloc.Linear.Main
546             RegAlloc.Linear.JoinToTargets
547             RegAlloc.Linear.State
548             RegAlloc.Linear.Stats
549             RegAlloc.Linear.FreeRegs
550             RegAlloc.Linear.StackMap
551             RegAlloc.Linear.Base
552             RegAlloc.Linear.X86.FreeRegs
553             RegAlloc.Linear.X86_64.FreeRegs
554             RegAlloc.Linear.PPC.FreeRegs
555             RegAlloc.Linear.SPARC.FreeRegs
556
557     if flag(ghci)
558         Exposed-Modules:
559             DsMeta
560             Convert
561             ByteCodeAsm
562             ByteCodeGen
563             ByteCodeInstr
564             ByteCodeItbls
565             ByteCodeLink
566             Debugger
567             LibFFI
568             Linker
569             ObjLink
570             RtClosureInspect
571             DebuggerUtils