| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This allows us to avoid a module import loop:
CmdLineParser -> SrcLoc -> Outputable -> StaticFlags -> CmdLineParser
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
| |
TopHandler now uses the new extensible exceptions module, so we
need to interact with it using the new types.
|
| |
|
|
|
|
|
|
| |
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".
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Unconditionally add .exe to the output executable name when using
--make on Windows, and no -o option was given.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
so we no longer need to use defaultDynFlags there
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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.)
|
|
|
|
| |
Modules that need it import it themselves instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- :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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This required moving PackageId from PackageConfig to Module
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
when printing the contents of binding at a breakpoint
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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"
|