Support generating 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.PPC_Darwin
276         CodeGen.Platform.SPARC
277         CodeGen.Platform.X86
278         CodeGen.Platform.X86_64
279         CgUtils
280         StgCmm
281         StgCmmBind
282         StgCmmClosure
283         StgCmmCon
284         StgCmmEnv
285         StgCmmExpr
286         StgCmmForeign
287         StgCmmHeap
288         StgCmmHpc
289         StgCmmArgRep
290         StgCmmLayout
291         StgCmmMonad
292         StgCmmPrim
293         StgCmmProf
294         StgCmmTicky
295         StgCmmUtils
296         StgCmmExtCode
297         SMRep
298         CoreArity
299         CoreFVs
300         CoreLint
301         CorePrep
302         CoreSubst
303         CoreOpt
304         CoreSyn
305         TrieMap
306         CoreTidy
307         CoreUnfold
308         CoreUtils
309         CoreMap
310         CoreSeq
311         CoreStats
312         MkCore
313         PprCore
314         PmExpr
315         TmOracle
316         Check
317         Coverage
318         Desugar
319         DsArrows
320         DsBinds
321         DsCCall
322         DsExpr
323         DsForeign
324         DsGRHSs
325         DsListComp
326         DsMonad
327         DsUsage
328         DsUtils
329         ExtractDocs
330         Match
331         MatchCon
332         MatchLit
333         HsBinds
334         HsDecls
335         HsDoc
336         HsExpr
337         HsImpExp
338         HsLit
339         PlaceHolder
340         HsExtension
341         HsInstances
342         HsPat
343         HsSyn
344         HsTypes
345         HsUtils
346         HsDumpAst
347         BinIface
348         BinFingerprint
349         BuildTyCl
350         IfaceEnv
351         IfaceSyn
352         IfaceType
353         ToIface
354         LoadIface
355         MkIface
356         TcIface
357         FlagChecker
358         Annotations
359         CmdLineParser
360         CodeOutput
361         Config
362         Constants
363         DriverMkDepend
364         DriverPhases
365         PipelineMonad
366         DriverPipeline
367         DynFlags
368         ErrUtils
369         Finder
370         GHC
371         GhcMake
372         GhcPlugins
373         DynamicLoading
374         HeaderInfo
375         HscMain
376         HscStats
377         HscTypes
378         InteractiveEval
379         InteractiveEvalTypes
380         PackageConfig
381         Packages
382         PlatformConstants
383         Plugins
384         TcPluginM
385         PprTyThing
386         StaticPtrTable
387         SysTools
388         SysTools.BaseDir
389         SysTools.Terminal
390         SysTools.ExtraObj
391         SysTools.Info
392         SysTools.Process
393         SysTools.Tasks
394         Elf
395         TidyPgm
396         Ctype
397         HaddockUtils
398         Lexer
399         OptCoercion
400         Parser
401         RdrHsSyn
402         ApiAnnotation
403         ForeignCall
404         KnownUniques
405         PrelInfo
406         PrelNames
407         PrelRules
408         PrimOp
409         TysPrim
410         TysWiredIn
411         CostCentre
412         CostCentreState
413         ProfInit
414         RnBinds
415         RnEnv
416         RnExpr
417         RnHsDoc
418         RnNames
419         RnPat
420         RnSource
421         RnSplice
422         RnTypes
423         RnFixity
424         RnUtils
425         RnUnbound
426         CoreMonad
427         CSE
428         FloatIn
429         FloatOut
430         LiberateCase
431         OccurAnal
432         SAT
433         SetLevels
434         SimplCore
435         SimplEnv
436         SimplMonad
437         SimplUtils
438         Simplify
439         SimplStg
440         StgStats
441         StgCse
442         StgLiftLams
443         StgLiftLams.Analysis
444         StgLiftLams.LiftM
445         StgLiftLams.Transformation
446         StgSubst
447         UnariseStg
448         RepType
449         Rules
450         SpecConstr
451         Specialise
452         CoreToStg
453         StgLint
454         StgSyn
455         StgFVs
456         CallArity
457         DmdAnal
458         Exitify
459         WorkWrap
460         WwLib
461         FamInst
462         ClsInst
463         Inst
464         TcAnnotations
465         TcArrows
466         TcBinds
467         TcSigs
468         TcClassDcl
469         TcDefaults
470         TcDeriv
471         TcDerivInfer
472         TcDerivUtils
473         TcEnv
474         TcExpr
475         TcForeign
476         TcGenDeriv
477         TcGenFunctor
478         TcGenGenerics
479         TcHsSyn
480         TcHsType
481         TcInstDcls
482         TcMType
483         TcValidity
484         TcMatches
485         TcPat
486         TcPatSyn
487         TcRnDriver
488         TcBackpack
489         TcRnExports
490         TcRnMonad
491         TcRnTypes
492         TcRules
493         TcSimplify
494         TcHoleErrors
495         TcErrors
496         TcTyClsDecls
497         TcTyDecls
498         TcTypeable
499         TcType
500         TcEvidence
501         TcEvTerm
502         TcUnify
503         TcInteract
504         TcCanonical
505         TcFlatten
506         TcSMonad
507         TcTypeNats
508         TcSplice
509         Class
510         Coercion
511         DsMeta
512         THNames
513         FamInstEnv
514         FunDeps
515         InstEnv
516         TyCon
517         CoAxiom
518         Kind
519         Type
520         TyCoRep
521         Unify
522         Bag
523         Binary
524         BooleanFormula
525         BufWrite
526         Digraph
527         Encoding
528         FastFunctions
529         FastMutInt
530         FastString
531         FastStringEnv
532         Fingerprint
533         FiniteMap
534         FV
535         GraphBase
536         GraphColor
537         GraphOps
538         GraphPpr
539         IOEnv
540         Json
541         ListSetOps
542         ListT
543         Maybes
544         MonadUtils
545         OrdList
546         Outputable
547         Pair
548         Panic
549         PprColour
550         Pretty
551         State
552         Stream
553         StringBuffer
554         UniqDFM
555         UniqDSet
556         UniqFM
557         UniqMap
558         UniqSet
559         Util
560         Hoopl.Block
561         Hoopl.Collections
562         Hoopl.Dataflow
563         Hoopl.Graph
564         Hoopl.Label
565 --        CgInfoTbls used in ghci/DebuggerUtils
566 --        CgHeapery  mkVirtHeapOffsets used in ghci
567
568     Exposed-Modules:
569             AsmCodeGen
570             TargetReg
571             NCGMonad
572             Instruction
573             BlockLayout
574             CFG
575             Format
576             Reg
577             RegClass
578             PIC
579             Platform
580             CPrim
581             X86.Regs
582             X86.RegInfo
583             X86.Instr
584             X86.Cond
585             X86.Ppr
586             X86.CodeGen
587             PPC.Regs
588             PPC.RegInfo
589             PPC.Instr
590             PPC.Cond
591             PPC.Ppr
592             PPC.CodeGen
593             SPARC.Base
594             SPARC.Regs
595             SPARC.Imm
596             SPARC.AddrMode
597             SPARC.Cond
598             SPARC.Instr
599             SPARC.Stack
600             SPARC.ShortcutJump
601             SPARC.Ppr
602             SPARC.CodeGen
603             SPARC.CodeGen.Amode
604             SPARC.CodeGen.Base
605             SPARC.CodeGen.CondCode
606             SPARC.CodeGen.Gen32
607             SPARC.CodeGen.Gen64
608             SPARC.CodeGen.Sanity
609             SPARC.CodeGen.Expand
610             RegAlloc.Liveness
611             RegAlloc.Graph.Main
612             RegAlloc.Graph.Stats
613             RegAlloc.Graph.ArchBase
614             RegAlloc.Graph.ArchX86
615             RegAlloc.Graph.Coalesce
616             RegAlloc.Graph.Spill
617             RegAlloc.Graph.SpillClean
618             RegAlloc.Graph.SpillCost
619             RegAlloc.Graph.TrivColorable
620             RegAlloc.Linear.Main
621             RegAlloc.Linear.JoinToTargets
622             RegAlloc.Linear.State
623             RegAlloc.Linear.Stats
624             RegAlloc.Linear.FreeRegs
625             RegAlloc.Linear.StackMap
626             RegAlloc.Linear.Base
627             RegAlloc.Linear.X86.FreeRegs
628             RegAlloc.Linear.X86_64.FreeRegs
629             RegAlloc.Linear.PPC.FreeRegs
630             RegAlloc.Linear.SPARC.FreeRegs
631             Dwarf
632             Dwarf.Types
633             Dwarf.Constants
634             Convert
635             ByteCodeTypes
636             ByteCodeAsm
637             ByteCodeGen
638             ByteCodeInstr
639             ByteCodeItbls
640             ByteCodeLink
641             Debugger
642             Linker
643             RtClosureInspect
644             GHCi