summaryrefslogtreecommitdiff
path: root/libraries/base/base.cabal
blob: bb62f89dddf10b739465fabac586903613733faa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
cabal-version:  3.0
name:           base
version:        4.16.0.0
-- NOTE: Don't forget to update ./changelog.md

license:        BSD-3-Clause
license-file:   LICENSE
maintainer:     libraries@haskell.org
bug-reports:    https://gitlab.haskell.org/ghc/ghc/issues/new
synopsis:       Basic libraries
category:       Prelude
build-type:     Configure
description:
    This package contains the Standard Haskell "Prelude" and its support libraries,
    and a large collection of useful libraries ranging from data
    structures to parsing combinators and debugging utilities.

extra-tmp-files:
    autom4te.cache
    base.buildinfo
    config.log
    config.status
    include/EventConfig.h
    include/HsBaseConfig.h

extra-source-files:
    aclocal.m4
    base.buildinfo.in
    changelog.md
    configure
    configure.ac
    include/CTypes.h
    include/EventConfig.h.in
    include/HsBaseConfig.h.in
    include/ieee-flpt.h
    include/md5.h
    include/fs.h
    include/winio_structs.h
    install-sh

source-repository head
    type:     git
    location: https://gitlab.haskell.org/ghc/ghc.git
    subdir:   libraries/base

Library
    default-language: Haskell2010
    other-extensions:
        BangPatterns
        CApiFFI
        CPP
        ConstraintKinds
        DataKinds
        DeriveDataTypeable
        DeriveGeneric
        ExistentialQuantification
        ExplicitForAll
        FlexibleContexts
        FlexibleInstances
        FunctionalDependencies
        GADTs
        GeneralizedNewtypeDeriving
        KindSignatures
        MagicHash
        MultiParamTypeClasses
        NegativeLiterals
        NoImplicitPrelude
        NondecreasingIndentation
        OverloadedStrings
        ParallelArrays
        PolyKinds
        RankNTypes
        RecordWildCards
        RoleAnnotations
        Safe
        ScopedTypeVariables
        StandaloneDeriving
        Trustworthy
        TypeFamilies
        TypeOperators
        TypeSynonymInstances
        UnboxedTuples
        UndecidableInstances
        UnliftedFFITypes
        Unsafe

    build-depends:
        rts == 1.0.*,
        ghc-prim >= 0.5.1.0 && < 0.9,
        ghc-bignum >= 1.0 && < 2.0

    exposed-modules:
        Control.Applicative
        Control.Arrow
        Control.Category
        Control.Concurrent
        Control.Concurrent.Chan
        Control.Concurrent.MVar
        Control.Concurrent.QSem
        Control.Concurrent.QSemN
        Control.Exception
        Control.Exception.Base
        Control.Monad
        Control.Monad.Fail
        Control.Monad.Fix
        Control.Monad.Instances
        Control.Monad.IO.Class
        Control.Monad.ST
        Control.Monad.ST.Lazy
        Control.Monad.ST.Lazy.Safe
        Control.Monad.ST.Lazy.Unsafe
        Control.Monad.ST.Safe
        Control.Monad.ST.Strict
        Control.Monad.ST.Unsafe
        Control.Monad.Zip
        Data.Array.Byte
        Data.Bifoldable
        Data.Bifunctor
        Data.Bitraversable
        Data.Bits
        Data.Bool
        Data.Char
        Data.Coerce
        Data.Complex
        Data.Data
        Data.Dynamic
        Data.Either
        Data.Eq
        Data.Fixed
        Data.Foldable
        Data.Function
        Data.Functor
        Data.Functor.Classes
        Data.Functor.Contravariant
        Data.Functor.Compose
        Data.Functor.Const
        Data.Functor.Identity
        Data.Functor.Product
        Data.Functor.Sum
        Data.IORef
        Data.Int
        Data.Ix
        Data.Kind
        Data.List
        Data.List.NonEmpty
        Data.Maybe
        Data.Monoid
        Data.Ord
        Data.Proxy
        Data.Ratio
        Data.Semigroup
        Data.STRef
        Data.STRef.Lazy
        Data.STRef.Strict
        Data.String
        Data.Traversable
        Data.Tuple
        Data.Type.Bool
        Data.Type.Coercion
        Data.Type.Equality
        Data.Type.Ord
        Data.Typeable
        Data.Unique
        Data.Version
        Data.Void
        Data.Word
        Debug.Trace
        Foreign
        Foreign.C
        Foreign.C.Error
        Foreign.C.String
        Foreign.C.Types
        Foreign.Concurrent
        Foreign.ForeignPtr
        Foreign.ForeignPtr.Safe
        Foreign.ForeignPtr.Unsafe
        Foreign.Marshal
        Foreign.Marshal.Alloc
        Foreign.Marshal.Array
        Foreign.Marshal.Error
        Foreign.Marshal.Pool
        Foreign.Marshal.Safe
        Foreign.Marshal.Unsafe
        Foreign.Marshal.Utils
        Foreign.Ptr
        Foreign.Safe
        Foreign.StablePtr
        Foreign.Storable
        GHC.Arr
        GHC.Base
        GHC.Bits
        GHC.ByteOrder
        GHC.Char
        GHC.Clock
        GHC.Conc
        GHC.Conc.IO
        GHC.Conc.Signal
        GHC.Conc.Sync
        GHC.ConsoleHandler
        GHC.Constants
        GHC.Desugar
        GHC.Enum
        GHC.Environment
        GHC.Err
        GHC.Event.TimeOut
        GHC.Exception
        GHC.Exception.Type
        GHC.ExecutionStack
        GHC.ExecutionStack.Internal
        GHC.Exts
        GHC.Fingerprint
        GHC.Fingerprint.Type
        GHC.Float
        GHC.Float.ConversionUtils
        GHC.Float.RealFracMethods
        GHC.Foreign
        GHC.ForeignPtr
        GHC.GHCi
        GHC.GHCi.Helpers
        GHC.Generics
        GHC.IO
        GHC.IO.Buffer
        GHC.IO.BufferedIO
        GHC.IO.Device
        GHC.IO.Encoding
        GHC.IO.Encoding.CodePage
        GHC.IO.Encoding.Failure
        GHC.IO.Encoding.Iconv
        GHC.IO.Encoding.Latin1
        GHC.IO.Encoding.Types
        GHC.IO.Encoding.UTF16
        GHC.IO.Encoding.UTF32
        GHC.IO.Encoding.UTF8
        GHC.IO.Exception
        GHC.IO.FD
        GHC.IO.Handle
        GHC.IO.Handle.FD
        GHC.IO.Handle.Internals
        GHC.IO.Handle.Lock
        GHC.IO.Handle.Text
        GHC.IO.Handle.Types
        GHC.IO.IOMode
        GHC.IO.Unsafe
        GHC.IO.StdHandles
        GHC.IO.SubSystem
        GHC.IOArray
        GHC.IORef
        GHC.Int
        GHC.Integer
        GHC.Integer.Logarithms
        GHC.Ix
        GHC.List
        GHC.Maybe
        GHC.MVar
        GHC.Natural
        GHC.Num
        GHC.OverloadedLabels
        GHC.Pack
        GHC.Profiling
        GHC.Ptr
        GHC.Read
        GHC.Real
        GHC.Records
        GHC.ResponseFile
        GHC.RTS.Flags
        GHC.ST
        GHC.Stack.CloneStack
        GHC.StaticPtr
        GHC.STRef
        GHC.Show
        GHC.Stable
        GHC.StableName
        GHC.Stack
        GHC.Stack.CCS
        GHC.Stack.Types
        GHC.Stats
        GHC.Storable
        GHC.TopHandler
        GHC.TypeError
        GHC.TypeLits
        GHC.TypeLits.Internal
        GHC.TypeNats
        GHC.TypeNats.Internal
        GHC.Unicode
        GHC.Weak
        GHC.Word
        Numeric
        Numeric.Natural
        Prelude
        System.CPUTime
        System.Console.GetOpt
        System.Environment
        System.Environment.Blank
        System.Exit
        System.IO
        System.IO.Error
        System.IO.Unsafe
        System.Info
        System.Mem
        System.Mem.StableName
        System.Mem.Weak
        System.Posix.Internals
        System.Posix.Types
        System.Timeout
        Text.ParserCombinators.ReadP
        Text.ParserCombinators.ReadPrec
        Text.Printf
        Text.Read
        Text.Read.Lex
        Text.Show
        Text.Show.Functions
        Type.Reflection
        Type.Reflection.Unsafe
        Unsafe.Coerce
        -- TODO: remove
        GHC.IOPort

    reexported-modules:
          GHC.Num.Integer
        , GHC.Num.Natural
        , GHC.Num.BigNat

    other-modules:
        Control.Monad.ST.Imp
        Control.Monad.ST.Lazy.Imp
        Data.Functor.Utils
        Data.Semigroup.Internal
        Data.Typeable.Internal
        Foreign.ForeignPtr.Imp
        GHC.IO.Handle.Lock.Common
        GHC.IO.Handle.Lock.Flock
        GHC.IO.Handle.Lock.LinuxOFD
        GHC.IO.Handle.Lock.NoOp
        GHC.IO.Handle.Lock.Windows
        GHC.StaticPtr.Internal
        GHC.Event.Internal.Types
        -- GHC.IOPort -- TODO: hide again after debug
        System.Environment.ExecutablePath
        System.CPUTime.Utils

    c-sources:
        cbits/DarwinUtils.c
        cbits/PrelIOUtils.c
        cbits/SetEnv.c
        cbits/WCsubst.c
        cbits/iconv.c
        cbits/inputReady.c
        cbits/md5.c
        cbits/primFloat.c
        cbits/sysconf.c
        cbits/fs.c

    cmm-sources:
        cbits/CastFloatWord.cmm
        cbits/StackCloningDecoding.cmm

    include-dirs: include
    includes:
        HsBase.h
    install-includes:
        HsBase.h
        WCsubst.h
        consUtils.h

    -- OS Specific
    if os(windows)
        -- Windows requires some extra libraries for linking because the RTS
        -- is no longer re-exporting them.
        -- msvcrt: standard C library. The RTS will automatically include this,
        --         but is added for completeness.
        -- mingwex: provides C99 compatibility. libm is a stub on MingW.
        -- mingw32: Unfortunately required because of a resource leak between
        --          mingwex and mingw32. the __math_err symbol is defined in
        --          mingw32 which is required by mingwex.
        -- shlwapi: provides PathFileExistsW
        -- ws2_32: provides access to socket types and functions
        -- ole32: provides UUID functionality.
        -- rpcrt4: provides RPC UUID creation.
        -- ntdll: provides access to functions to inspect window handles
        extra-libraries: wsock32, user32, shell32, msvcrt, mingw32,
                         mingwex, ws2_32, shlwapi, ole32, rpcrt4, ntdll
        -- Minimum supported Windows version.
        -- These numbers can be found at:
        --  https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
        -- If we're compiling on windows, enforce that we only support Windows 7+
        -- Adding this here means it doesn't have to be done in individual .c files
        -- and also centralizes the versioning.
        cpp-options: -D_WIN32_WINNT=0x06010000
        cc-options: -D_WIN32_WINNT=0x06010000
        exposed-modules:
            GHC.IO.Encoding.CodePage.API
            GHC.IO.Encoding.CodePage.Table
            GHC.Conc.Windows
            GHC.Conc.WinIO
            GHC.Conc.POSIX
            GHC.Conc.POSIX.Const
            GHC.Windows
            GHC.Event.Windows
            GHC.Event.Windows.Clock
            GHC.Event.Windows.ConsoleEvent
            GHC.Event.Windows.FFI
            GHC.Event.Windows.ManagedThreadPool
            GHC.Event.Windows.Thread
            GHC.IO.Handle.Windows
            GHC.IO.Windows.Handle
            GHC.IO.Windows.Encoding
            GHC.IO.Windows.Paths
        other-modules:
            GHC.Event.Arr
            GHC.Event.Array
            GHC.Event.IntTable
            GHC.Event.IntVar
            GHC.Event.PSQ
            GHC.Event.Unique
            System.CPUTime.Windows
        c-sources:
            cbits/Win32Utils.c
            cbits/consUtils.c
            cbits/IOutils.c

    else
        exposed-modules:
            GHC.Event
        other-modules:
            GHC.Event.Arr
            GHC.Event.Array
            GHC.Event.Control
            GHC.Event.EPoll
            GHC.Event.IntTable
            GHC.Event.IntVar
            GHC.Event.Internal
            GHC.Event.KQueue
            GHC.Event.Manager
            GHC.Event.PSQ
            GHC.Event.Poll
            GHC.Event.Thread
            GHC.Event.TimerManager
            GHC.Event.Unique

            System.CPUTime.Posix.ClockGetTime
            System.CPUTime.Posix.Times
            System.CPUTime.Posix.RUsage
            System.CPUTime.Unsupported

    -- The Ports framework always passes this flag when building software that
    -- uses iconv to make iconv from Ports compatible with iconv from the base system
    -- See /usr/ports/Mk/Uses/iconv.mk
    if os(freebsd)
        cc-options: -DLIBICONV_PLUG

    -- We need to set the unit id to base (without a version number)
    -- as it's magic.
    ghc-options: -this-unit-id base

    -- Make sure we don't accidentally regress into anti-patterns
    ghc-options: -Wcompat -Wnoncanonical-monad-instances