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