include Win32 extra-libraries for non-GHC's too
[ghc-base.git] / base.cabal
1 name:        base
2 version:    2.1
3 license:    BSD3
4 license-file:    LICENSE
5 maintainer:    libraries@haskell.org
6 synopsis:    Basic libraries
7 description:
8     This package contains the Prelude and its support libraries,
9     and a large collection of useful libraries ranging from data
10     structures to parsing combinators and debugging utilities.
11
12 Flag IsGHC {
13     Description: Are we compiling with GHC?
14     Default: True
15 }
16
17 Library {
18     -- This is actually something of a hack, as if we are using
19     -- GHC and we don't have an rts package for some reason, we
20     -- actually ought to fail.
21     if flag(IsGHC) {
22         build-depends: rts
23         exposed-modules:
24             Data.Generics,
25             Data.Generics.Aliases,
26             Data.Generics.Basics,
27             Data.Generics.Instances,
28             Data.Generics.Schemes,
29             Data.Generics.Text,
30             Data.Generics.Twins,
31             Foreign.Concurrent,
32             GHC.Arr,
33             GHC.Base,
34             GHC.Conc,
35             GHC.ConsoleHandler,
36             GHC.Dotnet,
37             GHC.Enum,
38             GHC.Environment,
39             GHC.Err,
40             GHC.Exception,
41             GHC.Exts,
42             GHC.Float,
43             GHC.ForeignPtr,
44             GHC.Handle,
45             GHC.IO,
46             GHC.IOBase,
47             GHC.Int,
48             GHC.List,
49             GHC.Num,
50             GHC.PArr,
51             GHC.Pack,
52             GHC.Prim,
53             GHC.PrimopWrappers,
54             GHC.Ptr,
55             GHC.Read,
56             GHC.Real,
57             GHC.ST,
58             GHC.STRef,
59             GHC.Show,
60             GHC.Stable,
61             GHC.Storable,
62             GHC.TopHandler,
63             GHC.Unicode,
64             GHC.Weak,
65             GHC.Word,
66             System.Timeout
67     }
68     exposed-modules:
69         Control.Applicative,
70         Control.Arrow,
71         Control.Concurrent,
72         Control.Concurrent.Chan,
73         Control.Concurrent.MVar,
74         Control.Concurrent.QSem,
75         Control.Concurrent.QSemN,
76         Control.Concurrent.SampleVar,
77         Control.Exception,
78         Control.Monad,
79         Control.Monad.Fix,
80         Control.Monad.Instances,
81         Control.Monad.ST,
82         Control.Monad.ST.Lazy,
83         Control.Monad.ST.Strict,
84         Data.Bits,
85         Data.Bool,
86         Data.Char,
87         Data.Complex,
88         Data.Dynamic,
89         Data.Either,
90         Data.Eq,
91         Data.Fixed,
92         Data.Foldable
93         Data.Function,
94         Data.HashTable,
95         Data.IORef,
96         Data.Int,
97         Data.Ix,
98         Data.List,
99         Data.Maybe,
100         Data.Monoid,
101         Data.Ord,
102         Data.Ratio,
103         Data.STRef,
104         Data.STRef.Lazy,
105         Data.STRef.Strict,
106         Data.String,
107         Data.Traversable
108         Data.Tuple,
109         Data.Typeable,
110         Data.Unique,
111         Data.Version,
112         Data.Word,
113         Debug.Trace,
114         Foreign,
115         Foreign.C,
116         Foreign.C.Error,
117         Foreign.C.String,
118         Foreign.C.Types,
119         Foreign.ForeignPtr,
120         Foreign.Marshal,
121         Foreign.Marshal.Alloc,
122         Foreign.Marshal.Array,
123         Foreign.Marshal.Error,
124         Foreign.Marshal.Pool,
125         Foreign.Marshal.Utils,
126         Foreign.Ptr,
127         Foreign.StablePtr,
128         Foreign.Storable,
129         Numeric,
130         Prelude,
131         System.Console.GetOpt,
132         System.CPUTime,
133         System.Environment,
134         System.Exit,
135         System.IO,
136         System.IO.Error,
137         System.IO.Unsafe,
138         System.Info,
139         System.Mem,
140         System.Mem.StableName,
141         System.Mem.Weak,
142         System.Posix.Internals,
143         System.Posix.Types,
144         Text.ParserCombinators.ReadP,
145         Text.ParserCombinators.ReadPrec,
146         Text.Printf,
147         Text.Read,
148         Text.Read.Lex,
149         Text.Show,
150         Text.Show.Functions
151         Unsafe.Coerce
152     c-sources:
153         cbits/PrelIOUtils.c
154         cbits/WCsubst.c
155         cbits/Win32Utils.c
156         cbits/consUtils.c
157         cbits/dirUtils.c
158         cbits/inputReady.c
159         cbits/lockFile.c
160         cbits/longlong.c
161         cbits/selectUtils.c
162     include-dirs: include
163     includes:    HsBase.h
164     install-includes:    HsBase.h HsBaseConfig.h WCsubst.h dirUtils.h lockFile.h consUtils.h Typeable.h
165     if os(mingw32) {
166         extra-libraries: wsock32, msvcrt, kernel32, user32, shell32
167     }
168     extensions:    CPP
169     -- XXX is there an extension for using # in varids?
170     -- We need to set the package name to base (without a version number)
171     -- as it's magic.
172     ghc-options: -fglasgow-exts -package-name base
173     nhc98-options: -H4M -K3M
174 }
175