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