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