summaryrefslogtreecommitdiff
path: root/compiler/main/GHC.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* re-fix of #1205, fix #2542Simon Marlow2008-08-271-25/+49
| | | | | | | | | | | | | | | New form of :load in GHCi: > :load *A forces A to be loaded as byte-code. See the manual for details. The previous behaviour for specifying filenames vs. module names on the command line and in :load has been restored. The Target datatype has a new Bool field, which is True if the target is allowed to be loaded from compiled code, or False otherwise, so this functionality is available via the GHC API. guessTarget understands the *-prefix form for specifying targets.
* Give locations of flag warnings/errorsIan Lynagh2008-08-261-2/+2
|
* Separate the static flag parser from the static global variablesIan Lynagh2008-08-261-0/+1
| | | | | This allows us to avoid a module import loop: CmdLineParser -> SrcLoc -> Outputable -> StaticFlags -> CmdLineParser
* Add -XPackageImports, new syntax for package-qualified importsSimon Marlow2008-08-051-1/+1
| | | | | | | | | | | | | | | | | Now you can say import "network" Network.Socket and get Network.Socket from package "network", even if there are multiple Network.Socket modules in scope from different packages and/or the current package. This is not really intended for general use, it's mainly so that we can build backwards-compatible versions of packages, where we need to be able to do module GHC.Base (module New.GHC.Base) where import "base" GHC.Base as New.GHC.Base
* Follow Digraph changes in GHC; patch from Max BolingbrokeIan Lynagh2008-08-071-71/+74
|
* Split the Id related functions out from Var into Id, document Var and some of IdMax Bolingbroke2008-07-311-1/+1
|
* Follow changes in the base libraryIan Lynagh2008-07-311-27/+54
| | | | | TopHandler now uses the new extensible exceptions module, so we need to interact with it using the new types.
* Follow extensible exception changesIan Lynagh2008-07-301-4/+4
|
* Complete the changes for #1205Simon Marlow2008-07-281-1/+5
| | | | | | Now ":load M" always searches for a module called "M", rather than using a file called "M.hs" if that exists. To get the file semantics (i.e. not loading "M.o"), use ":load M.hs".
* Fix Haddock errors.Thomas Schilling2008-07-201-2/+1
|
* Add a WARNING pragmaIan Lynagh2008-07-201-1/+1
|
* FIX BUILD on WindowsSimon Marlow2008-07-141-1/+1
|
* FIX #2248Simon Marlow2008-07-111-3/+12
| | | | | Unconditionally add .exe to the output executable name when using --make on Windows, and no -o option was given.
* small improvement to an error messageSimon Marlow2008-07-111-1/+1
|
* FIX #2381, and improve the fix for #1565Simon Marlow2008-07-111-9/+23
|
* #1205: ':load foo.hs' in GHCi always compiles to bytecodeSimon Marlow2008-07-091-2/+10
| | | | | | | | | | | | | | | | | So now :load foo.hs loads bytecode for foo.hs, even if foo.o exists :load foo is just shorthand for :load foo.hs :load M loads a module M, as object code if possible (no change here) :set -fobject-code :load foo.hs loads foo.hs as object code; an existing foo.o can be used. This turned out to be very straightforward: when building the ModSummary for a file (summariseFile) we just ignore the object file unless -fobject-code is on.
* Handle errors in an OPTIONS pragma when preprocessingIan Lynagh2008-06-141-3/+3
|
* Allow flags to be marked as deprecatedIan Lynagh2008-06-141-5/+3
|
* Make initSysTools use the dflags it is passed, rather than defaultDynFlagsIan Lynagh2008-06-141-2/+2
|
* Pass dynflags down through to pragStateIan Lynagh2008-06-141-1/+1
| | | | so we no longer need to use defaultDynFlags there
* Cmm back end upgradesdias@eecs.harvard.edu2008-05-291-6/+7
| | | | | | | | | | | | | | | | | | | | | 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
* (F)SLIT -> (f)sLit in GHCIan Lynagh2008-04-121-4/+4
|
* Improve error message for non-matching file nameTim Chevalier2008-04-061-2/+3
| | | | | | I changed the "File name does not match module name" error message so that it prints out both the declared module name and the expected module name (before, it was only printing the declared module name.)
* Don't import FastString in HsVersions.hIan Lynagh2008-03-291-0/+1
| | | | Modules that need it import it themselves instead.
* Convert more UniqFM's back to LazyUniqFM'sIan Lynagh2008-02-071-1/+1
| | | | | | | | | | | | | | | These fix these failures: break008(ghci) break009(ghci) break026(ghci) ghci.prog009(ghci) ghci025(ghci) print007(ghci) prog001(ghci) prog002(ghci) prog003(ghci) at least some of which have this symptom: Exception: expectJust prune
* Use System.FilePathIan Lynagh2008-01-121-4/+6
|
* Extend API for compiling to and from CoreTim Chevalier2007-12-251-21/+120
| | | | | | | Added API support for compiling Haskell to simplified Core, and for compiling Core to machine code. The latter, especially, should be considered experimental and has only been given cursory testing. Also fixed warnings in DriverPipeline. Merry Christmas.
* FIX #1914: GHCi forgot all the modules that were loaded before an errorSimon Marlow2007-11-301-1/+1
|
* Avoid making Either String an instance of Monad in the Haddock parserDavid Waern2007-11-141-1/+4
|
* #1617: Add :browse! and various other additions to GHCiSimon Marlow2007-11-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - :browse! a variant of :browse that lists children separately, not in context, and gives import qualifiers in comments SimonM: I also added sorting by source location for interpreted modules in :browse, and alphabetic sorting by name otherwise. For :browse *M, the locally-defined names come before the external ones. - :{ ..lines.. :} (multiline commands) allow existing commands to be spread over multiple lines to improve readability, both interactively and in .ghci (includes a refactoring that unifies the previous three command loops into one, runCommands, fed from cmdqueue, file, or readline) - :set now shows GHCi-specific flag settings (printing/ debugger), as well as non-language dynamic flag settings :show languages show active language flags :show packages show active package flags as well as implicitly loaded packages
* fix stage 1 compilationSimon Marlow2007-11-061-2/+2
|
* GHC API: add checkAndLoadModuleSimon Marlow2007-11-061-22/+67
| | | | | | | | | | | | | Does what the name suggests: it performs the function of both checkModule and load on that module, avoiding the need to process each module twice when checking a batch of modules. This will make Haddock and ghctags much faster. Along with this is the beginnings of a refactoring of the HscMain interface. HscMain now exports functions for separately running the parser, typechecher, and generating ModIface and ModDetails. Eventually the plan is to complete this interface and use it to replace the existing one.
* request for documentation of a new argumentnr@eecs.harvard.edu2007-06-251-0/+1
|
* Make compileToCore return the module name and type environment along with ↵Tim Chevalier2007-10-271-17/+28
| | | | | | | | | | | | | | bindings compileToCore returned just a list of CoreBind, which isn't enough, since to do anything with the resulting Core code, you probably also want the type declarations. I left compileToCore as it is, but added a function compileToCoreModule that returns a complete Core module (with module name, type environment, and bindings). I'm not sure that returning the type environment is the best way to represent the type declarations for the given module, but I don't want to reinvent the External Core wheel for this.
* refactoring only: use the parameterised InstalledPackageInfoSimon Marlow2007-10-031-1/+0
| | | | This required moving PackageId from PackageConfig to Module
* Define and use PprTyThing.pprTypeForUsersimonpj@microsoft.com2007-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | When printing types for the user, the interactive UI often wants to leave foralls implicit. But then (as Claus points out) we need to be careful about name capture. For example with this source program class C a b where op :: forall a. a -> b we were erroneously displaying the class in GHCi (with suppressed foralls) thus: class C a b where op :: a -> b which is utterly wrong. This patch fixes the problem, removes GHC.dropForAlls (which is dangerous), and instead supplies PprTyThing.pprTypeForUser, which does the right thing.
* refactoring: eliminate DriverPipeline.CompResult and GHC.upsweep_compileSimon Marlow2007-09-101-25/+2
|
* FIX #1677; poor error message for misspelled module declarationSimon Marlow2007-09-111-2/+2
|
* FIX #903: mkWWcpr: not a productSimon Marlow2007-09-101-19/+102
| | | | | | | | | | | | | | | This fixes the long-standing bug that prevents some code with mutally-recursive modules from being compiled with --make and -O, including GHC itself. See the comments for details. There are some additional cleanups that were forced/enabled by this patch: I removed importedSrcLoc/importedSrcSpan: it wasn't adding any useful information, since a Name already contains its defining Module. In fact when re-typechecking an interface file we were wrongly replacing the interesting SrcSpans in the Names with boring importedSrcSpans, which meant that location information could degrade after reloading modules. Also, recreating all these Names was a waste of space/time.
* Make various assertions work when !DEBUGIan Lynagh2007-09-081-2/+0
|
* FIX #1465, error messages could sometimes say things like "A.T doesn't match ↵Simon Marlow2007-09-061-5/+7
| | | | | | | | | | | | | A.T" This turned out to be a black hole, however we believe we now have a plan that does the right thing and shouldn't need to change again. Error messages will only ever refer to a name in an unambiguous way, falling back to <package>:<module>.<name> if no unambiguous shorter variant can be found. See HscTypes.mkPrintUnqualified for the details. Earlier hacks to work around this problem have been removed (TcSimplify).
* change of representation for GenCmm, GenCmmTop, CmmProcNorman Ramsey2007-09-051-1/+1
| | | | | | | | | The type parameter to a C-- procedure now represents a control-flow graph, not a single instruction. The newtype ListGraph preserves the current representation while enabling other representations and a sensible way of prettyprinting. Except for a few changes in the prettyprinter the new compiler binary should be bit-for-bit identical to the old.
* fix warningsSimon Marlow2007-09-051-43/+43
|
* FIX #1650: ".boot modules interact badly with the ghci debugger"Simon Marlow2007-09-051-1/+1
| | | | | | | | | | | | | | | | | | | In fact hs-boot files had nothing to do with it: the problem was that GHCi would forget the breakpoint information for a module that had been reloaded but not recompiled. It's amazing that we never noticed this before. The ModBreaks were in the ModDetails, which was the wrong place. When we avoid recompiling a module, ModDetails is regenerated from ModIface by typecheckIface, and at that point it has no idea what the ModBreaks should be, so typecheckIface made it empty. The right place for the ModBreaks to go is with the Linkable, which is retained when compilation is avoided. So now I've placed the ModBreaks in with the CompiledByteCode, which also makes it clear that only byte-code modules have breakpoints. This fixes break022/break023
* 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
|
* Use a version of obtainTerm that takes a max depth boundPepe Iborra2007-08-271-1/+6
| | | | when printing the contents of binding at a breakpoint
* Print contents of bindings when stopping at a breakpointPepe Iborra2007-08-261-1/+9
|
* A partial attempt to improve :stepoverPepe Iborra2007-08-241-6/+1
| | | | | | | | | | | | | | With this patch, :stepover can effectively appear to step over recursive calls and calls to locally bound functions (in a where clause). However, when we run out of ticks in the current expression, the illusion vanishes and laziness brings us to the body of the last function we "stepped over". This is not desired at all, it is potentially very confusing. As a countermeasure, when this happens :stepover emits a warning "Warning: no more breakpoints in this function body, switching to :step"