Use ar for -staticlib
[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.9 && < 5,
53                    deepseq    >= 1.4 && < 1.5,
54                    directory  >= 1   && < 1.4,
55                    process    >= 1   && < 1.7,
56                    bytestring >= 0.9 && < 0.11,
57                    binary     == 0.8.*,
58                    time       >= 1.4 && < 1.9,
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
69     if os(windows)
70         Build-Depends: Win32  >= 2.3 && < 2.6
71     else
72         if flag(terminfo)
73             Build-Depends: terminfo == 0.4.*
74         Build-Depends: unix   == 2.7.*
75
76     GHC-Options: -Wall
77                  -Wno-name-shadowing
78                  -Wnoncanonical-monad-instances
79                  -Wnoncanonical-monadfail-instances
80                  -Wnoncanonical-monoid-instances
81
82     if flag(ghci)
83         CPP-Options: -DGHCI
84         Include-Dirs: ../rts/dist/build @FFIIncludeDir@
85
86     Other-Extensions:
87         BangPatterns
88         CPP
89         DataKinds
90         DeriveDataTypeable
91         DeriveFoldable
92         DeriveFunctor
93         DeriveTraversable
94         DisambiguateRecordFields
95         ExplicitForAll
96         FlexibleContexts
97         FlexibleInstances
98         GADTs
99         GeneralizedNewtypeDeriving
100         MagicHash
101         MultiParamTypeClasses
102         NamedFieldPuns
103         NondecreasingIndentation
104         RankNTypes
105         RecordWildCards
106         ScopedTypeVariables
107         StandaloneDeriving
108         Trustworthy
109         TupleSections
110         TypeFamilies
111         TypeSynonymInstances
112         UnboxedTuples
113         UndecidableInstances
114
115     Include-Dirs: . parser utils
116
117     -- We need to set the unit id to ghc (without a version number)
118     -- as it's magic.
119     GHC-Options: -this-unit-id ghc
120
121     if flag(stage1)
122         Include-Dirs: stage1
123     else
124         if flag(stage2)
125             Include-Dirs: stage2
126         else
127             if flag(stage3)
128                 Include-Dirs: stage2
129
130     Install-Includes: HsVersions.h, ghc_boot_platform.h
131
132     c-sources:
133         parser/cutils.c
134         ghci/keepCAFsForGHCi.c
135         cbits/genSym.c
136
137     hs-source-dirs:
138         backpack
139         basicTypes
140         cmm
141         codeGen
142         coreSyn
143         deSugar
144         ghci
145         hsSyn
146         iface
147         llvmGen
148         main
149         nativeGen
150         parser
151         prelude
152         profiling
153         rename
154         simplCore
155         simplStg
156         specialise
157         stgSyn
158         stranal
159         typecheck
160         types
161         utils
162         vectorise
163
164     Exposed-Modules:
165         Ar
166         FileCleanup
167         DriverBkp
168         BkpSyn
169         NameShape
170         RnModIface
171         Avail
172         AsmUtils
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         EnumSet
240         MkGraph
241         PprBase
242         PprC
243         PprCmm
244         PprCmmDecl
245         PprCmmExpr
246         Bitmap
247         CodeGen.Platform
248         CodeGen.Platform.ARM
249         CodeGen.Platform.ARM64
250         CodeGen.Platform.NoRegs
251         CodeGen.Platform.PPC
252         CodeGen.Platform.PPC_Darwin
253         CodeGen.Platform.SPARC
254         CodeGen.Platform.X86
255         CodeGen.Platform.X86_64
256         CgUtils
257         StgCmm
258         StgCmmBind
259         StgCmmClosure
260         StgCmmCon
261         StgCmmEnv
262         StgCmmExpr
263         StgCmmForeign
264         StgCmmHeap
265         StgCmmHpc
266         StgCmmArgRep
267         StgCmmLayout
268         StgCmmMonad
269         StgCmmPrim
270         StgCmmProf
271         StgCmmTicky
272         StgCmmUtils
273         StgCmmExtCode
274         SMRep
275         CoreArity
276         CoreFVs
277         CoreLint
278         CorePrep
279         CoreSubst
280         CoreOpt
281         CoreSyn
282         TrieMap
283         CoreTidy
284         CoreUnfold
285         CoreUtils
286         CoreSeq
287         CoreStats
288         MkCore
289         PprCore
290         PmExpr
291         TmOracle
292         Check
293         Coverage
294         Desugar
295         DsArrows
296         DsBinds
297         DsCCall
298         DsExpr
299         DsForeign
300         DsGRHSs
301         DsListComp
302         DsMonad
303         DsUsage
304         DsUtils
305         Match
306         MatchCon
307         MatchLit
308         HsBinds
309         HsDecls
310         HsDoc
311         HsExpr
312         HsImpExp
313         HsLit
314         PlaceHolder
315         HsExtension
316         HsPat
317         HsSyn
318         HsTypes
319         HsUtils
320         HsDumpAst
321         BinIface
322         BinFingerprint
323         BuildTyCl
324         IfaceEnv
325         IfaceSyn
326         IfaceType
327         ToIface
328         LoadIface
329         MkIface
330         TcIface
331         FlagChecker
332         Annotations
333         CmdLineParser
334         CodeOutput
335         Config
336         Constants
337         DriverMkDepend
338         DriverPhases
339         PipelineMonad
340         DriverPipeline
341         DynFlags
342         ErrUtils
343         Finder
344         GHC
345         GhcMake
346         GhcPlugins
347         DynamicLoading
348         HeaderInfo
349         HscMain
350         HscStats
351         HscTypes
352         InteractiveEval
353         InteractiveEvalTypes
354         PackageConfig
355         Packages
356         PlatformConstants
357         Plugins
358         TcPluginM
359         PprTyThing
360         StaticPtrTable
361         SysTools
362         SysTools.Terminal
363         Elf
364         TidyPgm
365         Ctype
366         HaddockUtils
367         Lexer
368         OptCoercion
369         Parser
370         RdrHsSyn
371         ApiAnnotation
372         ForeignCall
373         KnownUniques
374         PrelInfo
375         PrelNames
376         PrelRules
377         PrimOp
378         TysPrim
379         TysWiredIn
380         CostCentre
381         ProfInit
382         SCCfinal
383         RnBinds
384         RnEnv
385         RnExpr
386         RnHsDoc
387         RnNames
388         RnPat
389         RnSource
390         RnSplice
391         RnTypes
392         RnFixity
393         RnUtils
394         RnUnbound
395         CoreMonad
396         CSE
397         FloatIn
398         FloatOut
399         LiberateCase
400         OccurAnal
401         SAT
402         SetLevels
403         SimplCore
404         SimplEnv
405         SimplMonad
406         SimplUtils
407         Simplify
408         SimplStg
409         StgStats
410         StgCse
411         UnariseStg
412         RepType
413         Rules
414         SpecConstr
415         Specialise
416         CoreToStg
417         StgLint
418         StgSyn
419         CallArity
420         DmdAnal
421         WorkWrap
422         WwLib
423         FamInst
424         Inst
425         TcAnnotations
426         TcArrows
427         TcBinds
428         TcSigs
429         TcClassDcl
430         TcDefaults
431         TcDeriv
432         TcDerivInfer
433         TcDerivUtils
434         TcEnv
435         TcExpr
436         TcForeign
437         TcGenDeriv
438         TcGenFunctor
439         TcGenGenerics
440         TcHsSyn
441         TcHsType
442         TcInstDcls
443         TcMType
444         TcValidity
445         TcMatches
446         TcPat
447         TcPatSyn
448         TcRnDriver
449         TcBackpack
450         TcRnExports
451         TcRnMonad
452         TcRnTypes
453         TcRules
454         TcSimplify
455         TcErrors
456         TcTyClsDecls
457         TcTyDecls
458         TcTypeable
459         TcType
460         TcEvidence
461         TcUnify
462         TcInteract
463         TcCanonical
464         TcFlatten
465         TcSMonad
466         TcTypeNats
467         TcSplice
468         Class
469         Coercion
470         DsMeta
471         THNames
472         FamInstEnv
473         FunDeps
474         InstEnv
475         TyCon
476         CoAxiom
477         Kind
478         Type
479         TyCoRep
480         Unify
481         Bag
482         Binary
483         BooleanFormula
484         BufWrite
485         Digraph
486         Encoding
487         FastFunctions
488         FastMutInt
489         FastString
490         FastStringEnv
491         Fingerprint
492         FiniteMap
493         FV
494         GraphBase
495         GraphColor
496         GraphOps
497         GraphPpr
498         IOEnv
499         Json
500         ListSetOps
501         ListT
502         Maybes
503         MonadUtils
504         OrdList
505         Outputable
506         Pair
507         Panic
508         PprColour
509         Pretty
510         State
511         Stream
512         StringBuffer
513         UniqDFM
514         UniqDSet
515         UniqFM
516         UniqMap
517         UniqSet
518         Util
519         Vectorise.Builtins.Base
520         Vectorise.Builtins.Initialise
521         Vectorise.Builtins
522         Vectorise.Monad.Base
523         Vectorise.Monad.Naming
524         Vectorise.Monad.Local
525         Vectorise.Monad.Global
526         Vectorise.Monad.InstEnv
527         Vectorise.Monad
528         Vectorise.Utils.Base
529         Vectorise.Utils.Closure
530         Vectorise.Utils.Hoisting
531         Vectorise.Utils.PADict
532         Vectorise.Utils.Poly
533         Vectorise.Utils
534         Vectorise.Generic.Description
535         Vectorise.Generic.PAMethods
536         Vectorise.Generic.PADict
537         Vectorise.Generic.PData
538         Vectorise.Type.Env
539         Vectorise.Type.Type
540         Vectorise.Type.TyConDecl
541         Vectorise.Type.Classify
542         Vectorise.Convert
543         Vectorise.Vect
544         Vectorise.Var
545         Vectorise.Env
546         Vectorise.Exp
547         Vectorise
548         Hoopl.Block
549         Hoopl.Collections
550         Hoopl.Dataflow
551         Hoopl.Graph
552         Hoopl.Label
553         Hoopl.Unique
554 --        CgInfoTbls used in ghci/DebuggerUtils
555 --        CgHeapery  mkVirtHeapOffsets used in ghci
556
557     Exposed-Modules:
558             AsmCodeGen
559             TargetReg
560             NCGMonad
561             Instruction
562             Format
563             Reg
564             RegClass
565             PIC
566             Platform
567             CPrim
568             X86.Regs
569             X86.RegInfo
570             X86.Instr
571             X86.Cond
572             X86.Ppr
573             X86.CodeGen
574             PPC.Regs
575             PPC.RegInfo
576             PPC.Instr
577             PPC.Cond
578             PPC.Ppr
579             PPC.CodeGen
580             SPARC.Base
581             SPARC.Regs
582             SPARC.Imm
583             SPARC.AddrMode
584             SPARC.Cond
585             SPARC.Instr
586             SPARC.Stack
587             SPARC.ShortcutJump
588             SPARC.Ppr
589             SPARC.CodeGen
590             SPARC.CodeGen.Amode
591             SPARC.CodeGen.Base
592             SPARC.CodeGen.CondCode
593             SPARC.CodeGen.Gen32
594             SPARC.CodeGen.Gen64
595             SPARC.CodeGen.Sanity
596             SPARC.CodeGen.Expand
597             RegAlloc.Liveness
598             RegAlloc.Graph.Main
599             RegAlloc.Graph.Stats
600             RegAlloc.Graph.ArchBase
601             RegAlloc.Graph.ArchX86
602             RegAlloc.Graph.Coalesce
603             RegAlloc.Graph.Spill
604             RegAlloc.Graph.SpillClean
605             RegAlloc.Graph.SpillCost
606             RegAlloc.Graph.TrivColorable
607             RegAlloc.Linear.Main
608             RegAlloc.Linear.JoinToTargets
609             RegAlloc.Linear.State
610             RegAlloc.Linear.Stats
611             RegAlloc.Linear.FreeRegs
612             RegAlloc.Linear.StackMap
613             RegAlloc.Linear.Base
614             RegAlloc.Linear.X86.FreeRegs
615             RegAlloc.Linear.X86_64.FreeRegs
616             RegAlloc.Linear.PPC.FreeRegs
617             RegAlloc.Linear.SPARC.FreeRegs
618             Dwarf
619             Dwarf.Types
620             Dwarf.Constants
621             Convert
622             ByteCodeTypes
623             ByteCodeAsm
624             ByteCodeGen
625             ByteCodeInstr
626             ByteCodeItbls
627             ByteCodeLink
628             Debugger
629             Linker
630             RtClosureInspect
631             DebuggerUtils
632             GHCi