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