Windows: Improve terminal detection mechanism
[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   && < 5,
53                    deepseq    >= 1.4 && < 1.5,
54                    directory  >= 1   && < 1.4,
55                    process    >= 1   && < 1.5,
56                    bytestring >= 0.9 && < 0.11,
57                    binary     == 0.8.*,
58                    time       >= 1.4 && < 1.7,
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                    hoopl      >= 3.10.2 && < 3.11
68
69     if os(windows)
70         Build-Depends: Win32  == 2.3.*
71     else
72         if flag(terminfo)
73             Build-Depends: terminfo == 0.4.*
74         Build-Depends: unix   == 2.7.*
75
76     if flag(ghci)
77         Build-Depends: ghci == @ProjectVersionMunged@
78
79     GHC-Options: -Wall -fno-warn-name-shadowing
80
81     if flag(ghci)
82         CPP-Options: -DGHCI
83         Include-Dirs: ../rts/dist/build @FFIIncludeDir@
84
85     Other-Extensions:
86         BangPatterns
87         CPP
88         DataKinds
89         DeriveDataTypeable
90         DeriveFoldable
91         DeriveFunctor
92         DeriveTraversable
93         DisambiguateRecordFields
94         ExplicitForAll
95         FlexibleContexts
96         FlexibleInstances
97         GADTs
98         GeneralizedNewtypeDeriving
99         MagicHash
100         MultiParamTypeClasses
101         NamedFieldPuns
102         NondecreasingIndentation
103         RankNTypes
104         RecordWildCards
105         ScopedTypeVariables
106         StandaloneDeriving
107         Trustworthy
108         TupleSections
109         TypeFamilies
110         TypeSynonymInstances
111         UnboxedTuples
112         UndecidableInstances
113
114     Include-Dirs: . parser utils
115
116     -- We need to set the unit id to ghc (without a version number)
117     -- as it's magic.  But we can't set it for old versions of GHC (e.g.
118     -- when bootstrapping) because those versions of GHC don't understand
119     -- that GHC is wired-in.
120     if impl ( ghc >= 7.11 )
121         GHC-Options: -this-unit-id ghc
122     else
123         if impl( ghc >= 7.9 )
124             GHC-Options: -this-package-key ghc
125
126     if flag(stage1)
127         Include-Dirs: stage1
128     else
129         if flag(stage2)
130             Include-Dirs: stage2
131         else
132             if flag(stage3)
133                 Include-Dirs: stage2
134
135     Install-Includes: HsVersions.h, ghc_boot_platform.h
136
137     c-sources:
138         parser/cutils.c
139         ghci/keepCAFsForGHCi.c
140         cbits/genSym.c
141
142     hs-source-dirs:
143         backpack
144         basicTypes
145         cmm
146         codeGen
147         coreSyn
148         deSugar
149         ghci
150         hsSyn
151         iface
152         llvmGen
153         main
154         nativeGen
155         parser
156         prelude
157         profiling
158         rename
159         simplCore
160         simplStg
161         specialise
162         stgSyn
163         stranal
164         typecheck
165         types
166         utils
167         vectorise
168
169     Exposed-Modules:
170         DriverBkp
171         BkpSyn
172         NameShape
173         RnModIface
174         Avail
175         BasicTypes
176         ConLike
177         DataCon
178         PatSyn
179         Demand
180         Debug
181         Exception
182         FieldLabel
183         GhcMonad
184         Hooks
185         Id
186         IdInfo
187         Lexeme
188         Literal
189         Llvm
190         Llvm.AbsSyn
191         Llvm.MetaData
192         Llvm.PpLlvm
193         Llvm.Types
194         LlvmCodeGen
195         LlvmCodeGen.Base
196         LlvmCodeGen.CodeGen
197         LlvmCodeGen.Data
198         LlvmCodeGen.Ppr
199         LlvmCodeGen.Regs
200         LlvmMangler
201         MkId
202         Module
203         Name
204         NameEnv
205         NameSet
206         OccName
207         RdrName
208         NameCache
209         SrcLoc
210         UniqSupply
211         Unique
212         Var
213         VarEnv
214         VarSet
215         UnVarGraph
216         BlockId
217         CLabel
218         Cmm
219         CmmBuildInfoTables
220         CmmPipeline
221         CmmCallConv
222         CmmCommonBlockElim
223         CmmImplementSwitchPlans
224         CmmContFlowOpt
225         CmmExpr
226         CmmInfo
227         CmmLex
228         CmmLint
229         CmmLive
230         CmmMachOp
231         CmmMonad
232         CmmSwitch
233         CmmNode
234         CmmOpt
235         CmmParse
236         CmmProcPoint
237         CmmSink
238         CmmType
239         CmmUtils
240         CmmLayoutStack
241         MkGraph
242         PprBase
243         PprC
244         PprCmm
245         PprCmmDecl
246         PprCmmExpr
247         Bitmap
248         CodeGen.Platform
249         CodeGen.Platform.ARM
250         CodeGen.Platform.ARM64
251         CodeGen.Platform.NoRegs
252         CodeGen.Platform.PPC
253         CodeGen.Platform.PPC_Darwin
254         CodeGen.Platform.SPARC
255         CodeGen.Platform.X86
256         CodeGen.Platform.X86_64
257         CgUtils
258         StgCmm
259         StgCmmBind
260         StgCmmClosure
261         StgCmmCon
262         StgCmmEnv
263         StgCmmExpr
264         StgCmmForeign
265         StgCmmHeap
266         StgCmmHpc
267         StgCmmArgRep
268         StgCmmLayout
269         StgCmmMonad
270         StgCmmPrim
271         StgCmmProf
272         StgCmmTicky
273         StgCmmUtils
274         StgCmmExtCode
275         SMRep
276         CoreArity
277         CoreFVs
278         CoreLint
279         CorePrep
280         CoreSubst
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         DsUtils
304         Match
305         MatchCon
306         MatchLit
307         HsBinds
308         HsDecls
309         HsDoc
310         HsExpr
311         HsImpExp
312         HsLit
313         PlaceHolder
314         HsPat
315         HsSyn
316         HsTypes
317         HsUtils
318         BinIface
319         BinFingerprint
320         BuildTyCl
321         IfaceEnv
322         IfaceSyn
323         IfaceType
324         ToIface
325         LoadIface
326         MkIface
327         TcIface
328         FlagChecker
329         Annotations
330         CmdLineParser
331         CodeOutput
332         Config
333         Constants
334         DriverMkDepend
335         DriverPhases
336         PipelineMonad
337         DriverPipeline
338         DynFlags
339         ErrUtils
340         Finder
341         GHC
342         GhcMake
343         GhcPlugins
344         DynamicLoading
345         HeaderInfo
346         HscMain
347         HscStats
348         HscTypes
349         InteractiveEval
350         InteractiveEvalTypes
351         PackageConfig
352         Packages
353         PlatformConstants
354         Plugins
355         TcPluginM
356         PprTyThing
357         StaticFlags
358         StaticPtrTable
359         SysTools
360         SysTools.Terminal
361         Elf
362         TidyPgm
363         Ctype
364         HaddockUtils
365         Lexer
366         OptCoercion
367         Parser
368         RdrHsSyn
369         ApiAnnotation
370         ForeignCall
371         KnownUniques
372         PrelInfo
373         PrelNames
374         PrelRules
375         PrimOp
376         TysPrim
377         TysWiredIn
378         CostCentre
379         ProfInit
380         SCCfinal
381         RnBinds
382         RnEnv
383         RnExpr
384         RnHsDoc
385         RnNames
386         RnPat
387         RnSource
388         RnSplice
389         RnTypes
390         CoreMonad
391         CSE
392         FloatIn
393         FloatOut
394         LiberateCase
395         OccurAnal
396         SAT
397         SetLevels
398         SimplCore
399         SimplEnv
400         SimplMonad
401         SimplUtils
402         Simplify
403         SimplStg
404         StgStats
405         UnariseStg
406         RepType
407         Rules
408         SpecConstr
409         Specialise
410         CoreToStg
411         StgLint
412         StgSyn
413         CallArity
414         DmdAnal
415         WorkWrap
416         WwLib
417         FamInst
418         Inst
419         TcAnnotations
420         TcArrows
421         TcBinds
422         TcSigs
423         TcClassDcl
424         TcDefaults
425         TcDeriv
426         TcDerivInfer
427         TcDerivUtils
428         TcEnv
429         TcExpr
430         TcForeign
431         TcGenDeriv
432         TcGenFunctor
433         TcGenGenerics
434         TcHsSyn
435         TcHsType
436         TcInstDcls
437         TcMType
438         TcValidity
439         TcMatches
440         TcPat
441         TcPatSyn
442         TcRnDriver
443         TcBackpack
444         TcRnExports
445         TcRnMonad
446         TcRnTypes
447         TcRules
448         TcSimplify
449         TcErrors
450         TcTyClsDecls
451         TcTyDecls
452         TcTypeable
453         TcType
454         TcEvidence
455         TcUnify
456         TcInteract
457         TcCanonical
458         TcFlatten
459         TcSMonad
460         TcTypeNats
461         TcSplice
462         Class
463         Coercion
464         DsMeta
465         THNames
466         FamInstEnv
467         FunDeps
468         InstEnv
469         TyCon
470         CoAxiom
471         Kind
472         Type
473         TyCoRep
474         Unify
475         Bag
476         Binary
477         BooleanFormula
478         BufWrite
479         Digraph
480         Encoding
481         FastFunctions
482         FastMutInt
483         FastString
484         FastStringEnv
485         Fingerprint
486         FiniteMap
487         FV
488         GraphBase
489         GraphColor
490         GraphOps
491         GraphPpr
492         IOEnv
493         ListSetOps
494         ListT
495         Maybes
496         MonadUtils
497         OrdList
498         Outputable
499         Pair
500         Panic
501         Pretty
502         State
503         Stream
504         StringBuffer
505         UniqDFM
506         UniqDSet
507         UniqFM
508         UniqSet
509         Util
510         Vectorise.Builtins.Base
511         Vectorise.Builtins.Initialise
512         Vectorise.Builtins
513         Vectorise.Monad.Base
514         Vectorise.Monad.Naming
515         Vectorise.Monad.Local
516         Vectorise.Monad.Global
517         Vectorise.Monad.InstEnv
518         Vectorise.Monad
519         Vectorise.Utils.Base
520         Vectorise.Utils.Closure
521         Vectorise.Utils.Hoisting
522         Vectorise.Utils.PADict
523         Vectorise.Utils.Poly
524         Vectorise.Utils
525         Vectorise.Generic.Description
526         Vectorise.Generic.PAMethods
527         Vectorise.Generic.PADict
528         Vectorise.Generic.PData
529         Vectorise.Type.Env
530         Vectorise.Type.Type
531         Vectorise.Type.TyConDecl
532         Vectorise.Type.Classify
533         Vectorise.Convert
534         Vectorise.Vect
535         Vectorise.Var
536         Vectorise.Env
537         Vectorise.Exp
538         Vectorise
539         Hoopl.Dataflow
540         Hoopl
541 --        CgInfoTbls used in ghci/DebuggerUtils
542 --        CgHeapery  mkVirtHeapOffsets used in ghci
543
544     Exposed-Modules:
545             AsmCodeGen
546             TargetReg
547             NCGMonad
548             Instruction
549             Format
550             Reg
551             RegClass
552             PIC
553             Platform
554             CPrim
555             X86.Regs
556             X86.RegInfo
557             X86.Instr
558             X86.Cond
559             X86.Ppr
560             X86.CodeGen
561             PPC.Regs
562             PPC.RegInfo
563             PPC.Instr
564             PPC.Cond
565             PPC.Ppr
566             PPC.CodeGen
567             SPARC.Base
568             SPARC.Regs
569             SPARC.Imm
570             SPARC.AddrMode
571             SPARC.Cond
572             SPARC.Instr
573             SPARC.Stack
574             SPARC.ShortcutJump
575             SPARC.Ppr
576             SPARC.CodeGen
577             SPARC.CodeGen.Amode
578             SPARC.CodeGen.Base
579             SPARC.CodeGen.CondCode
580             SPARC.CodeGen.Gen32
581             SPARC.CodeGen.Gen64
582             SPARC.CodeGen.Sanity
583             SPARC.CodeGen.Expand
584             RegAlloc.Liveness
585             RegAlloc.Graph.Main
586             RegAlloc.Graph.Stats
587             RegAlloc.Graph.ArchBase
588             RegAlloc.Graph.ArchX86
589             RegAlloc.Graph.Coalesce
590             RegAlloc.Graph.Spill
591             RegAlloc.Graph.SpillClean
592             RegAlloc.Graph.SpillCost
593             RegAlloc.Graph.TrivColorable
594             RegAlloc.Linear.Main
595             RegAlloc.Linear.JoinToTargets
596             RegAlloc.Linear.State
597             RegAlloc.Linear.Stats
598             RegAlloc.Linear.FreeRegs
599             RegAlloc.Linear.StackMap
600             RegAlloc.Linear.Base
601             RegAlloc.Linear.X86.FreeRegs
602             RegAlloc.Linear.X86_64.FreeRegs
603             RegAlloc.Linear.PPC.FreeRegs
604             RegAlloc.Linear.SPARC.FreeRegs
605             Dwarf
606             Dwarf.Types
607             Dwarf.Constants
608
609     if !flag(stage1)
610         -- ghc:Serialized moved to ghc-boot:GHC.Serialized.  So for
611         -- compatibility with GHC 7.10 and earlier, we reexport it
612         -- under the old name.
613         reexported-modules:
614             ghc-boot:GHC.Serialized as Serialized
615
616     if flag(ghci)
617         Exposed-Modules:
618             Convert
619             ByteCodeTypes
620             ByteCodeAsm
621             ByteCodeGen
622             ByteCodeInstr
623             ByteCodeItbls
624             ByteCodeLink
625             Debugger
626             Linker
627             RtClosureInspect
628             DebuggerUtils
629             GHCi