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