summaryrefslogtreecommitdiff
path: root/ghc/compiler/main/DriverState.hs
Commit message (Collapse)AuthorAgeFilesLines
* [project @ 2005-03-18 13:37:27 by simonmar]simonmar2005-03-181-534/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flags cleanup. Basically the purpose of this commit is to move more of the compiler's global state into DynFlags, which is moving in the direction we need to go for the GHC API which can have multiple active sessions supported by a single GHC instance. Before: $ grep 'global_var' */*hs | wc -l 78 After: $ grep 'global_var' */*hs | wc -l 27 Well, it's an improvement. Most of what's left won't really affect our ability to host multiple sessions. Lots of static flags have become dynamic flags (yay!). Notably lots of flags that we used to think of as "driver" flags, like -I and -L, are now dynamic. The most notable static flags left behind are the "way" flags, eg. -prof. It would be nice to fix this, but it isn't urgent. On the way, lots of cleanup has happened. Everything related to static and dynamic flags lives in StaticFlags and DynFlags respectively, and they share a common command-line parser library in CmdLineParser. The flags related to modes (--makde, --interactive etc.) are now private to the front end: in fact private to Main itself, for now.
* [project @ 2005-02-02 10:14:01 by simonmar]simonmar2005-02-021-3/+5
| | | | Fix isLinkMode and adjust formatting a little
* [project @ 2005-02-01 08:36:02 by simonpj]simonpj2005-02-011-9/+19
| | | | | | | | | | | | | | -------------------- Command-flag cleanup -------------------- * Fewer cases in GhcMode: eliminate DoMkDLL, DoLink, both in favour of StopBefore StopLn * Replace the NoLink boolean with a GhcLink three-way flag: NoLink, StaticLink, MakeDLL * Corresponding plumbing to link it all up.
* [project @ 2005-01-28 12:55:17 by simonmar]simonmar2005-01-281-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rationalise the BUILD,HOST,TARGET defines. Recall that: - build is the platform we're building on - host is the platform we're running on - target is the platform we're generating code for The change is that now we take these definitions as applying from the point of view of the particular source code being built, rather than the point of view of the whole build tree. For example, in RTS and library code, we were previously testing the TARGET platform. But under the new rule, the platform on which this code is going to run is the HOST platform. TARGET only makes sense in the compiler sources. In practical terms, this means that the values of BUILD, HOST & TARGET may vary depending on which part of the build tree we are in. Actual changes: - new file: includes/ghcplatform.h contains platform defines for the RTS and library code. - new file: includes/ghcautoconf.h contains the autoconf settings only (HAVE_BLAH). This is so that we can get hold of these settings independently of the platform defines when necessary (eg. in GHC). - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h. - MachRegs.h, which is included into both the compiler and the RTS, now has to cope with the fact that it might need to test either _TARGET_ or _HOST_ depending on the context. - the compiler's Makefile now generates stage{1,2,3}/ghc_boot_platform.h which contains platform defines for the compiler. These differ depending on the stage, of course: in stage2, the HOST is the TARGET of stage1. This was wrong before. - The compiler doesn't get platform info from Config.hs any more. Previously it did (sometimes), but unless we want to generate a new Config.hs for each stage we can't do this. - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically in CPP'd Haskell source. - ghcplatform.h defines *_TARGET_* for backwards compatibility (ghcplatform.h is included by ghcconfig.h, which is included by config.h, so code which still #includes config.h will get the TARGET settings as before). - The Users's Guide is updated to mention *_HOST_* rather than *_TARGET_*. - coding-style.html in the commentary now contains a section on platform defines. There are further doc updates to come. Thanks to Wolfgang Thaller for pointing me in the right direction.
* [project @ 2005-01-27 15:55:38 by simonpj]simonpj2005-01-271-1/+0
| | | | Make -no-recomp a dynamic flag
* [project @ 2005-01-27 10:44:00 by simonpj]simonpj2005-01-271-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -------------------------------------------- Replace hi-boot files with hs-boot files -------------------------------------------- This major commit completely re-organises the way that recursive modules are dealt with. * It should have NO EFFECT if you do not use recursive modules * It is a BREAKING CHANGE if you do ====== Warning: .hi-file format has changed, so if you are ====== updating into an existing HEAD build, you'll ====== need to make clean and re-make The details: [documentation still to be done] * Recursive loops are now broken with Foo.hs-boot (or Foo.lhs-boot), not Foo.hi-boot * An hs-boot files is a proper source file. It is compiled just like a regular Haskell source file: ghc Foo.hs generates Foo.hi, Foo.o ghc Foo.hs-boot generates Foo.hi-boot, Foo.o-boot * hs-boot files are precisely a subset of Haskell. In particular: - they have the same import, export, and scoping rules - errors (such as kind errors) in hs-boot files are checked You do *not* need to mention the "original" name of something in an hs-boot file, any more than you do in any other Haskell module. * The Foo.hi-boot file generated by compiling Foo.hs-boot is a machine- generated interface file, in precisely the same format as Foo.hi * When compiling Foo.hs, its exports are checked for compatibility with Foo.hi-boot (previously generated by compiling Foo.hs-boot) * The dependency analyser (ghc -M) knows about Foo.hs-boot files, and generates appropriate dependencies. For regular source files it generates Foo.o : Foo.hs Foo.o : Baz.hi -- Foo.hs imports Baz Foo.o : Bog.hi-boot -- Foo.hs source-imports Bog For a hs-boot file it generates similar dependencies Bog.o-boot : Bog.hs-boot Bog.o-boot : Nib.hi -- Bog.hs-boto imports Nib * ghc -M is also enhanced to use the compilation manager dependency chasing, so that ghc -M Main will usually do the job. No need to enumerate all the source files. * The -c flag is no longer a "compiler mode". It simply means "omit the link step", and synonymous with -no-link.
* [project @ 2005-01-12 13:36:30 by simonmar]simonmar2005-01-121-7/+6
| | | | Restore splitting at ':' for the -i option, which I broke recently.
* [project @ 2004-11-26 16:19:45 by simonmar]simonmar2004-11-261-189/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Further integration with the new package story. GHC now supports pretty much everything in the package proposal. - GHC now works in terms of PackageIds (<pkg>-<version>) 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.
* [project @ 2004-11-12 15:06:36 by simonmar]simonmar2004-11-121-1/+1
| | | | darwin-only fix
* [project @ 2004-11-11 16:07:40 by simonmar]simonmar2004-11-111-18/+13
| | | | Compiler changes for the new package.conf format.
* [project @ 2004-10-08 12:16:04 by simonmar]simonmar2004-10-081-1/+2
| | | | FreeBSD needs -optl-pthread for the threaded way
* [project @ 2004-10-03 16:28:02 by panne]panne2004-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improved #include path handling: * Don't use '-I-', it breaks a lot of system headers, e.g. #include <GL/glut.h> fails (when using freeglut), because /usr/include/GL/glut.h contains #include "freeglut_std.h" but /usr/include/GL/freeglut_std.h will not be found. It is a bit debatable if the header is broken and should use #include "GL/freeglut_std.h" instead. Anyway, a grep through the SuSE 9.1 system headers shows that there seems to be no real common practice, so let's play safe and don't use '-I-'. * Don't use '-I .', #include stub headers "locally" instead, e.g. use #include "Concurrent_stub.h" instead of #include "Control/Concurrent_stub.h" Note that "Control" is still in the #include path, because the *.hc file is normally in /tmp and the stub header is in the directory where *.hs is. We could remove this path element, too, if the stub header would be copied to the directory of the *.hc file during compilation. SimonM?
* [project @ 2004-08-13 13:04:50 by simonmar]simonmar2004-08-131-5/+3
| | | | Merge backend-hacking-branch onto HEAD. Yay!
* [project @ 2004-04-30 15:51:10 by simonmar]simonmar2004-04-301-2/+2
| | | | wibble
* [project @ 2004-04-30 09:46:58 by simonmar]simonmar2004-04-301-1/+2
| | | | | | DoEval is a compilation manager mode too. MERGE TO STABLE
* [project @ 2004-03-24 10:50:34 by simonmar]simonmar2004-03-241-1/+5
| | | | -i on its own didn't delete the list of search paths as advertised.
* [project @ 2004-03-05 15:09:37 by stolz]stolz2004-03-051-2/+2
| | | | Fix #ifdef'ed flags for FreeBSD.
* [project @ 2004-02-25 11:31:24 by simonmar]simonmar2004-02-251-6/+13
| | | | Combined build tags get '_' between them
* [project @ 2004-02-25 11:24:34 by simonmar]simonmar2004-02-251-1/+2
| | | | Add missing case to allowedWith
* [project @ 2004-02-24 17:33:32 by simonmar]simonmar2004-02-241-59/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Experimental support for RTS-only "ways" HEADS UP! This changes the way that the threaded RTS is used, and also the use of debugging RTSs: - We always build threaded and debugging variants of the RTS now. The --enable-threaded-rts configure option is ignored (and will be removed at some point). - New option: -debug enables the debugging RTS - New option: -threaded enables the threaded RTS. When the threaded RTS is stable enough, we might make it the default. The new options just cause a different variant of the RTS to be linked in, and they cause one or two extra options to be enabled too. The implementation is via the usual ways machinery in the compiler, except that these ways are labelled as RTS-only, and so don't require rebuilding all the libraries too. All of this means we can ship threaded and debugging RTSs with GHC, so that users don't need to fetch and build a GHC source tree to use them. I'd like to get this functionality into 6.2.1 if possible, so please test (I'm willing to stretch the definition of "interface change" to accomodate this, since having a threaded RTS available without having to build GHC will be a big win for the Visual Studio project).
* [project @ 2003-09-23 14:32:57 by simonmar]simonmar2003-09-231-169/+1
| | | | | | | | | | | | | | | | - Convert many of the optimisation options into dynamic options (that is, they can be mentioned in {-# OPTIONS #-} pragmas). - Add a new way to specify constructor-field unboxing on a selective basis. To tell the compiler to unbox a constructor field, do this: data T = T !!Int and GHC will store that field unboxed if possible. If it isn't possible (say, because the field has a sum type) then the annotation is ignored. The -funbox-strict-fields flag is now a dynamic flag, and has the same effect as replacing all the '!' annotations with '!!'.
* [project @ 2003-09-04 11:08:46 by simonmar]simonmar2003-09-041-1/+2
| | | | | | | | | | | | | | Add a new command-line flag -e EXPR, which runs ghc in interactive mode and evaluates EXPR only before exiting. Also, the lexer now ignores lines beginning with "#!". This is so that we can use ghc as a scripting language with Unix-style scripts beginning with #! /usr/local/bin/ghc -e main (well, it's not quite that simple, but I'll leave the details for the more enterprising hackers).
* [project @ 2003-08-20 18:48:20 by sof]sof2003-08-201-3/+3
| | | | my_prefix_match ~> Util.maybePrefixMatch
* [project @ 2003-06-25 08:20:20 by simonpj]simonpj2003-06-251-2/+1
| | | | | | | | * Remove -ffoldr-build-on Add -rrules-off Document the change * Document -fwarn-simple-patterns more
* [project @ 2003-06-24 12:56:43 by stolz]stolz2003-06-241-1/+3
| | | | FreeBSD Threaded-RTS wibbles (-pthread in {C,LD}FLAGS)
* [project @ 2003-06-23 10:35:15 by simonpj]simonpj2003-06-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------- Dealing with 'main' ------------------- 1. In GHC 6.0, a module with no "module Main ... where" header elicited an error "main is not in scope" if 'main' is not defined. We don't want this behaviour in GHCi. This happened because the parser expanded the (absent) header to "module Main( main ) where", and the 'main' in the export list isn't. Solution: elaborate HsModule to record whether the 'module ..." header was given explicitly by the user or not. 2. Add a -main-is flag, and document it, so that you can have a 'main' function that is not Main.main. Summary of changes * The -main-is flag nominates what the main function is to be (see the documentation). No -main-is flag says that the main function is Main.main -main-is Foo.baz says that the main function is Foo.baz -main-is Foo says that the main function is Foo.main -main-is baz says that the main function is Main.baz Let's say you say -main-is Foo.baz * TcRnDriver injects the extra definition $Mian.main :: IO t $Main.main = baz in the module Foo. Note the naming, which is a bit different than before; previously the extra defn was for Main.$main. The RTS invokes zdMain_main_closure. * CodeGen injects an extra initialisation block into module Foo, thus stginit_zdMain { stginit_Foo } That ensures that the RTS can initialise stginit_zdMain.
* [project @ 2003-06-12 16:50:19 by simonpj]simonpj2003-06-121-2/+7
| | | | | | | | | | | | | | | | ---------------------------------- Fix the no-GHC.Err problem in GHCi ---------------------------------- Merge this to the stable branch. Pattern-match failure error-ids are wired-in, which means the GHC.Err interface isn't loaded, which in turn confused the linker when tried to find what package GHC.Err is from. Now we exclude wired-in names from the free variables looked at by the linker (in Linker.linkExpr), and make sure the base package is loaded unconditionally (DriverState.initPackageList).
* [project @ 2003-02-04 15:09:38 by simonpj]simonpj2003-02-041-7/+1
| | | | | | | | | | | | | | | | | ------------------------------------- Remove all vestiges of usage analysis ------------------------------------- This commit removes a large blob of usage-analysis-related code, almost all of which was commented out. Sadly, it doesn't look as if Keith is going to have enough time to polish it up, and in any case the actual performance benefits (so far as we can measure them) turned out to be pretty modest (a few percent). So, with regret, I'm chopping it all out. It's still there in the repository if anyone wants go hack on it. And Tobias Gedell at Chalmers is implementing a different analysis, via External Core.
* [project @ 2002-12-19 18:43:53 by wolfgang]wolfgang2002-12-191-2/+2
| | | | Un-break for Mac OS X (handling of Apple's "frameworks")
* [project @ 2002-12-18 16:29:25 by simonmar]simonmar2002-12-181-80/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Auto" packages. The big change here is that it is no longer necessary to explicitly say '-package X' on the command line if X is a package containing hierarchical Haskell modules. All packages marked "auto" contribute to the import path, so their modules are always available. At link time, the compiler knows which packages are actually used by the program, and it links in only those libraries needed. There's one exception: one-shot linking. If you link a program using ghc -o prog A.o B.o ... then you need to explicitly add -package flags for each package required (except base & haskell98) because the compiler has no information about the package dependencies in this case. Package configs have a new field: auto, which is either True or False. Non-auto packages must be mentioned on the command-line as usual. Non-auto packages are still required for: - non-hierarchical libraries (to avoid polluting the module namespace) - packages with no Haskell content - if you want more than one version of a package, or packages providing overlapping functionality where the user must decide which one to use. Doc changes to follow...
* [project @ 2002-12-17 13:50:28 by simonmar]simonmar2002-12-171-1/+2
| | | | | - add -no-link flag (omits link step, except in GHCi) - tidy up some informmational messages
* [project @ 2002-12-12 17:36:16 by simonmar]simonmar2002-12-121-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A modification to the way we build link lines. Currently the link line is constructed like this, for packages p1, p2 etc.: libraries p1 ++ extra_libs p1 ++ libraries p2 ++ extra_libs p2 ++ ... extra_ld_opts p1 ++ extra_ld_opts p2 ++ .. This change makes it follow this pattern: libraries p1 ++ extra_libs p1 ++ extra_ld_opts p1 ++ libraries p2 ++ extra_libs p2 ++ extra_ld_opts p2 ++ ... which seems more useful: in particular it means that using foo-config (eg. gtk-config) to populate extra_ld_opts should now work properly, and extra_libs is no longer strictly speaking needed (you can just use -l options in extra_ld_opts and get the same effect). Also: - There's now no difference between -l<lib> and -optl-l<lib> - GHCi grabs libs from extra_ld_opts as well as extra_libs
* [project @ 2002-10-25 16:54:55 by simonpj]simonpj2002-10-251-2/+2
| | | | Import wibbles
* [project @ 2002-10-24 14:17:46 by simonpj]simonpj2002-10-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------ 1. New try and module and package dependencies 2. OrigNameCache always contains final info ------------------------------------------ These things nearly complete sorting out the incremental linking problem that started us off! 1. This commit separates two kinds of information: (a) HscTypes.Dependencies: What (i) home-package modules, and (ii) other packages this module depends on, transitively. That is, to link the module, it should be enough to link the dependent modules and packages (plus any C stubs etc). Along with this info we record whether the dependent module is (a) a boot interface or (b) an orphan module. So in fact (i) can contain non-home-package modules, namely the orphan ones in other packages (sigh). (b) HscTypes.Usage: What version of imported things were used to actually compile the module. This info is used for recompilation control only. 2. The Finder now returns a correct Module (incl package indicator) first time, so we can install the absolutely final Name in the OrigNameCache when we first come across an occurrence of that name, even if it's only an occurrence in an unfolding in some other interface file. This is much tidier. As a result Module.lhs is much cleaner No DunnoYet No mkVanillaModule ALl very joyful stuff.
* [project @ 2002-10-17 14:26:16 by simonmar]simonmar2002-10-171-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Finder overhaul. The finder had got pretty complicated; this commit is mainly a cleanup, with one new feature: - the finder has a cache (again). The cache may be flushed by calling flushFinderCache, which actually only flushes home modules from the cache, because package modules are assumed not to move. This change is apropos of some other changes which will result in the finder being called more often, so we think a cache is going to be worthwhile. Also a couple of bugs were fixed: - the field ml_hi_file in a ModLocation is now *always* the name of the .hi file. If you need a .hi-boot file, you have to make it up by changing the suffix of ml_hi_file. (DriverMkDepend and RnHiFiles do this). This was the cause of a bug, but I can't remember the details. - The -odir flag now works in a more reasonable way: hierarchical modules get put in subdirectories of the -odir directory. eg. if your module is A.B.C, and -odir D is specified, then the object will be D/A/B/C.o; previously it would have been D/C.o.
* [project @ 2002-09-13 15:02:25 by simonpj]simonpj2002-09-131-35/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -------------------------------------- Make Template Haskell into the HEAD -------------------------------------- This massive commit transfers to the HEAD all the stuff that Simon and Tim have been doing on Template Haskell. The meta-haskell-branch is no more! WARNING: make sure that you * Update your links if you are using link trees. Some modules have been added, some have gone away. * Do 'make clean' in all library trees. The interface file format has changed, and you can get strange panics (sadly) if GHC tries to read old interface files: e.g. ghc-5.05: panic! (the `impossible' happened, GHC version 5.05): Binary.get(TyClDecl): ForeignType * You need to recompile the rts too; Linker.c has changed However the libraries are almost unaltered; just a tiny change in Base, and to the exports in Prelude. NOTE: so far as TH itself is concerned, expression splices work fine, but declaration splices are not complete. --------------- The main change --------------- The main structural change: renaming and typechecking have to be interleaved, because we can't rename stuff after a declaration splice until after we've typechecked the stuff before (and the splice itself). * Combine the renamer and typecheker monads into one (TcRnMonad, TcRnTypes) These two replace TcMonad and RnMonad * Give them a single 'driver' (TcRnDriver). This driver replaces TcModule.lhs and Rename.lhs * The haskell-src library package has a module Language/Haskell/THSyntax which defines the Haskell data type seen by the TH programmer. * New modules: hsSyn/Convert.hs converts THSyntax -> HsSyn deSugar/DsMeta.hs converts HsSyn -> THSyntax * New module typecheck/TcSplice type-checks Template Haskell splices. ------------- Linking stuff ------------- * ByteCodeLink has been split into ByteCodeLink (which links) ByteCodeAsm (which assembles) * New module ghci/ObjLink is the object-code linker. * compMan/CmLink is removed entirely (was out of place) Ditto CmTypes (which was tiny) * Linker.c initialises the linker when it is first used (no need to call initLinker any more). Template Haskell makes it harder to know when and whether to initialise the linker. ------------------------------------- Gathering the LIE in the type checker ------------------------------------- * Instead of explicitly gathering constraints in the LIE tcExpr :: RenamedExpr -> TcM (TypecheckedExpr, LIE) we now dump the constraints into a mutable varabiable carried by the monad, so we get tcExpr :: RenamedExpr -> TcM TypecheckedExpr Much less clutter in the code, and more efficient too. (Originally suggested by Mark Shields.) ----------------- Remove "SysNames" ----------------- Because the renamer and the type checker were entirely separate, we had to carry some rather tiresome implicit binders (or "SysNames") along inside some of the HsDecl data structures. They were both tiresome and fragile. Now that the typechecker and renamer are more intimately coupled, we can eliminate SysNames (well, mostly... default methods still carry something similar). ------------- Clean up HsPat ------------- One big clean up is this: instead of having two HsPat types (InPat and OutPat), they are now combined into one. This is more consistent with the way that HsExpr etc is handled; there are some 'Out' constructors for the type checker output. So: HsPat.InPat --> HsPat.Pat HsPat.OutPat --> HsPat.Pat No 'pat' type parameter in HsExpr, HsBinds, etc Constructor patterns are nicer now: they use HsPat.HsConDetails for the three cases of constructor patterns: prefix, infix, and record-bindings The *same* data type HsConDetails is used in the type declaration of the data type (HsDecls.TyData) Lots of associated clean-up operations here and there. Less code. Everything is wonderful.
* [project @ 2002-08-29 15:44:11 by simonmar]simonmar2002-08-291-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Housekeeping: - The main goal is to remove dependencies on hslibs for a bootstrapped compiler, leaving only a requirement that the packages base, haskell98 and readline are built in stage 1 in order to bootstrap. We're almost there: Posix is still required for signal handling, but all other dependencies on hslibs are now gone. Uses of Addr and ByteArray/MutableByteArray array are all gone from the compiler. PrimPacked defines the Ptr type for GHC 4.08 (which didn't have it), and it defines simple BA and MBA types to replace uses of ByteArray and MutableByteArray respectively. - Clean up import lists. HsVersions.h now defines macros for some modules which have moved between GHC versions. eg. one now imports 'GLAEXTS' to get at unboxed types and primops in the compiler. Many import lists have been sorted as per the recommendations in the new style guidelines in the commentary. I've built the compiler with GHC 4.08.2, 5.00.2, 5.02.3, 5.04 and itself, and everything still works here. Doubtless I've got something wrong, though.
* [project @ 2002-06-12 22:04:25 by wolfgang]wolfgang2002-06-121-1/+18
| | | | | | | | | | | | | Added support for Frameworks on MacOS X. *) On MacOS X, two additional command-line options are supported: -framework <FRAMEWORK> link with framework, gets passed on to ld -framework-path <PATH> gets passed on to ld as "-F<PATH>". (-F is already taken for GHC). *) Two corresponding additional options for package.conf files: framework_dirs extra_frameworks These options are allowed on any platform. They are ignored everywhere except on MacOS X. *) ghc-pkg no longer uses Read. Instead, it uses a Happy parser. ghc/utils/ghc-pkg/ParsePkgConfLite.y is basically a copy of ghc/compiler/main/ParsePkgConf.y. "Light" refers to the fact that it doesn't depend on other GHC modules and has less sophisticated error reporting. *) Frameworks will need some additional work for GHCi.
* [project @ 2002-06-04 19:17:57 by sof]sof2002-06-041-7/+7
| | | | | Three way split of HSbase + adjust pointed fingers in the direction of the real culprit here (the GNU linker, not the file format.)
* [project @ 2002-05-28 21:52:06 by sof]sof2002-05-281-2/+2
| | | | setMode: permit (redundant) setting of same mode flag
* [project @ 2002-04-22 16:06:35 by simonpj]simonpj2002-04-221-8/+2
| | | | | | | | | | | | | | | | CPR control 1. Remove -fno-cpr, add -fcpr-off which is a simple static flag for switching the new CPR analysis off altogether. (The "-fno" machinery is rather complicated.) 2. Rejig SimplCore a little so that the "old strictness analyser" runs both the old strictness analyser and the old CPR analyser, which makes it more like the new strictness/CPR analyser. (How much longer we keep the old strictness/CPR analyser in the compiler at all I don't know. It's just for comparision purposes when we write the paper.)
* [project @ 2002-04-05 23:24:25 by sof]sof2002-04-051-7/+7
| | | | Friday afternoon pet peeve removal: define (Util.notNull :: [a] -> Bool) and use it
* [project @ 2002-04-05 16:43:56 by sof]sof2002-04-051-1/+32
| | | | | | | | | | | Catch the use of non-existent output directories & report this back to the user. By not doing this, we relied on external tools (such as the linker or assembler) to give good feedback about this error condition -- this wasn't the case (cf. GAS on mingw/cygwin.) To insert more sanity checks of the effective options (to the batch compiler), use Main.checkOptions
* [project @ 2002-03-29 21:39:36 by sof]sof2002-03-291-2/+2
| | | | | | | | | Front end for External Core. Initial go at implementing a Core front end (enabled via -fcore); work in progress (renamer is currently not willing to slurp in & resolve imports.)
* [project @ 2002-03-29 20:14:31 by krasimir]krasimir2002-03-291-1/+5
| | | | Hack hs_libraries package info for HSobjectio[1,2,3,4]
* [project @ 2002-03-15 13:57:27 by simonmar]simonmar2002-03-151-4/+4
| | | | | Take the old strictness analyser out of #ifdef DEBUG and put it instead in #ifdef OLD_STRICTNESS. DEBUG was getting a bit slow.
* [project @ 2002-03-13 13:51:34 by simonmar]simonmar2002-03-131-7/+1
| | | | | | | | | Fix the -fasm/-fvia-C auto-selection again: now we're back to the proper behaviour, namely -fasm is the default unless you specify -O or -fvia-C, but only on arch's that support it. I screwed it up in the previous commit, but it exposed a bug in the NCG so it wasn't all bad :)
* [project @ 2002-02-16 18:15:14 by sof]sof2002-02-161-3/+3
| | | | | getPackageLibraries: replace some rather fragile string prefix matching code that broke when "HSstd" got renamed to "HSbase".
* [project @ 2002-02-13 15:45:25 by simonmar]simonmar2002-02-131-7/+8
| | | | | Packages that come in by way of -package-conf files override default packages (requested by Manuel Chakravarty).
* [project @ 2002-02-12 15:17:13 by simonmar]simonmar2002-02-121-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch over to the new hierarchical libraries --------------------------------------------- This commit reorganises our libraries to use the new hierarchical module namespace extension. The basic story is this: - fptools/libraries contains the new hierarchical libraries. Everything in here is "clean", i.e. most deprecated stuff has been removed. - fptools/libraries/base is the new base package (replacing "std") and contains roughly what was previously in std, lang, and concurrent, minus deprecated stuff. Things that are *not allowed* in libraries/base include: Addr, ForeignObj, ByteArray, MutableByteArray, _casm_, _ccall_, ``'', PrimIO For ByteArrays and MutableByteArrays we use UArray and STUArray/IOUArray respectively now. Modules previously called PrelFoo are now under fptools/libraries/GHC. eg. PrelBase is now GHC.Base. - fptools/libraries/haskell98 provides the Haskell 98 std. libraries (Char, IO, Numeric etc.) as a package. This package is enabled by default. - fptools/libraries/network is a rearranged version of the existing net package (the old package net is still available; see below). - Other packages will migrate to fptools/libraries in due course. NB. you need to checkout fptools/libraries as well as fptools/hslibs now. The nightly build scripts will need to be tweaked. - fptools/hslibs still contains (almost) the same stuff as before. Where libraries have moved into the new hierarchy, the hslibs version contains a "stub" that just re-exports the new version. The idea is that code will gradually migrate from fptools/hslibs into fptools/libraries as it gets cleaned up, and in a version or two we can remove the old packages altogether. - I've taken the opportunity to make some changes to the build system, ripping out the old hslibs Makefile stuff from mk/target.mk; the new package building Makefile code is in mk/package.mk (auto-included from mk/target.mk). The main improvement is that packages now register themselves at make boot time using ghc-pkg, and the monolithic package.conf in ghc/driver is gone. I've updated the standard packages but haven't tested win32, graphics, xlib, object-io, or OpenGL yet. The Makefiles in these packages may need some further tweaks, and they'll need pkg.conf.in files added. - Unfortunately all this rearrangement meant I had to bump the interface-file version and create a bunch of .hi-boot-6 files :-(