f191370071f0b308a623c7205c8115c862b2a6bc
[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 ext-interp
29     Description: Support external interpreter
30     Default: True
31     Manual: True
32
33 Flag stage1
34     Description: Is this stage 1?
35     Default: False
36     Manual: True
37
38 Flag stage2
39     Description: Is this stage 2?
40     Default: False
41     Manual: True
42
43 Flag stage3
44     Description: Is this stage 3?
45     Default: False
46     Manual: True
47
48 Flag terminfo
49     Description: Build GHC with terminfo support on non-Windows platforms.
50     Default: True
51     Manual: True
52
53 Flag integer-simple
54     Description: Use integer-simple
55     Manual: True
56     Default: False
57
58 Flag integer-gmp
59     Description: Use integer-gmp
60     Manual: True
61     Default: False
62
63 Library
64     Default-Language: Haskell2010
65     Exposed: False
66
67     Build-Depends: base       >= 4.11 && < 4.14,
68                    deepseq    >= 1.4 && < 1.5,
69                    directory  >= 1   && < 1.4,
70                    process    >= 1   && < 1.7,
71                    bytestring >= 0.9 && < 0.11,
72                    binary     == 0.8.*,
73                    time       >= 1.4 && < 1.10,
74                    containers >= 0.5 && < 0.7,
75                    array      >= 0.1 && < 0.6,
76                    filepath   >= 1   && < 1.5,
77                    template-haskell == 2.16.*,
78                    hpc        == 0.6.*,
79                    transformers == 0.5.*,
80                    ghc-boot   == @ProjectVersionMunged@,
81                    ghc-boot-th == @ProjectVersionMunged@,
82                    ghc-heap   == @ProjectVersionMunged@,
83                    ghci == @ProjectVersionMunged@
84
85     if os(windows)
86         Build-Depends: Win32  >= 2.3 && < 2.7
87     else
88         if flag(terminfo)
89             Build-Depends: terminfo == 0.4.*
90         Build-Depends: unix   >= 2.7 && < 2.9
91
92     GHC-Options: -Wall
93                  -Wno-name-shadowing
94                  -Wnoncanonical-monad-instances
95                  -Wnoncanonical-monoid-instances
96
97     if flag(ghci)
98         CPP-Options: -DHAVE_INTERNAL_INTERPRETER
99         Include-Dirs: ../rts/dist/build @FFIIncludeDir@
100
101     if flag(ext-interp)
102         CPP-Options: -DHAVE_EXTERNAL_INTERPRETER
103
104     if flag(ghci) || flag(ext-interp)
105         CPP-Options: -DHAVE_INTERPRETER
106
107     -- sanity-check to ensure not more than one integer flag is set
108     if flag(integer-gmp) && flag(integer-simple)
109         build-depends: invalid-cabal-flag-settings<0
110
111     -- gmp internals are used by the GHCi debugger if available
112     if flag(integer-gmp)
113         CPP-Options: -DINTEGER_GMP
114         build-depends: integer-gmp >= 1.0.2
115
116     -- simple internals are used by the GHCi debugger if available
117     if flag(integer-simple)
118         CPP-Options: -DINTEGER_SIMPLE
119         build-depends: integer-simple >= 0.1.1.1
120
121     Other-Extensions:
122         BangPatterns
123         CPP
124         DataKinds
125         DeriveDataTypeable
126         DeriveFoldable
127         DeriveFunctor
128         DeriveTraversable
129         DisambiguateRecordFields
130         ExplicitForAll
131         FlexibleContexts
132         FlexibleInstances
133         GADTs
134         GeneralizedNewtypeDeriving
135         MagicHash
136         MultiParamTypeClasses
137         NamedFieldPuns
138         NondecreasingIndentation
139         RankNTypes
140         RecordWildCards
141         ScopedTypeVariables
142         StandaloneDeriving
143         Trustworthy
144         TupleSections
145         TypeFamilies
146         TypeSynonymInstances
147         UnboxedTuples
148         UndecidableInstances
149
150     Include-Dirs: . parser utils
151
152     -- We need to set the unit id to ghc (without a version number)
153     -- as it's magic.
154     GHC-Options: -this-unit-id ghc
155
156     if flag(stage1)
157         Include-Dirs: stage1
158     else
159         if flag(stage2)
160             Include-Dirs: stage2
161         else
162             if flag(stage3)
163                 Include-Dirs: stage2
164
165     Install-Includes: HsVersions.h
166
167     c-sources:
168         parser/cutils.c
169         ghci/keepCAFsForGHCi.c
170         cbits/genSym.c
171
172     hs-source-dirs:
173         .
174         backpack
175         basicTypes
176         cmm
177         coreSyn
178         deSugar
179         ghci
180         iface
181         llvmGen
182         main
183         nativeGen
184         parser
185         prelude
186         profiling
187         rename
188         simplCore
189         simplStg
190         specialise
191         stgSyn
192         stranal
193         typecheck
194         types
195         utils
196         hieFile
197
198     -- we use an explicit Prelude
199     Default-Extensions:
200         NoImplicitPrelude
201
202     Exposed-Modules:
203         HieTypes
204         HieDebug
205         HieBin
206         HieUtils
207         HieAst
208         Ar
209         FileCleanup
210         DriverBkp
211         BkpSyn
212         NameShape
213         RnModIface
214         Avail
215         AsmUtils
216         BasicTypes
217         ConLike
218         DataCon
219         PatSyn
220         Demand
221         Debug
222         Exception
223         FieldLabel
224         GhcMonad
225         Hooks
226         Id
227         IdInfo
228         Lexeme
229         Literal
230         Llvm
231         Llvm.AbsSyn
232         Llvm.MetaData
233         Llvm.PpLlvm
234         Llvm.Types
235         LlvmCodeGen
236         LlvmCodeGen.Base
237         LlvmCodeGen.CodeGen
238         LlvmCodeGen.Data
239         LlvmCodeGen.Ppr
240         LlvmCodeGen.Regs
241         LlvmMangler
242         MkId
243         Module
244         Name
245         NameEnv
246         NameSet
247         OccName
248         RdrName
249         NameCache
250         SrcLoc
251         UniqSupply
252         Unique
253         Var
254         VarEnv
255         VarSet
256         UnVarGraph
257         BlockId
258         CLabel
259         Cmm
260         CmmBuildInfoTables
261         CmmPipeline
262         CmmCallConv
263         CmmCommonBlockElim
264         CmmImplementSwitchPlans
265         CmmContFlowOpt
266         CmmExpr
267         CmmInfo
268         CmmLex
269         CmmLint
270         CmmLive
271         CmmMachOp
272         CmmMonad
273         CmmSwitch
274         CmmNode
275         CmmOpt
276         CmmParse
277         CmmProcPoint
278         CmmSink
279         CmmType
280         CmmUtils
281         CmmLayoutStack
282         CliOption
283         EnumSet
284         GhcNameVersion
285         FileSettings
286         MkGraph
287         PprBase
288         PprC
289         PprCmm
290         PprCmmDecl
291         PprCmmExpr
292         Bitmap
293         GHC.Platform.Regs
294         GHC.Platform.ARM
295         GHC.Platform.ARM64
296         GHC.Platform.NoRegs
297         GHC.Platform.PPC
298         GHC.Platform.SPARC
299         GHC.Platform.X86
300         GHC.Platform.X86_64
301         GHC.StgToCmm.CgUtils
302         GHC.StgToCmm
303         GHC.StgToCmm.Bind
304         GHC.StgToCmm.Closure
305         GHC.StgToCmm.DataCon
306         GHC.StgToCmm.Env
307         GHC.StgToCmm.Expr
308         GHC.StgToCmm.Foreign
309         GHC.StgToCmm.Heap
310         GHC.StgToCmm.Hpc
311         GHC.StgToCmm.ArgRep
312         GHC.StgToCmm.Layout
313         GHC.StgToCmm.Monad
314         GHC.StgToCmm.Prim
315         GHC.StgToCmm.Prof
316         GHC.StgToCmm.Ticky
317         GHC.StgToCmm.Utils
318         GHC.StgToCmm.ExtCode
319         SMRep
320         CoreArity
321         CoreFVs
322         CoreLint
323         CorePrep
324         CoreSubst
325         CoreOpt
326         CoreSyn
327         TrieMap
328         CoreTidy
329         CoreUnfold
330         CoreUtils
331         CoreMap
332         CoreSeq
333         CoreStats
334         MkCore
335         PprCore
336         GHC.HsToCore.PmCheck.Oracle
337         GHC.HsToCore.PmCheck.Ppr
338         GHC.HsToCore.PmCheck.Types
339         GHC.HsToCore.PmCheck
340         Coverage
341         Desugar
342         DsArrows
343         DsBinds
344         DsCCall
345         DsExpr
346         DsForeign
347         DsGRHSs
348         DsListComp
349         DsMonad
350         DsUsage
351         DsUtils
352         ExtractDocs
353         Match
354         MatchCon
355         MatchLit
356         GHC.Hs
357         GHC.Hs.Binds
358         GHC.Hs.Decls
359         GHC.Hs.Doc
360         GHC.Hs.Expr
361         GHC.Hs.ImpExp
362         GHC.Hs.Lit
363         GHC.Hs.PlaceHolder
364         GHC.Hs.Extension
365         GHC.Hs.Instances
366         GHC.Hs.Pat
367         GHC.Hs.Types
368         GHC.Hs.Utils
369         GHC.Hs.Dump
370         BinIface
371         BinFingerprint
372         BuildTyCl
373         IfaceEnv
374         IfaceSyn
375         IfaceType
376         ToIface
377         LoadIface
378         MkIface
379         TcIface
380         FlagChecker
381         Annotations
382         CmdLineParser
383         CodeOutput
384         Config
385         Constants
386         DriverMkDepend
387         DriverPhases
388         PipelineMonad
389         DriverPipeline
390         DynFlags
391         ErrUtils
392         Finder
393         GHC
394         GhcMake
395         GhcPlugins
396         GhcPrelude
397         DynamicLoading
398         HeaderInfo
399         HscMain
400         HscStats
401         HscTypes
402         InteractiveEval
403         InteractiveEvalTypes
404         PackageConfig
405         Packages
406         PlatformConstants
407         Plugins
408         TcPluginM
409         PprTyThing
410         Settings
411         StaticPtrTable
412         SysTools
413         SysTools.BaseDir
414         SysTools.Terminal
415         SysTools.ExtraObj
416         SysTools.Info
417         SysTools.Process
418         SysTools.Tasks
419         SysTools.Settings
420         Elf
421         TidyPgm
422         Ctype
423         HaddockUtils
424         Lexer
425         OptCoercion
426         Parser
427         RdrHsSyn
428         ApiAnnotation
429         ForeignCall
430         KnownUniques
431         PrelInfo
432         PrelNames
433         PrelRules
434         PrimOp
435         ToolSettings
436         TysPrim
437         TysWiredIn
438         CostCentre
439         CostCentreState
440         ProfInit
441         RnBinds
442         RnEnv
443         RnExpr
444         RnHsDoc
445         RnNames
446         RnPat
447         RnSource
448         RnSplice
449         RnTypes
450         RnFixity
451         RnUtils
452         RnUnbound
453         CoreMonad
454         CSE
455         FloatIn
456         FloatOut
457         LiberateCase
458         OccurAnal
459         SAT
460         SetLevels
461         SimplCore
462         SimplEnv
463         SimplMonad
464         SimplUtils
465         Simplify
466         SimplStg
467         StgStats
468         StgCse
469         StgLiftLams
470         StgLiftLams.Analysis
471         StgLiftLams.LiftM
472         StgLiftLams.Transformation
473         StgSubst
474         UnariseStg
475         RepType
476         Rules
477         SpecConstr
478         Specialise
479         CoreToStg
480         StgLint
481         StgSyn
482         StgFVs
483         CallArity
484         DmdAnal
485         Exitify
486         WorkWrap
487         WwLib
488         FamInst
489         ClsInst
490         Inst
491         TcAnnotations
492         TcArrows
493         TcBinds
494         TcSigs
495         TcClassDcl
496         TcDefaults
497         TcDeriv
498         TcDerivInfer
499         TcDerivUtils
500         TcEnv
501         TcExpr
502         TcForeign
503         TcGenDeriv
504         TcGenFunctor
505         TcGenGenerics
506         TcHsSyn
507         TcHsType
508         TcInstDcls
509         TcMType
510         TcValidity
511         TcMatches
512         TcPat
513         TcPatSyn
514         TcRnDriver
515         TcBackpack
516         TcRnExports
517         TcRnMonad
518         TcRnTypes
519         TcRules
520         TcSimplify
521         TcHoleErrors
522         TcHoleFitTypes
523         TcErrors
524         TcTyClsDecls
525         TcTyDecls
526         TcTypeable
527         TcType
528         TcEvidence
529         TcEvTerm
530         TcUnify
531         TcInteract
532         TcCanonical
533         TcFlatten
534         TcSMonad
535         TcTypeNats
536         TcSplice
537         Class
538         Coercion
539         DsMeta
540         THNames
541         FamInstEnv
542         FunDeps
543         InstEnv
544         TyCon
545         CoAxiom
546         Kind
547         Type
548         TyCoRep
549         TyCoFVs
550         TyCoSubst
551         TyCoPpr
552         TyCoTidy
553         Unify
554         Bag
555         Binary
556         BooleanFormula
557         BufWrite
558         Digraph
559         Encoding
560         FastFunctions
561         FastMutInt
562         FastString
563         FastStringEnv
564         Fingerprint
565         FiniteMap
566         FV
567         GraphBase
568         GraphColor
569         GraphOps
570         GraphPpr
571         IOEnv
572         Json
573         ListSetOps
574         Maybes
575         MonadUtils
576         OrdList
577         Outputable
578         Pair
579         Panic
580         PlainPanic
581         PprColour
582         Pretty
583         State
584         Stream
585         StringBuffer
586         UniqDFM
587         UniqDSet
588         UniqFM
589         UniqMap
590         UniqSet
591         Util
592         Hoopl.Block
593         Hoopl.Collections
594         Hoopl.Dataflow
595         Hoopl.Graph
596         Hoopl.Label
597 --        CgInfoTbls used in ghci/DebuggerUtils
598 --        CgHeapery  mkVirtHeapOffsets used in ghci
599
600     Exposed-Modules:
601             AsmCodeGen
602             TargetReg
603             NCGMonad
604             Instruction
605             BlockLayout
606             CFG
607             Format
608             Reg
609             RegClass
610             PIC
611             CPrim
612             X86.Regs
613             X86.RegInfo
614             X86.Instr
615             X86.Cond
616             X86.Ppr
617             X86.CodeGen
618             PPC.Regs
619             PPC.RegInfo
620             PPC.Instr
621             PPC.Cond
622             PPC.Ppr
623             PPC.CodeGen
624             SPARC.Base
625             SPARC.Regs
626             SPARC.Imm
627             SPARC.AddrMode
628             SPARC.Cond
629             SPARC.Instr
630             SPARC.Stack
631             SPARC.ShortcutJump
632             SPARC.Ppr
633             SPARC.CodeGen
634             SPARC.CodeGen.Amode
635             SPARC.CodeGen.Base
636             SPARC.CodeGen.CondCode
637             SPARC.CodeGen.Gen32
638             SPARC.CodeGen.Gen64
639             SPARC.CodeGen.Sanity
640             SPARC.CodeGen.Expand
641             RegAlloc.Liveness
642             RegAlloc.Graph.Main
643             RegAlloc.Graph.Stats
644             RegAlloc.Graph.ArchBase
645             RegAlloc.Graph.ArchX86
646             RegAlloc.Graph.Coalesce
647             RegAlloc.Graph.Spill
648             RegAlloc.Graph.SpillClean
649             RegAlloc.Graph.SpillCost
650             RegAlloc.Graph.TrivColorable
651             RegAlloc.Linear.Main
652             RegAlloc.Linear.JoinToTargets
653             RegAlloc.Linear.State
654             RegAlloc.Linear.Stats
655             RegAlloc.Linear.FreeRegs
656             RegAlloc.Linear.StackMap
657             RegAlloc.Linear.Base
658             RegAlloc.Linear.X86.FreeRegs
659             RegAlloc.Linear.X86_64.FreeRegs
660             RegAlloc.Linear.PPC.FreeRegs
661             RegAlloc.Linear.SPARC.FreeRegs
662             Dwarf
663             Dwarf.Types
664             Dwarf.Constants
665             GHC.ThToHs
666             ByteCodeTypes
667             ByteCodeAsm
668             ByteCodeGen
669             ByteCodeInstr
670             ByteCodeItbls
671             ByteCodeLink
672             Debugger
673             LinkerTypes
674             Linker
675             RtClosureInspect
676             GHCi