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