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