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