summaryrefslogtreecommitdiff
path: root/compiler/main/Main.hs
Commit message (Collapse)AuthorAgeFilesLines
* Get building GHC itself with Cabal more-or-less workingIan Lynagh2008-07-161-563/+0
| | | | | Installing and bindist creation don't work, but they were already broken. Only tested validating with one setup.
* FIX #2278: don't complain if the -odir directory doesn't existSimon Marlow2008-07-111-6/+1
| | | | we'll create it anyway
* Fix warnings in MainIan Lynagh2008-06-141-20/+20
|
* Use -fforce-recomp rather than -no-recompIan Lynagh2008-06-141-1/+1
|
* Allow flags to be marked as deprecatedIan Lynagh2008-06-141-7/+29
|
* eta-reduce a Monad type synonym, so we can use it non-appliedIan Lynagh2008-06-141-2/+2
|
* Use a proper datatype, rather than pairs, for flagsIan Lynagh2008-06-141-22/+22
|
* Cmm back end upgradesdias@eecs.harvard.edu2008-05-291-4/+6
| | | | | | | | | | | | | | | | | | | | | Several changes in this patch, partially bug fixes, partially new code: o bug fixes in ZipDataflow - added some checks to verify that facts converge - removed some erroneous checks of convergence on entry nodes - added some missing applications of transfer functions o changed dataflow clients to use ZipDataflow, making ZipDataflow0 obsolete o eliminated DFA monad (no need for separate analysis and rewriting monads with ZipDataflow) o started stack layout changes - no longer generating CopyIn and CopyOut nodes (not yet fully expunged though) - still not using proper calling conventions o simple new optimizations: - common block elimination -- have not yet tried to move the Adams opt out of CmmProcPointZ - block concatenation o piped optimization fuel up to the HscEnv - can be limited by a command-line flag - not tested, and probably not yet properly used by clients o added unique supply to FuelMonad, also lifted unique supply to DFMonad
* Fix warnings in main/MainIan Lynagh2008-01-191-15/+20
|
* Support multiple -e flagsIan Lynagh2008-01-191-5/+12
|
* Fix whitespaceIan Lynagh2008-01-191-12/+12
|
* Fix giving an error if we are given conflicting mode flagsIan Lynagh2008-01-191-4/+4
|
* Use System.FilePathIan Lynagh2008-01-121-1/+2
|
* Remove the --print-docdir flagIan Lynagh2007-11-271-9/+0
| | | | It wasn't doing the right thing for bindists. Let's rethink...
* Move OPTIONS pragmas above commentsIan Lynagh2007-09-211-7/+7
| | | | Fixes building with -Werror (i.e. validate) and GHC < 6.6
* Fix --print-docdir for relocatable builds; fixes #1226Ian Lynagh2007-09-191-7/+6
|
* Fix CodingStyle#Warnings URLsIan Lynagh2007-09-041-1/+1
|
* Use OPTIONS rather than OPTIONS_GHC for pragmasIan Lynagh2007-09-031-2/+2
| | | | | | | Older GHCs can't parse OPTIONS_GHC. This also changes the URL referenced for the -w options from WorkingConventions#Warnings to CodingStyle#Warnings for the compiler modules.
* Add {-# OPTIONS_GHC -w #-} and some blurb to all compiler modulesIan Lynagh2007-09-011-0/+7
|
* Add a --print-docdir flagIan Lynagh2007-08-311-7/+17
|
* Implement --info, and change how can_split is definedIan Lynagh2007-08-181-0/+12
| | | | | | We now get the value of can_split from the SplitObjs setting in the build system, rather than working out whether it should be possible based on the platform.
* Add a --supported-languages flagIan Lynagh2007-08-051-17/+28
| | | | | Print the list of strings that are accepted in a LANGUAGE pragma, or as a -XFoo flag. (No can be prepended to any of the strings).
* WhitespaceIan Lynagh2007-08-051-11/+11
|
* Remove prefixMatch and suffixMatch from UtilIan Lynagh2007-07-021-1/+1
| | | | Use standard isPrefixOf/isSuffixOf instead.
* Remove the large ghci banner, and the flags to choose which banner to showIan Lynagh2007-07-021-1/+6
| | | | | | | | | | | Fans of the banner can add putStrLn " ___ ___ _" putStrLn " / _ \\ /\\ /\\/ __(_)" putStrLn " / /_\\// /_/ / / | | GHC Interactive, for Haskell 98." putStrLn "/ /_\\\\/ __ / /___| | http://www.haskell.org/ghc/" putStrLn "\\____/\\/ /_/\\____/|_| Type :? for help." putStrLn "" to their ~/.ghci
* Print the right usage messageIan Lynagh2007-07-021-2/+2
| | | | | | | | The logic for printing the ghc and ghci usage messages was inverted. However, the ghci case will never actually happen with the current code, as we print a usage message when cli_mode == ShowUsage and choose the ghci usage message if cli_mode == DoInteractive. This should be fixed as part of a larger options handling overhaul.
* Tweak banner printing2007-06-12Ian Lynagh2007-06-121-22/+11
| | | | | | | | * -{short,long}-ghci-banner are now dynamic options, so you can put ":set -short-ghci-banner" in .ghci * The -v2 banner information now always tells you what compiler booted GHC, and what stage the compiler is. Thus we no longer assume that stage > 1 iff GHCI is defined.
* FIX #1378 Add option for a shorter banner on GHCi startupcdsmith@twu.net2007-06-011-3/+5
| | | | | | | Add -short-ghci-banner and -long-ghci-banner. The default is long, which is the current behavior. The short banner prints a one-line introduction with only the version, web site, and ":? for help" message.
* FIX #1155: ghci -debug generates slightly odd messageSimon Marlow2007-05-071-2/+6
|
* Rationalise GhcMode, HscTarget and GhcLinkSimon Marlow2007-04-111-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up the GHC API, and adds some functionality: we can now compile to object code inside GHCi. Previously we had: data GhcMode = BatchCompile | Interactive | OneShot | JustTypecheck | MkDepend data HscTarget = HscC | HscAsm | HscJava | HscInterpreted | HscNothing There was redundancy here; if GhcMode is Interactive, then only HscInterpreted makes sense, and JustTypecheck required HscNothing. Now we have: data GhcMode = CompManager -- ^ --make, GHCi, etc. | OneShot -- ^ ghc -c Foo.hs | MkDepend -- ^ ghc -M, see Finder for why we need this and HscTarget remains as before. Previously GhcLink looked like this: data GhcLink = NoLink | StaticLink Now we have: data GhcLink = NoLink | LinkBinary | LinkInMemory The idea being that you can have an HscTarget of HscAsm (for example) and still link in memory. There are two new flags: -fobject-code selects object code as the target (selects either -fasm or -fvia-C, whichever is the default) This can be usd with ':set' in GHCi, or on the command line. -fbyte-code sets byte-code as the target. Only works in GHCi. One day maybe this could save the byte code in a file when used outside GHCi. (names chosen for consistency with -fno-code). Changes to the GHC API: newSession no longer takes the GhcMode argument. The GhcMode defaults to CompManager, which is usually what you want. To do JustTypecheck now, just set hscTarget to HscNothing.
* Don't start a GHC session before answering --version/--numeric-versionIan Lynagh2007-01-191-10/+22
| | | | | | This also fixes bootstrapping issues, as when bootstrapping we don't have a package.conf when we run configure, so it fails to work out what version of GHC it is which causes breakage later on.
* allow 'ghci -threaded' (fixes #1101)Simon Marlow2007-01-161-3/+4
|
* Module header tidyup #2Simon Marlow2006-10-111-7/+8
| | | | Push this further along, and fix build problems in the first patch.
* Interface file optimisation and removal of nameParentSimon Marlow2006-10-111-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This large commit combines several interrelated changes: - IfaceSyn now contains actual Names rather than the special IfaceExtName type. The binary interface file contains a symbol table of Names, where each entry is a (package, ModuleName, OccName) triple. Names in the IfaceSyn point to entries in the symbol table. This reduces the size of interface files, which should hopefully improve performance (not measured yet). The toIfaceXXX functions now do not need to pass around a function from Name -> IfaceExtName, which makes that code simpler. - Names now do not point directly to their parents, and the nameParent operation has gone away. It turned out to be hard to keep this information consistent in practice, and the parent info was only valid in some Names. Instead we made the following changes: * ImportAvails contains a new field imp_parent :: NameEnv AvailInfo which gives the family info for any Name in scope, and is used by the renamer when renaming export lists, amongst other things. This info is thrown away after renaming. * The mi_ver_fn field of ModIface now maps to (OccName,Version) instead of just Version, where the OccName is the parent name. This mapping is used when constructing the usage info for dependent modules. There may be entries in mi_ver_fn for things that are not in scope, whereas imp_parent only deals with in-scope things. * The md_exports field of ModDetails now contains [AvailInfo] rather than NameSet. This gives us family info for the exported names of a module. Also: - ifaceDeclSubBinders moved to IfaceSyn (seems like the right place for it). - heavily refactored renaming of import/export lists. - Unfortunately external core is now broken, as it relied on IfaceSyn. It requires some attention.
* Import trimmingsimonpj@microsoft.com2006-10-061-2/+2
|
* Massive patch for the first months work adding System FC to GHC #23Manuel M T Chakravarty2006-08-041-1/+1
| | | | | | | | Broken up massive patch -=chak Original log message: This is (sadly) all done in one patch to avoid Darcs bugs. It's not complete work... more FC stuff to come. A compiler using just this patch will fail dismally.
* Packages cleanup, and allow new packages to be loaded with :set againSimon Marlow2006-09-191-17/+19
| | | | | | | | | | | | | | | | | | This cleans up the package subsystem a little. There are some changes to the GHC API as a result. - GHC.init and GHC.initFromArgs are no longer necessary. - GHC.newSession takes the root of the GHC tree as an argument (previously passed to GHC.init). - You *must* do GHC.setSessionDynFlags after GHC.newSession, this is what loads the package database. - Several global vars removed from SysTools - The :set command in GHCi can now cause new packages to be loaded, or can hide/ignore existing packages.
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+476
Most of the other users of the fptools build system have migrated to Cabal, and with the move to darcs we can now flatten the source tree without losing history, so here goes. The main change is that the ghc/ subdir is gone, and most of what it contained is now at the top level. The build system now makes no pretense at being multi-project, it is just the GHC build system. No doubt this will break many things, and there will be a period of instability while we fix the dependencies. A straightforward build should work, but I haven't yet fixed binary/source distributions. Changes to the Building Guide will follow, too.