Refactor TcDeriv and TcGenDeriv
[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                    deepseq    >= 1.4 && < 1.5,
49                    directory  >= 1   && < 1.3,
50                    process    >= 1   && < 1.5,
51                    bytestring >= 0.9 && < 0.11,
52                    binary     == 0.8.*,
53                    time       >= 1.4 && < 1.7,
54                    containers >= 0.5 && < 0.6,
55                    array      >= 0.1 && < 0.6,
56                    filepath   >= 1   && < 1.5,
57                    template-haskell == 2.11.*,
58                    hpc        == 0.6.*,
59                    transformers == 0.5.*,
60                    ghc-boot   == @ProjectVersionMunged@,
61                    hoopl      >= 3.10.2 && < 3.11
62
63     if os(windows)
64         Build-Depends: Win32  == 2.3.*
65     else
66         Build-Depends: unix   == 2.7.*
67
68     if flag(ghci)
69         Build-Depends: ghci == @ProjectVersionMunged@
70
71     GHC-Options: -Wall -fno-warn-name-shadowing
72
73     if flag(ghci)
74         CPP-Options: -DGHCI
75         Include-Dirs: ../rts/dist/build @FFIIncludeDir@
76
77     Other-Extensions:
78         BangPatterns
79         CPP
80         DataKinds
81         DeriveDataTypeable
82         DeriveFoldable
83         DeriveFunctor
84         DeriveTraversable
85         DisambiguateRecordFields
86         ExplicitForAll
87         FlexibleContexts
88         FlexibleInstances
89         GADTs
90         GeneralizedNewtypeDeriving
91         MagicHash
92         MultiParamTypeClasses
93         NamedFieldPuns
94         NondecreasingIndentation
95         RankNTypes
96         RecordWildCards
97         ScopedTypeVariables
98         StandaloneDeriving
99         Trustworthy
100         TupleSections
101         TypeFamilies
102         TypeSynonymInstances
103         UnboxedTuples
104         UndecidableInstances
105
106     Include-Dirs: . parser utils
107
108     -- We need to set the unit id to ghc (without a version number)
109     -- as it's magic.  But we can't set it for old versions of GHC (e.g.
110     -- when bootstrapping) because those versions of GHC don't understand
111     -- that GHC is wired-in.
112     if impl ( ghc >= 7.11 )
113         GHC-Options: -this-unit-id ghc
114     else
115         if impl( ghc >= 7.9 )
116             GHC-Options: -this-package-key ghc
117
118     if flag(stage1)
119         Include-Dirs: stage1
120     else
121         if flag(stage2)
122             Include-Dirs: stage2
123         else
124             if flag(stage3)
125                 Include-Dirs: stage2
126
127     Install-Includes: HsVersions.h, ghc_boot_platform.h
128
129     c-sources:
130         parser/cutils.c
131         ghci/keepCAFsForGHCi.c
132         cbits/genSym.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         RepType
389         Rules
390         SpecConstr
391         Specialise
392         CoreToStg
393         StgLint
394         StgSyn
395         CallArity
396         DmdAnal
397         WorkWrap
398         WwLib
399         FamInst
400         Inst
401         TcAnnotations
402         TcArrows
403         TcBinds
404         TcSigs
405         TcClassDcl
406         TcDefaults
407         TcDeriv
408         TcDerivInfer
409         TcDerivUtils
410         TcEnv
411         TcExpr
412         TcForeign
413         TcGenDeriv
414         TcGenFunctor
415         TcGenGenerics
416         TcHsSyn
417         TcHsType
418         TcInstDcls
419         TcMType
420         TcValidity
421         TcMatches
422         TcPat
423         TcPatSyn
424         TcRnDriver
425         TcRnMonad
426         TcRnTypes
427         TcRules
428         TcSimplify
429         TcErrors
430         TcTyClsDecls
431         TcTyDecls
432         TcTypeable
433         TcType
434         TcEvidence
435         TcUnify
436         TcInteract
437         TcCanonical
438         TcFlatten
439         TcSMonad
440         TcTypeNats
441         TcSplice
442         Class
443         Coercion
444         DsMeta
445         THNames
446         FamInstEnv
447         FunDeps
448         InstEnv
449         TyCon
450         CoAxiom
451         Kind
452         Type
453         TyCoRep
454         Unify
455         Bag
456         Binary
457         BooleanFormula
458         BufWrite
459         Digraph
460         Encoding
461         FastFunctions
462         FastMutInt
463         FastString
464         FastStringEnv
465         Fingerprint
466         FiniteMap
467         FV
468         GraphBase
469         GraphColor
470         GraphOps
471         GraphPpr
472         IOEnv
473         ListSetOps
474         Maybes
475         MonadUtils
476         OrdList
477         Outputable
478         Pair
479         Panic
480         Pretty
481         State
482         Stream
483         StringBuffer
484         UniqDFM
485         UniqDSet
486         UniqFM
487         UniqSet
488         Util
489         Vectorise.Builtins.Base
490         Vectorise.Builtins.Initialise
491         Vectorise.Builtins
492         Vectorise.Monad.Base
493         Vectorise.Monad.Naming
494         Vectorise.Monad.Local
495         Vectorise.Monad.Global
496         Vectorise.Monad.InstEnv
497         Vectorise.Monad
498         Vectorise.Utils.Base
499         Vectorise.Utils.Closure
500         Vectorise.Utils.Hoisting
501         Vectorise.Utils.PADict
502         Vectorise.Utils.Poly
503         Vectorise.Utils
504         Vectorise.Generic.Description
505         Vectorise.Generic.PAMethods
506         Vectorise.Generic.PADict
507         Vectorise.Generic.PData
508         Vectorise.Type.Env
509         Vectorise.Type.Type
510         Vectorise.Type.TyConDecl
511         Vectorise.Type.Classify
512         Vectorise.Convert
513         Vectorise.Vect
514         Vectorise.Var
515         Vectorise.Env
516         Vectorise.Exp
517         Vectorise
518         Hoopl.Dataflow
519         Hoopl
520 --        CgInfoTbls used in ghci/DebuggerUtils
521 --        CgHeapery  mkVirtHeapOffsets used in ghci
522
523     Exposed-Modules:
524             AsmCodeGen
525             TargetReg
526             NCGMonad
527             Instruction
528             Format
529             Reg
530             RegClass
531             PIC
532             Platform
533             CPrim
534             X86.Regs
535             X86.RegInfo
536             X86.Instr
537             X86.Cond
538             X86.Ppr
539             X86.CodeGen
540             PPC.Regs
541             PPC.RegInfo
542             PPC.Instr
543             PPC.Cond
544             PPC.Ppr
545             PPC.CodeGen
546             SPARC.Base
547             SPARC.Regs
548             SPARC.Imm
549             SPARC.AddrMode
550             SPARC.Cond
551             SPARC.Instr
552             SPARC.Stack
553             SPARC.ShortcutJump
554             SPARC.Ppr
555             SPARC.CodeGen
556             SPARC.CodeGen.Amode
557             SPARC.CodeGen.Base
558             SPARC.CodeGen.CondCode
559             SPARC.CodeGen.Gen32
560             SPARC.CodeGen.Gen64
561             SPARC.CodeGen.Sanity
562             SPARC.CodeGen.Expand
563             RegAlloc.Liveness
564             RegAlloc.Graph.Main
565             RegAlloc.Graph.Stats
566             RegAlloc.Graph.ArchBase
567             RegAlloc.Graph.ArchX86
568             RegAlloc.Graph.Coalesce
569             RegAlloc.Graph.Spill
570             RegAlloc.Graph.SpillClean
571             RegAlloc.Graph.SpillCost
572             RegAlloc.Graph.TrivColorable
573             RegAlloc.Linear.Main
574             RegAlloc.Linear.JoinToTargets
575             RegAlloc.Linear.State
576             RegAlloc.Linear.Stats
577             RegAlloc.Linear.FreeRegs
578             RegAlloc.Linear.StackMap
579             RegAlloc.Linear.Base
580             RegAlloc.Linear.X86.FreeRegs
581             RegAlloc.Linear.X86_64.FreeRegs
582             RegAlloc.Linear.PPC.FreeRegs
583             RegAlloc.Linear.SPARC.FreeRegs
584             Dwarf
585             Dwarf.Types
586             Dwarf.Constants
587
588     if !flag(stage1)
589         -- ghc:Serialized moved to ghc-boot:GHC.Serialized.  So for
590         -- compatibility with GHC 7.10 and earlier, we reexport it
591         -- under the old name.
592         reexported-modules:
593             ghc-boot:GHC.Serialized as Serialized
594
595     if flag(ghci)
596         Exposed-Modules:
597             Convert
598             ByteCodeTypes
599             ByteCodeAsm
600             ByteCodeGen
601             ByteCodeInstr
602             ByteCodeItbls
603             ByteCodeLink
604             Debugger
605             Linker
606             RtClosureInspect
607             DebuggerUtils
608             GHCi