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