From 0a3d93170b8aa0149dcbf4b867f6a245d477d5ca Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 26 Nov 2004 16:22:10 +0000 Subject: [PATCH] [project @ 2004-11-26 16:22:09 by simonmar] Further integration with the new package story. GHC now supports pretty much everything in the package proposal. - GHC now works in terms of PackageIds (-) rather than just package names. You can still specify package names without versions on the command line, as long as the name is unambiguous. - GHC understands hidden/exposed modules in a package, and will refuse to import a hidden module. Also, the hidden/eposed status of packages is taken into account. - I had to remove the old package syntax from ghc-pkg, backwards compatibility isn't really practical. - All the package.conf.in files have been rewritten in the new syntax, and contain a complete list of modules in the package. I've set all the versions to 1.0 for now - please check your package(s) and fix the version number & other info appropriately. - New options: -hide-package P sets the expose flag on package P to False -ignore-package P unregisters P for this compilation For comparison, -package P sets the expose flag on package P to True, and also causes P to be linked in eagerly. -package-name is no longer officially supported. Unofficially, it's a synonym for -ignore-package, which has more or less the same effect as -package-name used to. Note that a package may be hidden and yet still be linked into the program, by virtue of being a dependency of some other package. To completely remove a package from the compiler's internal database, use -ignore-package. The compiler will complain if any two packages in the transitive closure of exposed packages contain the same module. You *must* use -ignore-package P when compiling modules for package P, if package P (or an older version of P) is already registered. The compiler will helpfully complain if you don't. The fptools build system does this. - Note: the Cabal library won't work yet. It still thinks GHC uses the old package config syntax. Internal changes/cleanups: - The ModuleName type has gone away. Modules are now just (a newtype of) FastStrings, and don't contain any package information. All the package-related knowledge is in DynFlags, which is passed down to where it is needed. - DynFlags manipulation has been cleaned up somewhat: there are no global variables holding DynFlags any more, instead the DynFlags are passed around properly. - There are a few less global variables in GHC. Lots more are scheduled for removal. - -i is now a dynamic flag, as are all the package-related flags (but using them in {-# OPTIONS #-} is Officially Not Recommended). - make -j now appears to work under fptools/libraries/. Probably wouldn't take much to get it working for a whole build. --- Makefile | 1 + package.conf.in | 216 +++++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 186 insertions(+), 31 deletions(-) diff --git a/Makefile b/Makefile index 8661f0c..739ad76 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ ALL_DIRS = \ Text/Read PACKAGE = base +VERSION = 1.0 SRC_HC_OPTS += -fglasgow-exts -cpp -Iinclude -"\#include" HsBase.h SRC_HSC2HS_OPTS += -Iinclude -I$(FPTOOLS_TOP)/ghc/includes diff --git a/package.conf.in b/package.conf.in index 802a304..cedda16 100644 --- a/package.conf.in +++ b/package.conf.in @@ -1,43 +1,197 @@ #include "ghcconfig.h" -Package { - name = "base", - auto = True, +name: PACKAGE +version: VERSION +license: BSD3 +maintainer: libraries@haskell.org +exposed: True + +exposed-modules: + Control.Arrow, + Control.Concurrent, + Control.Concurrent.Chan, + Control.Concurrent.MVar, + Control.Concurrent.QSem, + Control.Concurrent.QSemN, + Control.Concurrent.SampleVar, + Control.Exception, + Control.Monad, + Control.Monad.Fix, + Control.Monad.ST, + Control.Monad.ST.Lazy, + Control.Monad.ST.Strict, + Control.Parallel, + Control.Parallel.Strategies, + Data.Array, + Data.Array.Base, + Data.Array.Diff, + Data.Array.IArray, + Data.Array.IO, + Data.Array.IO.Internals, + Data.Array.MArray, + Data.Array.ST, + Data.Array.Storable, + Data.Array.Unboxed, + Data.Bits, + Data.Bool, + Data.Char, + Data.Complex, + Data.Dynamic, + Data.Either, + Data.FiniteMap, + Data.Generics, + Data.Generics.Aliases, + Data.Generics.Basics, + Data.Generics.Instances, + Data.Generics.Schemes, + Data.Generics.Text, + Data.Generics.Twins, + Data.Graph, + Data.HashTable, + Data.IORef, + Data.Int, + Data.Ix, + Data.List, + Data.Maybe, + Data.Monoid, + Data.PackedString, + Data.Queue, + Data.Ratio, + Data.STRef, + Data.STRef.Lazy, + Data.STRef.Strict, + Data.Set, + Data.Tree, + Data.Tuple, + Data.Typeable, + Data.Unique, + Data.Version, + Data.Word, + Debug.Trace, + Foreign, + Foreign.C, + Foreign.C.Error, + Foreign.C.String, + Foreign.C.Types, + Foreign.Concurrent, + Foreign.ForeignPtr, + Foreign.Marshal, + Foreign.Marshal.Alloc, + Foreign.Marshal.Array, + Foreign.Marshal.Error, + Foreign.Marshal.Pool, + Foreign.Marshal.Utils, + Foreign.Ptr, + Foreign.StablePtr, + Foreign.Storable, + GHC.Dotnet, + GHC.Exts, + GHC.ForeignPtr, + GHC.Handle, + GHC.IO, + GHC.Int, + GHC.PArr, + GHC.PrimopWrappers, + GHC.Unicode, + GHC.Word, + Numeric, + Prelude, + System.Cmd, + System.Console.GetOpt, + System.CPUTime, + System.Directory, + System.Environment, + System.Exit, + System.FilePath, + System.IO, + System.IO.Error, + System.IO.Unsafe, + System.Info, + System.Locale, + System.Mem, + System.Mem.StableName, + System.Mem.Weak, + System.Posix.Internals, + System.Posix.Signals, + System.Posix.Types, + System.Process, + System.Process.Internals, + System.Random, + System.Time, + Text.Html, + Text.Html.BlockTable, + Text.ParserCombinators.ReadP, + Text.ParserCombinators.ReadPrec, + Text.PrettyPrint, + Text.PrettyPrint.HughesPJ, + Text.Read, + Text.Read.Lex, + Text.Regex, + Text.Regex.Posix, + Text.Show, + Text.Show.Functions, + GHC.Arr, + GHC.Base, + GHC.Conc, + GHC.Enum, + GHC.Err, + GHC.Exception, + GHC.Float, + GHC.IOBase, + GHC.List, + GHC.Num, + GHC.Pack, + GHC.Ptr, + GHC.Read, + GHC.Real, + GHC.ST, + GHC.STRef, + GHC.Show, + GHC.Stable, + GHC.Storable, + GHC.TopHandler, + GHC.Weak + +hidden-modules: + +import-dirs: IMPORT_DIR + #ifdef INSTALLING - import_dirs = [ "$libdir/imports" ], +library-dirs: "$libdir" #else - import_dirs = [ "$libdir/libraries/base" ], +library-dirs: "$libdir/libraries/base", + "$libdir/libraries/base/cbits" #endif - source_dirs = [], -#ifdef INSTALLING - library_dirs = [ "$libdir" ], + +#if !defined(mingw32_TARGET_OS) && !defined(cygwin32_TARGET_OS) +hs-libraries: "HSbase" #else - library_dirs = [ "$libdir/libraries/base" - , "$libdir/libraries/base/cbits" ], +-- +-- This splitting is the subject of a totally +-- horrible hack, which glues HSbase{1,2,3} +-- back into HSbaase for the purposes of static linking. +-- See DriverState.getPackageLibraries for details. +-- +hs-libraries: "HSbase1", "HSbase2", "HSbase3" #endif - hs_libraries = -# if !defined(mingw32_TARGET_OS) && !defined(cygwin32_TARGET_OS) - [ "HSbase" ], -# else - /* This splitting is the subject of a totally - horrible hack, which glues HSbase{1,2,3} - back into HSbaase for the purposes of static linking. - See DriverState.getPackageLibraries for details. */ - [ "HSbase1", "HSbase2", "HSbase3" ], -# endif - extra_libraries = [ "HSbase_cbits" + +extra-libs: "HSbase_cbits" #if defined(mingw32_TARGET_OS) || defined(__MINGW32__) || defined(_MSC_VER) - , "wsock32", "msvcrt", "kernel32", "user32", "shell32" + , "wsock32", "msvcrt", "kernel32", "user32", "shell32" #endif - ], + #ifdef INSTALLING - include_dirs = [], +include-dirs: #else - include_dirs = [ "$libdir/libraries/base/include" ], +include-dirs: "$libdir/libraries/base/include" #endif - c_includes = [ "HsBase.h" ], - package_deps = [ "rts" ], - extra_ghc_opts = [], - extra_cc_opts = [], - extra_ld_opts = [] -} + +includes: HsBase.h +depends: rts +extra-hugs-opts: +extra-cc-opts: +extra-ld-opts: +framework-dirs: +extra-frameworks: +haddock-interfaces: +haddock-html: -- 1.7.10.4