1d439be3228d7d25f879bd43adc94c9af1bd1fe4
[ghc.git] / libraries / base / base.cabal
1 cabal-version:  2.1
2 name:           base
3 version:        4.12.0.0
4 -- NOTE: Don't forget to update ./changelog.md
5
6 license:        BSD-3-Clause
7 license-file:   LICENSE
8 maintainer:     libraries@haskell.org
9 bug-reports:    http://ghc.haskell.org/trac/ghc/newticket?component=libraries/base
10 synopsis:       Basic libraries
11 category:       Prelude
12 build-type:     Configure
13 description:
14     This package contains the Standard Haskell "Prelude" and its support libraries,
15     and a large collection of useful libraries ranging from data
16     structures to parsing combinators and debugging utilities.
17
18 extra-tmp-files:
19     autom4te.cache
20     base.buildinfo
21     config.log
22     config.status
23     include/EventConfig.h
24     include/HsBaseConfig.h
25
26 extra-source-files:
27     aclocal.m4
28     base.buildinfo.in
29     changelog.md
30     config.guess
31     config.sub
32     configure
33     configure.ac
34     include/CTypes.h
35     include/EventConfig.h.in
36     include/HsBaseConfig.h.in
37     include/ieee-flpt.h
38     include/md5.h
39     include/fs.h
40     install-sh
41
42 source-repository head
43     type:     git
44     location: http://git.haskell.org/ghc.git
45     subdir:   libraries/base
46
47 Flag integer-simple
48     Description: Use integer-simple
49     Manual: True
50     Default: False
51
52 Flag integer-gmp
53     Description: Use integer-gmp
54     Manual: True
55     Default: False
56
57 Library
58     default-language: Haskell2010
59     other-extensions:
60         BangPatterns
61         CApiFFI
62         CPP
63         ConstraintKinds
64         DataKinds
65         DeriveDataTypeable
66         DeriveGeneric
67         ExistentialQuantification
68         ExplicitForAll
69         FlexibleContexts
70         FlexibleInstances
71         FunctionalDependencies
72         GADTs
73         GeneralizedNewtypeDeriving
74         KindSignatures
75         MagicHash
76         MultiParamTypeClasses
77         NegativeLiterals
78         NoImplicitPrelude
79         NondecreasingIndentation
80         OverloadedStrings
81         ParallelArrays
82         PolyKinds
83         RankNTypes
84         RecordWildCards
85         RoleAnnotations
86         Safe
87         ScopedTypeVariables
88         StandaloneDeriving
89         Trustworthy
90         TypeFamilies
91         TypeOperators
92         TypeSynonymInstances
93         UnboxedTuples
94         UndecidableInstances
95         UnliftedFFITypes
96         Unsafe
97
98     build-depends: rts == 1.0, ghc-prim ^>= 0.5.1.0
99
100     -- sanity-check to ensure exactly one flag is set
101     if !((flag(integer-gmp) && !flag(integer-simple)) || (!flag(integer-gmp) && flag(integer-simple)))
102         build-depends: invalid-cabal-flag-settings<0
103
104     if flag(integer-simple)
105         build-depends: integer-simple ^>= 0.1.1
106
107     if flag(integer-gmp)
108         build-depends: integer-gmp ^>= 1.0.1
109         cpp-options: -DOPTIMISE_INTEGER_GCD_LCM
110
111     exposed-modules:
112         Control.Applicative
113         Control.Arrow
114         Control.Category
115         Control.Concurrent
116         Control.Concurrent.Chan
117         Control.Concurrent.MVar
118         Control.Concurrent.QSem
119         Control.Concurrent.QSemN
120         Control.Exception
121         Control.Exception.Base
122         Control.Monad
123         Control.Monad.Fail
124         Control.Monad.Fix
125         Control.Monad.Instances
126         Control.Monad.IO.Class
127         Control.Monad.ST
128         Control.Monad.ST.Lazy
129         Control.Monad.ST.Lazy.Safe
130         Control.Monad.ST.Lazy.Unsafe
131         Control.Monad.ST.Safe
132         Control.Monad.ST.Strict
133         Control.Monad.ST.Unsafe
134         Control.Monad.Zip
135         Data.Bifoldable
136         Data.Bifunctor
137         Data.Bitraversable
138         Data.Bits
139         Data.Bool
140         Data.Char
141         Data.Coerce
142         Data.Complex
143         Data.Data
144         Data.Dynamic
145         Data.Either
146         Data.Eq
147         Data.Fixed
148         Data.Foldable
149         Data.Function
150         Data.Functor
151         Data.Functor.Classes
152         Data.Functor.Contravariant
153         Data.Functor.Compose
154         Data.Functor.Const
155         Data.Functor.Identity
156         Data.Functor.Product
157         Data.Functor.Sum
158         Data.IORef
159         Data.Int
160         Data.Ix
161         Data.Kind
162         Data.List
163         Data.List.NonEmpty
164         Data.Maybe
165         Data.Monoid
166         Data.Ord
167         Data.Proxy
168         Data.Ratio
169         Data.Semigroup
170         Data.STRef
171         Data.STRef.Lazy
172         Data.STRef.Strict
173         Data.String
174         Data.Traversable
175         Data.Tuple
176         Data.Type.Bool
177         Data.Type.Coercion
178         Data.Type.Equality
179         Data.Typeable
180         Data.Unique
181         Data.Version
182         Data.Void
183         Data.Word
184         Debug.Trace
185         Foreign
186         Foreign.C
187         Foreign.C.Error
188         Foreign.C.String
189         Foreign.C.Types
190         Foreign.Concurrent
191         Foreign.ForeignPtr
192         Foreign.ForeignPtr.Safe
193         Foreign.ForeignPtr.Unsafe
194         Foreign.Marshal
195         Foreign.Marshal.Alloc
196         Foreign.Marshal.Array
197         Foreign.Marshal.Error
198         Foreign.Marshal.Pool
199         Foreign.Marshal.Safe
200         Foreign.Marshal.Unsafe
201         Foreign.Marshal.Utils
202         Foreign.Ptr
203         Foreign.Safe
204         Foreign.StablePtr
205         Foreign.Storable
206         GHC.Arr
207         GHC.Base
208         GHC.ByteOrder
209         GHC.Char
210         GHC.Clock
211         GHC.Conc
212         GHC.Conc.IO
213         GHC.Conc.Signal
214         GHC.Conc.Sync
215         GHC.ConsoleHandler
216         GHC.Constants
217         GHC.Desugar
218         GHC.Enum
219         GHC.Environment
220         GHC.Err
221         GHC.Exception
222         GHC.ExecutionStack
223         GHC.ExecutionStack.Internal
224         GHC.Exts
225         GHC.Fingerprint
226         GHC.Fingerprint.Type
227         GHC.Float
228         GHC.Float.ConversionUtils
229         GHC.Float.RealFracMethods
230         GHC.Foreign
231         GHC.ForeignPtr
232         GHC.GHCi
233         GHC.Generics
234         GHC.IO
235         GHC.IO.Buffer
236         GHC.IO.BufferedIO
237         GHC.IO.Device
238         GHC.IO.Encoding
239         GHC.IO.Encoding.CodePage
240         GHC.IO.Encoding.Failure
241         GHC.IO.Encoding.Iconv
242         GHC.IO.Encoding.Latin1
243         GHC.IO.Encoding.Types
244         GHC.IO.Encoding.UTF16
245         GHC.IO.Encoding.UTF32
246         GHC.IO.Encoding.UTF8
247         GHC.IO.Exception
248         GHC.IO.FD
249         GHC.IO.Handle
250         GHC.IO.Handle.FD
251         GHC.IO.Handle.Internals
252         GHC.IO.Handle.Lock
253         GHC.IO.Handle.Text
254         GHC.IO.Handle.Types
255         GHC.IO.IOMode
256         GHC.IO.Unsafe
257         GHC.IOArray
258         GHC.IORef
259         GHC.Int
260         GHC.List
261         GHC.MVar
262         GHC.Natural
263         GHC.Num
264         GHC.OldList
265         GHC.OverloadedLabels
266         GHC.Pack
267         GHC.Profiling
268         GHC.Ptr
269         GHC.Read
270         GHC.Real
271         GHC.Records
272         GHC.ResponseFile
273         GHC.RTS.Flags
274         GHC.ST
275         GHC.StaticPtr
276         GHC.STRef
277         GHC.Show
278         GHC.Stable
279         GHC.Stack
280         GHC.Stack.CCS
281         GHC.Stack.Types
282         GHC.Stats
283         GHC.Storable
284         GHC.TopHandler
285         GHC.TypeLits
286         GHC.TypeNats
287         GHC.Unicode
288         GHC.Weak
289         GHC.Word
290         Numeric
291         Numeric.Natural
292         Prelude
293         System.CPUTime
294         System.Console.GetOpt
295         System.Environment
296         System.Environment.Blank
297         System.Exit
298         System.IO
299         System.IO.Error
300         System.IO.Unsafe
301         System.Info
302         System.Mem
303         System.Mem.StableName
304         System.Mem.Weak
305         System.Posix.Internals
306         System.Posix.Types
307         System.Timeout
308         Text.ParserCombinators.ReadP
309         Text.ParserCombinators.ReadPrec
310         Text.Printf
311         Text.Read
312         Text.Read.Lex
313         Text.Show
314         Text.Show.Functions
315         Type.Reflection
316         Type.Reflection.Unsafe
317         Unsafe.Coerce
318
319     other-modules:
320         Control.Monad.ST.Imp
321         Control.Monad.ST.Lazy.Imp
322         Data.Functor.Utils
323         Data.OldList
324         Data.Semigroup.Internal
325         Data.Typeable.Internal
326         Foreign.ForeignPtr.Imp
327         GHC.StaticPtr.Internal
328         System.Environment.ExecutablePath
329         System.CPUTime.Utils
330
331     c-sources:
332         cbits/DarwinUtils.c
333         cbits/PrelIOUtils.c
334         cbits/SetEnv.c
335         cbits/WCsubst.c
336         cbits/Win32Utils.c
337         cbits/consUtils.c
338         cbits/iconv.c
339         cbits/inputReady.c
340         cbits/md5.c
341         cbits/primFloat.c
342         cbits/sysconf.c
343         cbits/fs.c
344
345     cmm-sources:
346         cbits/CastFloatWord.cmm
347
348     include-dirs: include
349     includes:
350         HsBase.h
351     install-includes:
352         HsBase.h
353         WCsubst.h
354         consUtils.h
355
356     -- OS Specific
357     if os(windows)
358         -- Windows requires some extra libraries for linking because the RTS
359         -- is no longer re-exporting them.
360         -- msvcrt: standard C library. The RTS will automatically include this,
361         --         but is added for completeness.
362         -- mingwex: provides C99 compatibility. libm is a stub on MingW.
363         -- mingw32: Unfortunately required because of a resource leak between
364         --          mingwex and mingw32. the __math_err symbol is defined in
365         --          mingw32 which is required by mingwex.
366         extra-libraries: wsock32, user32, shell32, msvcrt, mingw32, mingwex
367         exposed-modules:
368             GHC.IO.Encoding.CodePage.API
369             GHC.IO.Encoding.CodePage.Table
370             GHC.Conc.Windows
371             GHC.Windows
372         other-modules:
373             System.CPUTime.Windows
374     else
375         exposed-modules:
376             GHC.Event
377         other-modules:
378             GHC.Event.Arr
379             GHC.Event.Array
380             GHC.Event.Control
381             GHC.Event.EPoll
382             GHC.Event.IntTable
383             GHC.Event.Internal
384             GHC.Event.KQueue
385             GHC.Event.Manager
386             GHC.Event.PSQ
387             GHC.Event.Poll
388             GHC.Event.Thread
389             GHC.Event.TimerManager
390             GHC.Event.Unique
391
392             System.CPUTime.Posix.ClockGetTime
393             System.CPUTime.Posix.Times
394             System.CPUTime.Posix.RUsage
395             System.CPUTime.Unsupported
396
397     -- We need to set the unit id to base (without a version number)
398     -- as it's magic.
399     ghc-options: -this-unit-id base
400
401     -- Make sure we don't accidentally regress into anti-patterns
402     ghc-options: -Wcompat -Wnoncanonical-monad-instances