Refactor validity checking for constraints
[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.7,
60                    array      >= 0.1 && < 0.6,
61                    filepath   >= 1   && < 1.5,
62                    template-haskell == 2.14.*,
63                    hpc        == 0.6.*,
64                    transformers == 0.5.*,
65                    ghc-boot   == @ProjectVersionMunged@,
66                    ghc-boot-th == @ProjectVersionMunged@,
67                    ghc-heap   == @ProjectVersionMunged@,
68                    ghci == @ProjectVersionMunged@
69
70     if os(windows)
71         Build-Depends: Win32  >= 2.3 && < 2.7
72     else
73         if flag(terminfo)
74             Build-Depends: terminfo == 0.4.*
75         Build-Depends: unix   >= 2.7 && < 2.9
76
77     GHC-Options: -Wall
78                  -Wno-name-shadowing
79                  -Wnoncanonical-monad-instances
80                  -Wnoncanonical-monadfail-instances
81                  -Wnoncanonical-monoid-instances
82
83     if flag(ghci)
84         CPP-Options: -DGHCI
85         Include-Dirs: ../rts/dist/build @FFIIncludeDir@
86
87     Other-Extensions:
88         BangPatterns
89         CPP
90         DataKinds
91         DeriveDataTypeable
92         DeriveFoldable
93         DeriveFunctor
94         DeriveTraversable
95         DisambiguateRecordFields
96         ExplicitForAll
97         FlexibleContexts
98         FlexibleInstances
99         GADTs
100         GeneralizedNewtypeDeriving
101         MagicHash
102         MultiParamTypeClasses
103         NamedFieldPuns
104         NondecreasingIndentation
105         RankNTypes
106         RecordWildCards
107         ScopedTypeVariables
108         StandaloneDeriving
109         Trustworthy
110         TupleSections
111         TypeFamilies
112         TypeSynonymInstances
113         UnboxedTuples
114         UndecidableInstances
115
116     Include-Dirs: . parser utils
117
118     -- We need to set the unit id to ghc (without a version number)
119     -- as it's magic.
120     GHC-Options: -this-unit-id ghc
121
122     if flag(stage1)
123         Include-Dirs: stage1
124     else
125         if flag(stage2)
126             Include-Dirs: stage2
127         else
128             if flag(stage3)
129                 Include-Dirs: stage2
130
131     Install-Includes: HsVersions.h, ghc_boot_platform.h
132
133     c-sources:
134         parser/cutils.c
135         ghci/keepCAFsForGHCi.c
136         cbits/genSym.c
137
138     hs-source-dirs:
139         backpack
140         basicTypes
141         cmm
142         codeGen
143         coreSyn
144         deSugar
145         ghci
146         hsSyn
147         iface
148         llvmGen
149         main
150         nativeGen
151         parser
152         prelude
153         profiling
154         rename
155         simplCore
156         simplStg
157         specialise
158         stgSyn
159         stranal
160         typecheck
161         types
162         utils
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         CoreMap
294         CoreSeq
295         CoreStats
296         MkCore
297         PprCore
298         PmExpr
299         TmOracle
300         Check
301         Coverage
302         Desugar
303         DsArrows
304         DsBinds
305         DsCCall
306         DsExpr
307         DsForeign
308         DsGRHSs
309         DsListComp
310         DsMonad
311         DsUsage
312         DsUtils
313         ExtractDocs
314         Match
315         MatchCon
316         MatchLit
317         HsBinds
318         HsDecls
319         HsDoc
320         HsExpr
321         HsImpExp
322         HsLit
323         PlaceHolder
324         HsExtension
325         HsInstances
326         HsPat
327         HsSyn
328         HsTypes
329         HsUtils
330         HsDumpAst
331         BinIface
332         BinFingerprint
333         BuildTyCl
334         IfaceEnv
335         IfaceSyn
336         IfaceType
337         ToIface
338         LoadIface
339         MkIface
340         TcIface
341         FlagChecker
342         Annotations
343         CmdLineParser
344         CodeOutput
345         Config
346         Constants
347         DriverMkDepend
348         DriverPhases
349         PipelineMonad
350         DriverPipeline
351         DynFlags
352         ErrUtils
353         Finder
354         GHC
355         GhcMake
356         GhcPlugins
357         DynamicLoading
358         HeaderInfo
359         HscMain
360         HscStats
361         HscTypes
362         InteractiveEval
363         InteractiveEvalTypes
364         PackageConfig
365         Packages
366         PlatformConstants
367         Plugins
368         TcPluginM
369         PprTyThing
370         StaticPtrTable
371         SysTools
372         SysTools.BaseDir
373         SysTools.Terminal
374         SysTools.ExtraObj
375         SysTools.Info
376         SysTools.Process
377         SysTools.Tasks
378         Elf
379         TidyPgm
380         Ctype
381         HaddockUtils
382         Lexer
383         OptCoercion
384         Parser
385         RdrHsSyn
386         ApiAnnotation
387         ForeignCall
388         KnownUniques
389         PrelInfo
390         PrelNames
391         PrelRules
392         PrimOp
393         TysPrim
394         TysWiredIn
395         CostCentre
396         CostCentreState
397         ProfInit
398         RnBinds
399         RnEnv
400         RnExpr
401         RnHsDoc
402         RnNames
403         RnPat
404         RnSource
405         RnSplice
406         RnTypes
407         RnFixity
408         RnUtils
409         RnUnbound
410         CoreMonad
411         CSE
412         FloatIn
413         FloatOut
414         LiberateCase
415         OccurAnal
416         SAT
417         SetLevels
418         SimplCore
419         SimplEnv
420         SimplMonad
421         SimplUtils
422         Simplify
423         SimplStg
424         StgStats
425         StgCse
426         UnariseStg
427         RepType
428         Rules
429         SpecConstr
430         Specialise
431         CoreToStg
432         StgLint
433         StgSyn
434         CallArity
435         DmdAnal
436         Exitify
437         WorkWrap
438         WwLib
439         FamInst
440         ClsInst
441         Inst
442         TcAnnotations
443         TcArrows
444         TcBinds
445         TcSigs
446         TcClassDcl
447         TcDefaults
448         TcDeriv
449         TcDerivInfer
450         TcDerivUtils
451         TcEnv
452         TcExpr
453         TcForeign
454         TcGenDeriv
455         TcGenFunctor
456         TcGenGenerics
457         TcHsSyn
458         TcHsType
459         TcInstDcls
460         TcMType
461         TcValidity
462         TcMatches
463         TcPat
464         TcPatSyn
465         TcRnDriver
466         TcBackpack
467         TcRnExports
468         TcRnMonad
469         TcRnTypes
470         TcRules
471         TcSimplify
472         TcHoleErrors
473         TcErrors
474         TcTyClsDecls
475         TcTyDecls
476         TcTypeable
477         TcType
478         TcEvidence
479         TcEvTerm
480         TcUnify
481         TcInteract
482         TcCanonical
483         TcFlatten
484         TcSMonad
485         TcTypeNats
486         TcSplice
487         Class
488         Coercion
489         DsMeta
490         THNames
491         FamInstEnv
492         FunDeps
493         InstEnv
494         TyCon
495         CoAxiom
496         Kind
497         Type
498         TyCoRep
499         Unify
500         Bag
501         Binary
502         BooleanFormula
503         BufWrite
504         Digraph
505         Encoding
506         FastFunctions
507         FastMutInt
508         FastString
509         FastStringEnv
510         Fingerprint
511         FiniteMap
512         FV
513         GraphBase
514         GraphColor
515         GraphOps
516         GraphPpr
517         IOEnv
518         Json
519         ListSetOps
520         ListT
521         Maybes
522         MonadUtils
523         OrdList
524         Outputable
525         Pair
526         Panic
527         PprColour
528         Pretty
529         State
530         Stream
531         StringBuffer
532         UniqDFM
533         UniqDSet
534         UniqFM
535         UniqMap
536         UniqSet
537         Util
538         Hoopl.Block
539         Hoopl.Collections
540         Hoopl.Dataflow
541         Hoopl.Graph
542         Hoopl.Label
543 --        CgInfoTbls used in ghci/DebuggerUtils
544 --        CgHeapery  mkVirtHeapOffsets used in ghci
545
546     Exposed-Modules:
547             AsmCodeGen
548             TargetReg
549             NCGMonad
550             Instruction
551             Format
552             Reg
553             RegClass
554             PIC
555             Platform
556             CPrim
557             X86.Regs
558             X86.RegInfo
559             X86.Instr
560             X86.Cond
561             X86.Ppr
562             X86.CodeGen
563             PPC.Regs
564             PPC.RegInfo
565             PPC.Instr
566             PPC.Cond
567             PPC.Ppr
568             PPC.CodeGen
569             SPARC.Base
570             SPARC.Regs
571             SPARC.Imm
572             SPARC.AddrMode
573             SPARC.Cond
574             SPARC.Instr
575             SPARC.Stack
576             SPARC.ShortcutJump
577             SPARC.Ppr
578             SPARC.CodeGen
579             SPARC.CodeGen.Amode
580             SPARC.CodeGen.Base
581             SPARC.CodeGen.CondCode
582             SPARC.CodeGen.Gen32
583             SPARC.CodeGen.Gen64
584             SPARC.CodeGen.Sanity
585             SPARC.CodeGen.Expand
586             RegAlloc.Liveness
587             RegAlloc.Graph.Main
588             RegAlloc.Graph.Stats
589             RegAlloc.Graph.ArchBase
590             RegAlloc.Graph.ArchX86
591             RegAlloc.Graph.Coalesce
592             RegAlloc.Graph.Spill
593             RegAlloc.Graph.SpillClean
594             RegAlloc.Graph.SpillCost
595             RegAlloc.Graph.TrivColorable
596             RegAlloc.Linear.Main
597             RegAlloc.Linear.JoinToTargets
598             RegAlloc.Linear.State
599             RegAlloc.Linear.Stats
600             RegAlloc.Linear.FreeRegs
601             RegAlloc.Linear.StackMap
602             RegAlloc.Linear.Base
603             RegAlloc.Linear.X86.FreeRegs
604             RegAlloc.Linear.X86_64.FreeRegs
605             RegAlloc.Linear.PPC.FreeRegs
606             RegAlloc.Linear.SPARC.FreeRegs
607             Dwarf
608             Dwarf.Types
609             Dwarf.Constants
610             Convert
611             ByteCodeTypes
612             ByteCodeAsm
613             ByteCodeGen
614             ByteCodeInstr
615             ByteCodeItbls
616             ByteCodeLink
617             Debugger
618             Linker
619             RtClosureInspect
620             GHCi