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