Add dump-parsed-ast flag and functionality
[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.5,
56                    bytestring >= 0.9 && < 0.11,
57                    binary     == 0.8.*,
58                    time       >= 1.4 && < 1.8,
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.*
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         DriverBkp
169         BkpSyn
170         NameShape
171         RnModIface
172         Avail
173         BasicTypes
174         ConLike
175         DataCon
176         PatSyn
177         Demand
178         Debug
179         Exception
180         FieldLabel
181         GhcMonad
182         Hooks
183         Id
184         IdInfo
185         Lexeme
186         Literal
187         Llvm
188         Llvm.AbsSyn
189         Llvm.MetaData
190         Llvm.PpLlvm
191         Llvm.Types
192         LlvmCodeGen
193         LlvmCodeGen.Base
194         LlvmCodeGen.CodeGen
195         LlvmCodeGen.Data
196         LlvmCodeGen.Ppr
197         LlvmCodeGen.Regs
198         LlvmMangler
199         MkId
200         Module
201         Name
202         NameEnv
203         NameSet
204         OccName
205         RdrName
206         NameCache
207         SrcLoc
208         UniqSupply
209         Unique
210         Var
211         VarEnv
212         VarSet
213         UnVarGraph
214         BlockId
215         CLabel
216         Cmm
217         CmmBuildInfoTables
218         CmmPipeline
219         CmmCallConv
220         CmmCommonBlockElim
221         CmmImplementSwitchPlans
222         CmmContFlowOpt
223         CmmExpr
224         CmmInfo
225         CmmLex
226         CmmLint
227         CmmLive
228         CmmMachOp
229         CmmMonad
230         CmmSwitch
231         CmmNode
232         CmmOpt
233         CmmParse
234         CmmProcPoint
235         CmmSink
236         CmmType
237         CmmUtils
238         CmmLayoutStack
239         MkGraph
240         PprBase
241         PprC
242         PprCmm
243         PprCmmDecl
244         PprCmmExpr
245         Bitmap
246         CodeGen.Platform
247         CodeGen.Platform.ARM
248         CodeGen.Platform.ARM64
249         CodeGen.Platform.NoRegs
250         CodeGen.Platform.PPC
251         CodeGen.Platform.PPC_Darwin
252         CodeGen.Platform.SPARC
253         CodeGen.Platform.X86
254         CodeGen.Platform.X86_64
255         CgUtils
256         StgCmm
257         StgCmmBind
258         StgCmmClosure
259         StgCmmCon
260         StgCmmEnv
261         StgCmmExpr
262         StgCmmForeign
263         StgCmmHeap
264         StgCmmHpc
265         StgCmmArgRep
266         StgCmmLayout
267         StgCmmMonad
268         StgCmmPrim
269         StgCmmProf
270         StgCmmTicky
271         StgCmmUtils
272         StgCmmExtCode
273         SMRep
274         CoreArity
275         CoreFVs
276         CoreLint
277         CorePrep
278         CoreSubst
279         CoreSyn
280         TrieMap
281         CoreTidy
282         CoreUnfold
283         CoreUtils
284         CoreSeq
285         CoreStats
286         MkCore
287         PprCore
288         PmExpr
289         TmOracle
290         Check
291         Coverage
292         Desugar
293         DsArrows
294         DsBinds
295         DsCCall
296         DsExpr
297         DsForeign
298         DsGRHSs
299         DsListComp
300         DsMonad
301         DsUtils
302         Match
303         MatchCon
304         MatchLit
305         HsBinds
306         HsDecls
307         HsDoc
308         HsExpr
309         HsImpExp
310         HsLit
311         PlaceHolder
312         HsPat
313         HsSyn
314         HsTypes
315         HsUtils
316         HsDumpAst
317         BinIface
318         BinFingerprint
319         BuildTyCl
320         IfaceEnv
321         IfaceSyn
322         IfaceType
323         ToIface
324         LoadIface
325         MkIface
326         TcIface
327         FlagChecker
328         Annotations
329         CmdLineParser
330         CodeOutput
331         Config
332         Constants
333         DriverMkDepend
334         DriverPhases
335         PipelineMonad
336         DriverPipeline
337         DynFlags
338         ErrUtils
339         Finder
340         GHC
341         GhcMake
342         GhcPlugins
343         DynamicLoading
344         HeaderInfo
345         HscMain
346         HscStats
347         HscTypes
348         InteractiveEval
349         InteractiveEvalTypes
350         PackageConfig
351         Packages
352         PlatformConstants
353         Plugins
354         TcPluginM
355         PprTyThing
356         StaticFlags
357         StaticPtrTable
358         SysTools
359         SysTools.Terminal
360         Elf
361         TidyPgm
362         Ctype
363         HaddockUtils
364         Lexer
365         OptCoercion
366         Parser
367         RdrHsSyn
368         ApiAnnotation
369         ForeignCall
370         KnownUniques
371         PrelInfo
372         PrelNames
373         PrelRules
374         PrimOp
375         TysPrim
376         TysWiredIn
377         CostCentre
378         ProfInit
379         SCCfinal
380         RnBinds
381         RnEnv
382         RnExpr
383         RnHsDoc
384         RnNames
385         RnPat
386         RnSource
387         RnSplice
388         RnTypes
389         CoreMonad
390         CSE
391         FloatIn
392         FloatOut
393         LiberateCase
394         OccurAnal
395         SAT
396         SetLevels
397         SimplCore
398         SimplEnv
399         SimplMonad
400         SimplUtils
401         Simplify
402         SimplStg
403         StgStats
404         StgCse
405         UnariseStg
406         RepType
407         Rules
408         SpecConstr
409         Specialise
410         CoreToStg
411         StgLint
412         StgSyn
413         CallArity
414         DmdAnal
415         WorkWrap
416         WwLib
417         FamInst
418         Inst
419         TcAnnotations
420         TcArrows
421         TcBinds
422         TcSigs
423         TcClassDcl
424         TcDefaults
425         TcDeriv
426         TcDerivInfer
427         TcDerivUtils
428         TcEnv
429         TcExpr
430         TcForeign
431         TcGenDeriv
432         TcGenFunctor
433         TcGenGenerics
434         TcHsSyn
435         TcHsType
436         TcInstDcls
437         TcMType
438         TcValidity
439         TcMatches
440         TcPat
441         TcPatSyn
442         TcRnDriver
443         TcBackpack
444         TcRnExports
445         TcRnMonad
446         TcRnTypes
447         TcRules
448         TcSimplify
449         TcErrors
450         TcTyClsDecls
451         TcTyDecls
452         TcTypeable
453         TcType
454         TcEvidence
455         TcUnify
456         TcInteract
457         TcCanonical
458         TcFlatten
459         TcSMonad
460         TcTypeNats
461         TcSplice
462         Class
463         Coercion
464         DsMeta
465         THNames
466         FamInstEnv
467         FunDeps
468         InstEnv
469         TyCon
470         CoAxiom
471         Kind
472         Type
473         TyCoRep
474         Unify
475         Bag
476         Binary
477         BooleanFormula
478         BufWrite
479         Digraph
480         Encoding
481         FastFunctions
482         FastMutInt
483         FastString
484         FastStringEnv
485         Fingerprint
486         FiniteMap
487         FV
488         GraphBase
489         GraphColor
490         GraphOps
491         GraphPpr
492         IOEnv
493         ListSetOps
494         ListT
495         Maybes
496         MonadUtils
497         OrdList
498         Outputable
499         Pair
500         Panic
501         Pretty
502         State
503         Stream
504         StringBuffer
505         UniqDFM
506         UniqDSet
507         UniqFM
508         UniqSet
509         Util
510         Vectorise.Builtins.Base
511         Vectorise.Builtins.Initialise
512         Vectorise.Builtins
513         Vectorise.Monad.Base
514         Vectorise.Monad.Naming
515         Vectorise.Monad.Local
516         Vectorise.Monad.Global
517         Vectorise.Monad.InstEnv
518         Vectorise.Monad
519         Vectorise.Utils.Base
520         Vectorise.Utils.Closure
521         Vectorise.Utils.Hoisting
522         Vectorise.Utils.PADict
523         Vectorise.Utils.Poly
524         Vectorise.Utils
525         Vectorise.Generic.Description
526         Vectorise.Generic.PAMethods
527         Vectorise.Generic.PADict
528         Vectorise.Generic.PData
529         Vectorise.Type.Env
530         Vectorise.Type.Type
531         Vectorise.Type.TyConDecl
532         Vectorise.Type.Classify
533         Vectorise.Convert
534         Vectorise.Vect
535         Vectorise.Var
536         Vectorise.Env
537         Vectorise.Exp
538         Vectorise
539         Hoopl.Dataflow
540         Hoopl
541 --        CgInfoTbls used in ghci/DebuggerUtils
542 --        CgHeapery  mkVirtHeapOffsets used in ghci
543
544     Exposed-Modules:
545             AsmCodeGen
546             TargetReg
547             NCGMonad
548             Instruction
549             Format
550             Reg
551             RegClass
552             PIC
553             Platform
554             CPrim
555             X86.Regs
556             X86.RegInfo
557             X86.Instr
558             X86.Cond
559             X86.Ppr
560             X86.CodeGen
561             PPC.Regs
562             PPC.RegInfo
563             PPC.Instr
564             PPC.Cond
565             PPC.Ppr
566             PPC.CodeGen
567             SPARC.Base
568             SPARC.Regs
569             SPARC.Imm
570             SPARC.AddrMode
571             SPARC.Cond
572             SPARC.Instr
573             SPARC.Stack
574             SPARC.ShortcutJump
575             SPARC.Ppr
576             SPARC.CodeGen
577             SPARC.CodeGen.Amode
578             SPARC.CodeGen.Base
579             SPARC.CodeGen.CondCode
580             SPARC.CodeGen.Gen32
581             SPARC.CodeGen.Gen64
582             SPARC.CodeGen.Sanity
583             SPARC.CodeGen.Expand
584             RegAlloc.Liveness
585             RegAlloc.Graph.Main
586             RegAlloc.Graph.Stats
587             RegAlloc.Graph.ArchBase
588             RegAlloc.Graph.ArchX86
589             RegAlloc.Graph.Coalesce
590             RegAlloc.Graph.Spill
591             RegAlloc.Graph.SpillClean
592             RegAlloc.Graph.SpillCost
593             RegAlloc.Graph.TrivColorable
594             RegAlloc.Linear.Main
595             RegAlloc.Linear.JoinToTargets
596             RegAlloc.Linear.State
597             RegAlloc.Linear.Stats
598             RegAlloc.Linear.FreeRegs
599             RegAlloc.Linear.StackMap
600             RegAlloc.Linear.Base
601             RegAlloc.Linear.X86.FreeRegs
602             RegAlloc.Linear.X86_64.FreeRegs
603             RegAlloc.Linear.PPC.FreeRegs
604             RegAlloc.Linear.SPARC.FreeRegs
605             Dwarf
606             Dwarf.Types
607             Dwarf.Constants
608             Convert
609             ByteCodeTypes
610             ByteCodeAsm
611             ByteCodeGen
612             ByteCodeInstr
613             ByteCodeItbls
614             ByteCodeLink
615             Debugger
616             Linker
617             RtClosureInspect
618             DebuggerUtils
619             GHCi
620
621     if !flag(stage1)
622         -- ghc:Serialized moved to ghc-boot:GHC.Serialized.  So for
623         -- compatibility with GHC 7.10 and earlier, we reexport it
624         -- under the old name.
625         reexported-modules:
626             ghc-boot:GHC.Serialized as Serialized