ghc: Fix ghc's template-haskell bound
[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.12.*,
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         NameCache
202         SrcLoc
203         UniqSupply
204         Unique
205         Var
206         VarEnv
207         VarSet
208         UnVarGraph
209         BlockId
210         CLabel
211         Cmm
212         CmmBuildInfoTables
213         CmmPipeline
214         CmmCallConv
215         CmmCommonBlockElim
216         CmmImplementSwitchPlans
217         CmmContFlowOpt
218         CmmExpr
219         CmmInfo
220         CmmLex
221         CmmLint
222         CmmLive
223         CmmMachOp
224         CmmMonad
225         CmmSwitch
226         CmmNode
227         CmmOpt
228         CmmParse
229         CmmProcPoint
230         CmmSink
231         CmmType
232         CmmUtils
233         CmmLayoutStack
234         MkGraph
235         PprBase
236         PprC
237         PprCmm
238         PprCmmDecl
239         PprCmmExpr
240         Bitmap
241         CodeGen.Platform
242         CodeGen.Platform.ARM
243         CodeGen.Platform.ARM64
244         CodeGen.Platform.NoRegs
245         CodeGen.Platform.PPC
246         CodeGen.Platform.PPC_Darwin
247         CodeGen.Platform.SPARC
248         CodeGen.Platform.X86
249         CodeGen.Platform.X86_64
250         CgUtils
251         StgCmm
252         StgCmmBind
253         StgCmmClosure
254         StgCmmCon
255         StgCmmEnv
256         StgCmmExpr
257         StgCmmForeign
258         StgCmmHeap
259         StgCmmHpc
260         StgCmmArgRep
261         StgCmmLayout
262         StgCmmMonad
263         StgCmmPrim
264         StgCmmProf
265         StgCmmTicky
266         StgCmmUtils
267         StgCmmExtCode
268         SMRep
269         CoreArity
270         CoreFVs
271         CoreLint
272         CorePrep
273         CoreSubst
274         CoreSyn
275         TrieMap
276         CoreTidy
277         CoreUnfold
278         CoreUtils
279         CoreSeq
280         CoreStats
281         MkCore
282         PprCore
283         PmExpr
284         TmOracle
285         Check
286         Coverage
287         Desugar
288         DsArrows
289         DsBinds
290         DsCCall
291         DsExpr
292         DsForeign
293         DsGRHSs
294         DsListComp
295         DsMonad
296         DsUtils
297         Match
298         MatchCon
299         MatchLit
300         HsBinds
301         HsDecls
302         HsDoc
303         HsExpr
304         HsImpExp
305         HsLit
306         PlaceHolder
307         HsPat
308         HsSyn
309         HsTypes
310         HsUtils
311         BinIface
312         BinFingerprint
313         BuildTyCl
314         IfaceEnv
315         IfaceSyn
316         IfaceType
317         LoadIface
318         MkIface
319         TcIface
320         FlagChecker
321         Annotations
322         CmdLineParser
323         CodeOutput
324         Config
325         Constants
326         DriverMkDepend
327         DriverPhases
328         PipelineMonad
329         DriverPipeline
330         DynFlags
331         ErrUtils
332         Finder
333         GHC
334         GhcMake
335         GhcPlugins
336         DynamicLoading
337         HeaderInfo
338         HscMain
339         HscStats
340         HscTypes
341         InteractiveEval
342         InteractiveEvalTypes
343         PackageConfig
344         Packages
345         PlatformConstants
346         Plugins
347         TcPluginM
348         PprTyThing
349         StaticFlags
350         StaticPtrTable
351         SysTools
352         Elf
353         TidyPgm
354         Ctype
355         HaddockUtils
356         Lexer
357         OptCoercion
358         Parser
359         RdrHsSyn
360         ApiAnnotation
361         ForeignCall
362         KnownUniques
363         PrelInfo
364         PrelNames
365         PrelRules
366         PrimOp
367         TysPrim
368         TysWiredIn
369         CostCentre
370         ProfInit
371         SCCfinal
372         RnBinds
373         RnEnv
374         RnExpr
375         RnHsDoc
376         RnNames
377         RnPat
378         RnSource
379         RnSplice
380         RnTypes
381         CoreMonad
382         CSE
383         FloatIn
384         FloatOut
385         LiberateCase
386         OccurAnal
387         SAT
388         SetLevels
389         SimplCore
390         SimplEnv
391         SimplMonad
392         SimplUtils
393         Simplify
394         SimplStg
395         StgStats
396         UnariseStg
397         RepType
398         Rules
399         SpecConstr
400         Specialise
401         CoreToStg
402         StgLint
403         StgSyn
404         CallArity
405         DmdAnal
406         WorkWrap
407         WwLib
408         FamInst
409         Inst
410         TcAnnotations
411         TcArrows
412         TcBinds
413         TcSigs
414         TcClassDcl
415         TcDefaults
416         TcDeriv
417         TcDerivInfer
418         TcDerivUtils
419         TcEnv
420         TcExpr
421         TcForeign
422         TcGenDeriv
423         TcGenFunctor
424         TcGenGenerics
425         TcHsSyn
426         TcHsType
427         TcInstDcls
428         TcMType
429         TcValidity
430         TcMatches
431         TcPat
432         TcPatSyn
433         TcRnDriver
434         TcBackpack
435         TcRnExports
436         TcRnMonad
437         TcRnTypes
438         TcRules
439         TcSimplify
440         TcErrors
441         TcTyClsDecls
442         TcTyDecls
443         TcTypeable
444         TcType
445         TcEvidence
446         TcUnify
447         TcInteract
448         TcCanonical
449         TcFlatten
450         TcSMonad
451         TcTypeNats
452         TcSplice
453         Class
454         Coercion
455         DsMeta
456         THNames
457         FamInstEnv
458         FunDeps
459         InstEnv
460         TyCon
461         CoAxiom
462         Kind
463         Type
464         TyCoRep
465         Unify
466         Bag
467         Binary
468         BooleanFormula
469         BufWrite
470         Digraph
471         Encoding
472         FastFunctions
473         FastMutInt
474         FastString
475         FastStringEnv
476         Fingerprint
477         FiniteMap
478         FV
479         GraphBase
480         GraphColor
481         GraphOps
482         GraphPpr
483         IOEnv
484         ListSetOps
485         Maybes
486         MonadUtils
487         OrdList
488         Outputable
489         Pair
490         Panic
491         Pretty
492         State
493         Stream
494         StringBuffer
495         UniqDFM
496         UniqDSet
497         UniqFM
498         UniqSet
499         Util
500         Vectorise.Builtins.Base
501         Vectorise.Builtins.Initialise
502         Vectorise.Builtins
503         Vectorise.Monad.Base
504         Vectorise.Monad.Naming
505         Vectorise.Monad.Local
506         Vectorise.Monad.Global
507         Vectorise.Monad.InstEnv
508         Vectorise.Monad
509         Vectorise.Utils.Base
510         Vectorise.Utils.Closure
511         Vectorise.Utils.Hoisting
512         Vectorise.Utils.PADict
513         Vectorise.Utils.Poly
514         Vectorise.Utils
515         Vectorise.Generic.Description
516         Vectorise.Generic.PAMethods
517         Vectorise.Generic.PADict
518         Vectorise.Generic.PData
519         Vectorise.Type.Env
520         Vectorise.Type.Type
521         Vectorise.Type.TyConDecl
522         Vectorise.Type.Classify
523         Vectorise.Convert
524         Vectorise.Vect
525         Vectorise.Var
526         Vectorise.Env
527         Vectorise.Exp
528         Vectorise
529         Hoopl.Dataflow
530         Hoopl
531 --        CgInfoTbls used in ghci/DebuggerUtils
532 --        CgHeapery  mkVirtHeapOffsets used in ghci
533
534     Exposed-Modules:
535             AsmCodeGen
536             TargetReg
537             NCGMonad
538             Instruction
539             Format
540             Reg
541             RegClass
542             PIC
543             Platform
544             CPrim
545             X86.Regs
546             X86.RegInfo
547             X86.Instr
548             X86.Cond
549             X86.Ppr
550             X86.CodeGen
551             PPC.Regs
552             PPC.RegInfo
553             PPC.Instr
554             PPC.Cond
555             PPC.Ppr
556             PPC.CodeGen
557             SPARC.Base
558             SPARC.Regs
559             SPARC.Imm
560             SPARC.AddrMode
561             SPARC.Cond
562             SPARC.Instr
563             SPARC.Stack
564             SPARC.ShortcutJump
565             SPARC.Ppr
566             SPARC.CodeGen
567             SPARC.CodeGen.Amode
568             SPARC.CodeGen.Base
569             SPARC.CodeGen.CondCode
570             SPARC.CodeGen.Gen32
571             SPARC.CodeGen.Gen64
572             SPARC.CodeGen.Sanity
573             SPARC.CodeGen.Expand
574             RegAlloc.Liveness
575             RegAlloc.Graph.Main
576             RegAlloc.Graph.Stats
577             RegAlloc.Graph.ArchBase
578             RegAlloc.Graph.ArchX86
579             RegAlloc.Graph.Coalesce
580             RegAlloc.Graph.Spill
581             RegAlloc.Graph.SpillClean
582             RegAlloc.Graph.SpillCost
583             RegAlloc.Graph.TrivColorable
584             RegAlloc.Linear.Main
585             RegAlloc.Linear.JoinToTargets
586             RegAlloc.Linear.State
587             RegAlloc.Linear.Stats
588             RegAlloc.Linear.FreeRegs
589             RegAlloc.Linear.StackMap
590             RegAlloc.Linear.Base
591             RegAlloc.Linear.X86.FreeRegs
592             RegAlloc.Linear.X86_64.FreeRegs
593             RegAlloc.Linear.PPC.FreeRegs
594             RegAlloc.Linear.SPARC.FreeRegs
595             Dwarf
596             Dwarf.Types
597             Dwarf.Constants
598
599     if !flag(stage1)
600         -- ghc:Serialized moved to ghc-boot:GHC.Serialized.  So for
601         -- compatibility with GHC 7.10 and earlier, we reexport it
602         -- under the old name.
603         reexported-modules:
604             ghc-boot:GHC.Serialized as Serialized
605
606     if flag(ghci)
607         Exposed-Modules:
608             Convert
609             ByteCodeTypes
610             ByteCodeAsm
611             ByteCodeGen
612             ByteCodeInstr
613             ByteCodeItbls
614             ByteCodeLink
615             Debugger
616             Linker
617             RtClosureInspect
618             DebuggerUtils
619             GHCi