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