summaryrefslogtreecommitdiff
path: root/ghc/compiler/compMan
Commit message (Collapse)AuthorAgeFilesLines
...
* [project @ 2001-06-05 10:31:57 by sewardj]sewardj2001-06-051-4/+3
| | | | Improve instance Outputable Linkable (purely cosmetic).
* [project @ 2001-05-08 10:58:48 by simonmar]simonmar2001-05-081-1/+1
| | | | | | | | | | | | | | | | | Add DriverPhases.haskellish_src_suffix :: String -> Bool DriverPhases.haskellish_src_file :: String -> Bool which return True for suffixes of Haskell source files only. The existing haskellish_suffix and haskellish_file return True also for .raw_s and .hc files. We use these instead of haskellish_file in Main.main when deciding whether to preprocess a file. Fixes: compilation of .raw_s files, and potential bugs with compilation of .hc files.
* [project @ 2001-05-04 14:56:53 by simonmar]simonmar2001-05-041-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | - only read ~/.ghci if it is owned by the current user and isn't writable by anyone else. - Only read ./.ghci if both . and ./.ghci are owned by the current user and aren't writable by anyone else. I think this is sufficient: we don't need to check .. and ../.. etc. because "." always refers to the same directory while a process is running. - Don't load .so libraries in a package if that package is already linked with GHCi. This stops us re-linking libm, libreadline etc. - Allow packages to be loaded from within GHCi using :set -package <name> NOTE: this will unload all modules currently loaded into the interpreter. I did this to be on the safe side - I think perhaps it isn't necessary, but I haven't thought it through fully yet. - fix CompManager.cmUnload in the process. It was wrong in several ways. MERGE WITH 5.00
* [project @ 2001-05-01 16:01:06 by simonmar]simonmar2001-05-011-7/+5
| | | | Close files eagerly after analysing their imports.
* [project @ 2001-04-27 15:41:49 by sewardj]sewardj2001-04-271-2/+1
| | | | Avoid pattern match failure in getValidLinkable.maybe_old_linkable.
* [project @ 2001-03-28 18:53:39 by qrczak]qrczak2001-03-281-1/+1
| | | | Typo.
* [project @ 2001-03-28 16:51:02 by simonmar]simonmar2001-03-281-6/+6
| | | | | | | | | | | | Cleaning up error reporting, 2nd attempt. - The UserError name is already bagged by Exception (for userErrors). So we use ProgramError instead, which is more appropriate. - some previously UserErrors are now CmdLineErrors. GHCi catches CmdLineErrors and prints them without the "ghc: " prefix.
* [project @ 2001-03-28 11:01:19 by simonmar]simonmar2001-03-282-15/+13
| | | | | | | | | | | | | | Clean up GHC's error reporting. - the GhcException type has some more constructors: CmdLineError, UserError, and InstallationError. OtherError has gone. - most error messages should begin with "<location>:". When the error is on the command-line or in GHC itself, <location> is "ghc", for consistency with std Unix semantics. - GHCi no longer prints a superfluous "ghc: " before certain error messages.
* [project @ 2001-03-21 14:26:30 by simonmar]simonmar2001-03-212-66/+56
| | | | | | | Fix for a harmless assertion failure (reachable_from included package modules). Also, clean up the downsweep code, and make it more efficient.
* [project @ 2001-03-19 16:22:00 by simonmar]simonmar2001-03-192-13/+27
| | | | | | | | | | | | Fix a problem with the 'it' variable in GHCi. New bindings for 'it' were getting confused with old bindings, because we always used the same 'it' name. Now, we generate a new unique for 'it' each time around. Also, make sure that any existing variables shadowed by new command-line bindings are correctly removed from the environments to avoid space leaks.
* [project @ 2001-03-15 15:53:28 by simonmar]simonmar2001-03-151-31/+1
| | | | | Remove package management support into a separate tool (ghc-pkg), and don't duplicate the definition of PackageConfig.
* [project @ 2001-03-15 11:26:27 by simonmar]simonmar2001-03-151-32/+18
| | | | | | | | | | | | | | Do a better job of telling the user whether we're interpreting a module or using an existing object file. eg. Main> :load A Skipping D ( D.hs, D.o ) Compiling C ( C.hs, interpreted ) Skipping B ( B.hs, B.o ) Compiling Main ( A.hs, interpreted ) Main>
* [project @ 2001-03-12 14:06:46 by simonpj]simonpj2001-03-121-7/+5
| | | | | | | | | | | | | | ---------------- First cut at ILX ---------------- This commit puts the ILX .NET code generator into the head. It's entirely untested, mind you. Some changes to the Module/Package strutures, mainly of a naming variety. In particular: Package ===> PackageConfig
* [project @ 2001-03-08 12:07:38 by simonpj]simonpj2001-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -------------------- A major hygiene pass -------------------- 1. The main change here is to Move what was the "IdFlavour" out of IdInfo, and into the varDetails field of a Var It was a mess before, because the flavour was a permanent attribute of an Id, whereas the rest of the IdInfo was ephemeral. It's all much tidier now. Main places to look: Var.lhs Defn of VarDetails IdInfo.lhs Defn of GlobalIdDetails The main remaining infelicity is that SpecPragmaIds are right down in Var.lhs, which seems unduly built-in for such an ephemeral thing. But that is no worse than before. 2. Tidy up the HscMain story a little. Move mkModDetails from MkIface into CoreTidy (where it belongs more nicely) This was partly forced by (1) above, because I didn't want to make DictFun Ids into a separate kind of Id (which is how it was before). Not having them separate means we have to keep a list of them right through, rather than pull them out of the bindings at the end. 3. Add NameEnv as a separate module (to join NameSet). 4. Remove unnecessary {-# SOURCE #-} imports from FieldLabel.
* [project @ 2001-03-06 11:23:46 by simonmar]simonmar2001-03-061-14/+29
| | | | | | | | | | | | - Add a Happy parser for the package config file. This is faster and compiles to less code than the derived Read instance we had before. - Add a source_dirs field to the package spec. This isn't used by GHC, because we currently assume all packages are compiled. It could be used by Hugs, though. - Make unspecified fields of type [String] default to the empty list in a package spec.
* [project @ 2001-03-02 17:35:20 by simonmar]simonmar2001-03-021-11/+28
| | | | | Fix :type again, by resurrecting typecheckExpr. Now the expression doesn't get the monomorphism restriction applied to it.
* [project @ 2001-03-01 21:39:36 by qrczak]qrczak2001-03-011-2/+2
| | | | Let ':t \x->x' work by putting a space before the expression.
* [project @ 2001-03-01 16:56:44 by simonpj]simonpj2001-03-011-1/+4
| | | | Move import
* [project @ 2001-03-01 14:26:00 by simonmar]simonmar2001-03-012-18/+22
| | | | | | | | | | | | | | | | | GHCi fixes: - expressions are now compiled in a pseudo-module "$Interactive", which avoids some problems with storage of demand-loaded declarations. - compilation manager now detects when it needs to read the interace for a module, even if it is already compiled. GHCi never demand-loads interfaces now. - (from Simon PJ) fix a problem with the recompilation checker, which meant that modules were sometimes not recompiled when they should have been. - ByteCodeGen/Link: move linker related stuff into ByteCodeLink.
* [project @ 2001-02-28 17:57:52 by simonmar]simonmar2001-02-281-56/+49
| | | | | | | | | | | | | | | Compiling a module outside of a running GHCi and expecting GHCi to pick it up when you do ':r' ain't gonna work. We thought it would, but there's a problem with module versions and the recompilation machinery, namely that the outside compiler doesn't know about the versions being used internally in the running GHCi. The "right" solution is to implement a ':compile' command in GHCi, but we aren't going to do that before the release. This commit disables the picking up of newly compiled modules, until you do a full load (i.e. :load).
* [project @ 2001-02-28 12:12:43 by simonmar]simonmar2001-02-281-2/+0
| | | | oops, don't export cmTypeOfName when !GHCI.
* [project @ 2001-02-27 15:26:04 by simonmar]simonmar2001-02-271-9/+83
| | | | - make flushing and :def work again in the interpreter
* [project @ 2001-02-26 16:59:17 by simonmar]simonmar2001-02-261-1/+0
| | | | lookupClosure not used.
* [project @ 2001-02-26 16:43:31 by simonmar]simonmar2001-02-261-5/+28
| | | | Update the interactive context in cmRunStmt rather than hscMain.
* [project @ 2001-02-26 16:42:48 by simonmar]simonmar2001-02-261-0/+1
| | | | Unload temporary bindings from the ClosureEnv properly at cmLoadModule time.
* [project @ 2001-02-26 15:50:21 by simonmar]simonmar2001-02-261-9/+0
| | | | | | | - message wibbles - in one-shot mode, make sure the interface file follows the module rather than the filename of the source.
* [project @ 2001-02-26 15:40:54 by simonpj]simonpj2001-02-261-1/+3
| | | | Make it build without GHCI
* [project @ 2001-02-26 15:06:57 by simonmar]simonmar2001-02-262-99/+190
| | | | | | | | | | | | | | | | | Implement do-style bindings on the GHCi command line. The syntax for a command-line is exactly that of a do statement, with the following meanings: - `pat <- expr' performs expr, and binds each of the variables in pat. - `let pat = expr; ...' binds each of the variables in pat, doesn't do any evaluation - `expr' behaves as `it <- expr' if expr is IO-typed, or `let it = expr' followed by `print it' otherwise.
* [project @ 2001-02-12 13:33:46 by simonmar]simonmar2001-02-121-0/+11
| | | | | Clean up temporary files between compilations, but cache preprocessed modules that we might re-use.
* [project @ 2001-02-07 16:24:41 by simonmar]simonmar2001-02-071-1/+0
| | | | remove accidentally left-in trace
* [project @ 2001-02-07 16:23:28 by simonmar]simonmar2001-02-071-1/+2
| | | | wibble
* [project @ 2001-02-07 16:17:26 by sewardj]sewardj2001-02-071-2/+3
| | | | Always have (unload Batch) work, regardless if definedness of GHCI.
* [project @ 2001-02-07 16:12:47 by simonmar]simonmar2001-02-072-12/+22
| | | | wibbles
* [project @ 2001-02-07 16:07:31 by simonmar]simonmar2001-02-071-47/+72
| | | | | | Enforce the restriction that .o files may only depend on other .o files. Any .o files which don't satisfy this requirement will be ignored, and the module interpreted instead.
* [project @ 2001-02-07 13:47:03 by sewardj]sewardj2001-02-071-2/+4
| | | | #ifndef GHCI wibbles.
* [project @ 2001-02-07 11:53:00 by simonmar]simonmar2001-02-071-2/+4
| | | | | Don't re-link interpreted modules if they haven't changed. Now :r is almost instantaneous when nothing changes (as it should be).
* [project @ 2001-02-07 11:48:10 by simonmar]simonmar2001-02-071-2/+2
| | | | wibble
* [project @ 2001-02-07 11:45:19 by simonmar]simonmar2001-02-071-39/+67
| | | | don't re-summarise a module if its source hasn't changed.
* [project @ 2001-02-06 12:03:10 by simonmar]simonmar2001-02-063-80/+121
| | | | | | | | | | | | | | | | Try to get the stable modules story right. Things now work much better: objects aren't unloaded and reloaded unnecessarily, and compiling modules from with GHCi works: > :! ghc -c A.hs > :r Compiling A ... compilation IS NOT required (using ./A.o) Compiling B ... compilation IS NOT required Compiling C ... compilation IS NOT required Compiling Main ... compilation IS NOT required Compiled module must not depend on interpreted modules, but we currently don't enforce this restriction properly.
* [project @ 2001-02-05 11:18:54 by simonmar]simonmar2001-02-051-21/+7
| | | | linking fixes
* [project @ 2001-02-05 11:14:28 by simonmar]simonmar2001-02-051-21/+31
| | | | Add a list of objects currently loaded to the persistent linker state.
* [project @ 2001-01-31 12:40:51 by simonmar]simonmar2001-01-311-1/+1
| | | | Throw away linkables in cmUnload, as well as interfaces.
* [project @ 2001-01-26 17:37:27 by simonmar]simonmar2001-01-261-46/+29
| | | | merge PersistentCmState and CmState
* [project @ 2001-01-26 17:29:34 by simonmar]simonmar2001-01-261-8/+3
| | | | | | Ok, don't throw away interfaces and symbol tables as part of the pre-upsweep. This seems to fix the recompilation problems (well, some of them anyway...).
* [project @ 2001-01-26 17:21:51 by simonmar]simonmar2001-01-261-127/+121
| | | | | | | | | | | | | | | | | | Greatly simplify the story about linkables, source_unchanged, and the pre-upsweep. Now we pre-generate the list of valid linkables; that is, for each module if a linkable exists and is newer than the source, we keep it. If a module has a valid linkable, then it is "source unchanged", and it is also possibly "stable" as far as the pre-upsweep is concerned (as long as its imports are also stable). The pre-upsweep is no longer dependent on the mode (interactive/batch). There's still a bug here, though: the pre-upsweep removes old interfaces from the HIT, so we don't get an opportunity to avoid compilation for non-stable modules. That's the next job.
* [project @ 2001-01-25 17:47:12 by simonpj]simonpj2001-01-251-3/+3
| | | | | | | | | | | | | | A big improvement to the way command-line expressions are typechecked. Now we don't wrap in "print" and hope for the best (the wrong "print" might be in scope). Instead we work on the renamed epxression and do the Right Thing by using the correct "print". Also do generalisation, so that we get the right type back from the :t command. WARNING: it's possible that these files overlap with my fortcoming Big Commit of typechecker stuff, so you may need to hang on for a few mins.
* [project @ 2001-01-18 16:30:00 by simonmar]simonmar2001-01-181-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Problem 1 ========= The typechecker, when deciding whether to extend the Package environment with any new typechecked declarations in its hand, was inserting new declarations into the environment only if the declaration's module differed from the "current" module. This doesn't work if the "current" module is a package module, as it could be at the GHCi command line, for example. The solution is to filter the declarations only if the current module is not a package module. Problem 2 ========= The "current" module, as obtained from the compilation manager, was always bogusly a Home module (it used mkHomeModule). To properly fix this, the GHCi state has to carry around Modules instead of ModuleNames, and CompMan.cmLoadModule needs to return a list of Modules.
* [project @ 2001-01-16 17:09:43 by sewardj]sewardj2001-01-161-2/+3
| | | | Various ghci interactive UI fixes/improvements.
* [project @ 2000-12-18 12:43:04 by sewardj]sewardj2000-12-183-23/+17
| | | | Wire in the bytecode interpreter and delete the old one.
* [project @ 2000-12-13 12:19:00 by sewardj]sewardj2000-12-131-1/+1
| | | | import wibbles