Built-in Natural literals in Core
[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.Exception.Type
223         GHC.ExecutionStack
224         GHC.ExecutionStack.Internal
225         GHC.Exts
226         GHC.Fingerprint
227         GHC.Fingerprint.Type
228         GHC.Float
229         GHC.Float.ConversionUtils
230         GHC.Float.RealFracMethods
231         GHC.Foreign
232         GHC.ForeignPtr
233         GHC.GHCi
234         GHC.Generics
235         GHC.IO
236         GHC.IO.Buffer
237         GHC.IO.BufferedIO
238         GHC.IO.Device
239         GHC.IO.Encoding
240         GHC.IO.Encoding.CodePage
241         GHC.IO.Encoding.Failure
242         GHC.IO.Encoding.Iconv
243         GHC.IO.Encoding.Latin1
244         GHC.IO.Encoding.Types
245         GHC.IO.Encoding.UTF16
246         GHC.IO.Encoding.UTF32
247         GHC.IO.Encoding.UTF8
248         GHC.IO.Exception
249         GHC.IO.FD
250         GHC.IO.Handle
251         GHC.IO.Handle.FD
252         GHC.IO.Handle.Internals
253         GHC.IO.Handle.Lock
254         GHC.IO.Handle.Text
255         GHC.IO.Handle.Types
256         GHC.IO.IOMode
257         GHC.IO.Unsafe
258         GHC.IOArray
259         GHC.IORef
260         GHC.Int
261         GHC.List
262         GHC.Maybe
263         GHC.MVar
264         GHC.Natural
265         GHC.Num
266         GHC.OldList
267         GHC.OverloadedLabels
268         GHC.Pack
269         GHC.Profiling
270         GHC.Ptr
271         GHC.Read
272         GHC.Real
273         GHC.Records
274         GHC.ResponseFile
275         GHC.RTS.Flags
276         GHC.ST
277         GHC.StaticPtr
278         GHC.STRef
279         GHC.Show
280         GHC.Stable
281         GHC.Stack
282         GHC.Stack.CCS
283         GHC.Stack.Types
284         GHC.Stats
285         GHC.Storable
286         GHC.TopHandler
287         GHC.TypeLits
288         GHC.TypeNats
289         GHC.Unicode
290         GHC.Weak
291         GHC.Word
292         Numeric
293         Numeric.Natural
294         Prelude
295         System.CPUTime
296         System.Console.GetOpt
297         System.Environment
298         System.Environment.Blank
299         System.Exit
300         System.IO
301         System.IO.Error
302         System.IO.Unsafe
303         System.Info
304         System.Mem
305         System.Mem.StableName
306         System.Mem.Weak
307         System.Posix.Internals
308         System.Posix.Types
309         System.Timeout
310         Text.ParserCombinators.ReadP
311         Text.ParserCombinators.ReadPrec
312         Text.Printf
313         Text.Read
314         Text.Read.Lex
315         Text.Show
316         Text.Show.Functions
317         Type.Reflection
318         Type.Reflection.Unsafe
319         Unsafe.Coerce
320
321     other-modules:
322         Control.Monad.ST.Imp
323         Control.Monad.ST.Lazy.Imp
324         Data.Functor.Utils
325         Data.OldList
326         Data.Semigroup.Internal
327         Data.Typeable.Internal
328         Foreign.ForeignPtr.Imp
329         GHC.StaticPtr.Internal
330         System.Environment.ExecutablePath
331         System.CPUTime.Utils
332
333     c-sources:
334         cbits/DarwinUtils.c
335         cbits/PrelIOUtils.c
336         cbits/SetEnv.c
337         cbits/WCsubst.c
338         cbits/Win32Utils.c
339         cbits/consUtils.c
340         cbits/iconv.c
341         cbits/inputReady.c
342         cbits/md5.c
343         cbits/primFloat.c
344         cbits/sysconf.c
345         cbits/fs.c
346
347     cmm-sources:
348         cbits/CastFloatWord.cmm
349
350     include-dirs: include
351     includes:
352         HsBase.h
353     install-includes:
354         HsBase.h
355         WCsubst.h
356         consUtils.h
357
358     -- OS Specific
359     if os(windows)
360         -- Windows requires some extra libraries for linking because the RTS
361         -- is no longer re-exporting them.
362         -- msvcrt: standard C library. The RTS will automatically include this,
363         --         but is added for completeness.
364         -- mingwex: provides C99 compatibility. libm is a stub on MingW.
365         -- mingw32: Unfortunately required because of a resource leak between
366         --          mingwex and mingw32. the __math_err symbol is defined in
367         --          mingw32 which is required by mingwex.
368         extra-libraries: wsock32, user32, shell32, msvcrt, mingw32, mingwex
369         exposed-modules:
370             GHC.IO.Encoding.CodePage.API
371             GHC.IO.Encoding.CodePage.Table
372             GHC.Conc.Windows
373             GHC.Windows
374         other-modules:
375             System.CPUTime.Windows
376     else
377         exposed-modules:
378             GHC.Event
379         other-modules:
380             GHC.Event.Arr
381             GHC.Event.Array
382             GHC.Event.Control
383             GHC.Event.EPoll
384             GHC.Event.IntTable
385             GHC.Event.Internal
386             GHC.Event.KQueue
387             GHC.Event.Manager
388             GHC.Event.PSQ
389             GHC.Event.Poll
390             GHC.Event.Thread
391             GHC.Event.TimerManager
392             GHC.Event.Unique
393
394             System.CPUTime.Posix.ClockGetTime
395             System.CPUTime.Posix.Times
396             System.CPUTime.Posix.RUsage
397             System.CPUTime.Unsupported
398
399     -- We need to set the unit id to base (without a version number)
400     -- as it's magic.
401     ghc-options: -this-unit-id base
402
403     -- Make sure we don't accidentally regress into anti-patterns
404     ghc-options: -Wcompat -Wnoncanonical-monad-instances