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