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