Add deepseq dependency and a few NFData instances
[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         TcEnv
409         TcExpr
410         TcForeign
411         TcGenDeriv
412         TcGenGenerics
413         TcHsSyn
414         TcHsType
415         TcInstDcls
416         TcMType
417         TcValidity
418         TcMatches
419         TcPat
420         TcPatSyn
421         TcRnDriver
422         TcRnMonad
423         TcRnTypes
424         TcRules
425         TcSimplify
426         TcErrors
427         TcTyClsDecls
428         TcTyDecls
429         TcTypeable
430         TcType
431         TcEvidence
432         TcUnify
433         TcInteract
434         TcCanonical
435         TcFlatten
436         TcSMonad
437         TcTypeNats
438         TcSplice
439         Class
440         Coercion
441         DsMeta
442         THNames
443         FamInstEnv
444         FunDeps
445         InstEnv
446         TyCon
447         CoAxiom
448         Kind
449         Type
450         TyCoRep
451         Unify
452         Bag
453         Binary
454         BooleanFormula
455         BufWrite
456         Digraph
457         Encoding
458         FastFunctions
459         FastMutInt
460         FastString
461         FastStringEnv
462         Fingerprint
463         FiniteMap
464         FV
465         GraphBase
466         GraphColor
467         GraphOps
468         GraphPpr
469         IOEnv
470         ListSetOps
471         Maybes
472         MonadUtils
473         OrdList
474         Outputable
475         Pair
476         Panic
477         Pretty
478         State
479         Stream
480         StringBuffer
481         UniqDFM
482         UniqDSet
483         UniqFM
484         UniqSet
485         Util
486         Vectorise.Builtins.Base
487         Vectorise.Builtins.Initialise
488         Vectorise.Builtins
489         Vectorise.Monad.Base
490         Vectorise.Monad.Naming
491         Vectorise.Monad.Local
492         Vectorise.Monad.Global
493         Vectorise.Monad.InstEnv
494         Vectorise.Monad
495         Vectorise.Utils.Base
496         Vectorise.Utils.Closure
497         Vectorise.Utils.Hoisting
498         Vectorise.Utils.PADict
499         Vectorise.Utils.Poly
500         Vectorise.Utils
501         Vectorise.Generic.Description
502         Vectorise.Generic.PAMethods
503         Vectorise.Generic.PADict
504         Vectorise.Generic.PData
505         Vectorise.Type.Env
506         Vectorise.Type.Type
507         Vectorise.Type.TyConDecl
508         Vectorise.Type.Classify
509         Vectorise.Convert
510         Vectorise.Vect
511         Vectorise.Var
512         Vectorise.Env
513         Vectorise.Exp
514         Vectorise
515         Hoopl.Dataflow
516         Hoopl
517 --        CgInfoTbls used in ghci/DebuggerUtils
518 --        CgHeapery  mkVirtHeapOffsets used in ghci
519
520     Exposed-Modules:
521             AsmCodeGen
522             TargetReg
523             NCGMonad
524             Instruction
525             Format
526             Reg
527             RegClass
528             PIC
529             Platform
530             CPrim
531             X86.Regs
532             X86.RegInfo
533             X86.Instr
534             X86.Cond
535             X86.Ppr
536             X86.CodeGen
537             PPC.Regs
538             PPC.RegInfo
539             PPC.Instr
540             PPC.Cond
541             PPC.Ppr
542             PPC.CodeGen
543             SPARC.Base
544             SPARC.Regs
545             SPARC.Imm
546             SPARC.AddrMode
547             SPARC.Cond
548             SPARC.Instr
549             SPARC.Stack
550             SPARC.ShortcutJump
551             SPARC.Ppr
552             SPARC.CodeGen
553             SPARC.CodeGen.Amode
554             SPARC.CodeGen.Base
555             SPARC.CodeGen.CondCode
556             SPARC.CodeGen.Gen32
557             SPARC.CodeGen.Gen64
558             SPARC.CodeGen.Sanity
559             SPARC.CodeGen.Expand
560             RegAlloc.Liveness
561             RegAlloc.Graph.Main
562             RegAlloc.Graph.Stats
563             RegAlloc.Graph.ArchBase
564             RegAlloc.Graph.ArchX86
565             RegAlloc.Graph.Coalesce
566             RegAlloc.Graph.Spill
567             RegAlloc.Graph.SpillClean
568             RegAlloc.Graph.SpillCost
569             RegAlloc.Graph.TrivColorable
570             RegAlloc.Linear.Main
571             RegAlloc.Linear.JoinToTargets
572             RegAlloc.Linear.State
573             RegAlloc.Linear.Stats
574             RegAlloc.Linear.FreeRegs
575             RegAlloc.Linear.StackMap
576             RegAlloc.Linear.Base
577             RegAlloc.Linear.X86.FreeRegs
578             RegAlloc.Linear.X86_64.FreeRegs
579             RegAlloc.Linear.PPC.FreeRegs
580             RegAlloc.Linear.SPARC.FreeRegs
581             Dwarf
582             Dwarf.Types
583             Dwarf.Constants
584
585     if !flag(stage1)
586         -- ghc:Serialized moved to ghc-boot:GHC.Serialized.  So for
587         -- compatibility with GHC 7.10 and earlier, we reexport it
588         -- under the old name.
589         reexported-modules:
590             ghc-boot:GHC.Serialized as Serialized
591
592     if flag(ghci)
593         Exposed-Modules:
594             Convert
595             ByteCodeTypes
596             ByteCodeAsm
597             ByteCodeGen
598             ByteCodeInstr
599             ByteCodeItbls
600             ByteCodeLink
601             Debugger
602             Linker
603             RtClosureInspect
604             DebuggerUtils
605             GHCi