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