darcs patch: Add a warning flag for when the Prelude is implicitly
...
Isaac Dupree
isaacdupree at charter.net
Tue May 8 18:25:34 EDT 2007
Tue May 8 18:09:25 EDT 2007 Isaac Dupree <id at isaac.cedarswampstudios.org>
* Add a warning flag for when the Prelude is implicitly imported (trac #1317)
GHC already determines all the implicit (Prelude) imports,
so we just need to check whether there are any of those,
for each module being compiled.
see also testsuite patch
-------------- next part --------------
New patches:
[Add a warning flag for when the Prelude is implicitly imported (trac #1317)
Isaac Dupree <id at isaac.cedarswampstudios.org>**20070508220925
GHC already determines all the implicit (Prelude) imports,
so we just need to check whether there are any of those,
for each module being compiled.
] {
hunk ./compiler/main/DynFlags.hs 142
+ | Opt_WarnImplicitPrelude
hunk ./compiler/main/DynFlags.hs 1024
+ ( "warn-implicit-prelude", Opt_WarnImplicitPrelude ),
hunk ./compiler/rename/RnNames.lhs 72
+ ifOptM Opt_WarnImplicitPrelude (
+ when (notNull prel_imports) $ addWarn (implicitPreludeWarn)
+ )
+
hunk ./compiler/rename/RnNames.lhs 1362
+
+implicitPreludeWarn
+ = ptext SLIT("Module `Prelude' implicitly imported")
hunk ./docs/users_guide/flags.xml 768
+
+ <row>
+ <entry><option>-fwarn-implicit-prelude</option></entry>
+ <entry>warn when the Prelude is implicitly imported</entry>
+ <entry>dynamic</entry>
+ <entry><option>-fno-warn-implicit-prelude</option></entry>
+ </row>
hunk ./docs/users_guide/using.xml 851
+ <listitem><option>-fwarn-implicit-prelude</option></listitem>
hunk ./docs/users_guide/using.xml 916
+
+ <varlistentry>
+ <term><option>-fwarn-implicit-prelude</option>:</term>
+ <listitem>
+ <indexterm><primary><option>-fwarn-implicit-prelude</option></primary></indexterm>
+ <indexterm><primary>implicit prelude, warning</primary></indexterm>
+ <para>Have the compiler warn if the Prelude is implicitly
+ imported. This happens unless either the Prelude module is
+ explicitly imported with an <literal>import ... Prelude ...</literal>
+ line, or this implicit import is disabled (either by
+ <option>-fno-implicit-prelude</option> or a
+ <literal>LANGUAGE NoImplicitPrelude</literal> pragma).</para>
+
+ <para>Note that no warning is given for syntax that implicitly
+ refers to the Prelude, even if <option>-fno-implicit-prelude</option>
+ would change whether it refers to the Prelude.
+ For example, no warning is given when
+ <literal>368</literal> means
+ <literal>Prelude.fromInteger (368::Prelude.Integer)</literal>
+ (where <literal>Prelude</literal> refers to the actual Prelude module,
+ regardless of the imports of the module being compiled).</para>
+
+ <para>This warning is off by default.</para>
+ </listitem>
+ </varlistentry>
}
Context:
[Panic properly if wrongKindOfFamily is given an unexpected family
Ian Lynagh <igloo at earth.li>**20070504221857
Used to just give a "Non-exhaustive patterns" failure
]
[The libraries/* directories themselves are boring, as well as their contents
Ian Lynagh <igloo at earth.li>**20070504145930]
[libraries/filepath/ is boring
Ian Lynagh <igloo at earth.li>**20070504145756]
[Warning police
simonpj at microsoft.com**20070504122419]
[Make -frewrite-rules into a dynamic flag; off for -O0
simonpj at microsoft.com**20070504122405
Argubly rewrite rules should not fire with -O0, and it turns
out that when compiling GHC.Base with -O0 we get a crash if
the rewrite rules do fire (see Note [Scoping for Builtin rules]
in PrelRules).
So unless someone yells, rewrite rules are off with -O0.
The new (now dynamic) flag is
-frewrite rules (with -fno-rewrite-rules to disable)
The old (static) flag -frules-off is gone.
]
[Improve printing of "..." in HsExpr; fixes a stupidity in my earlier change
simonpj at microsoft.com**20070504113454]
[Fix the pruning of dead case alternatives
simonpj at microsoft.com**20070504110650
This fixes Trac #1251; test case is gadt/CasePrune
GHC was being over-eager about pruning dead alternatives from case
expressions, and that led to a crash because the case expression
ended up with no alternatives at all!
See the long comments Note [Pruning dead case alternatives] in Unify.
]
[Warning police
simonpj at microsoft.com**20070504110341]
[isDataTyCon should be False for all type families, even data type families
simonpj at microsoft.com**20070504110301
isDataTyCon advertises that it's true of "data types that are
definitely represented by heap-allocated constructors. These are
srcutinised by Core-level @case@ expressions, and they get info tables
allocated for them."
Type-family TyCons never have this property, not even data type families.
It's the *instance* TyCons that do.
I hope that this change does not break anything that somehow relied
on the old (wrong) semantics.
]
[Fix dependency information for RULES
simonpj at microsoft.com**20070503124759
A SpecInfo (inside IdInfo) keeps track of the free variables of a RULE
so that the occurrency analyser knows about its dependencies.
Previously it was only tracking the *rhs* free vars, but it should
really include the *lhs* ones too. See Note [Rule dependency info]
in IdInfo.
This fixes a WARNING when compiling some libraries.
]
[Less voluminous debug
simonpj at microsoft.com**20070503124715]
[Remove "__" prefix for forall when printing a RULE
simonpj at microsoft.com**20070503124606]
[Add the -ddump-mod-cycles flag to the user manual
simonpj at microsoft.com**20070503124518]
[Fix truncate on amd64 NCG; fixes arith005.
Ian Lynagh <igloo at earth.li>**20070503223833
cvts[sd]2siq? ->
cvtts[sd]2siq?
]
[Add missing libraries/Makefile dependencies on ifBuildable/ifBuildable
Ian Lynagh <igloo at earth.li>**20070503140732]
[Use a primop for getting the fields of the AP_STACK rather than an FFI call
Simon Marlow <simonmar at microsoft.com>**20070503151941
This means we can avoid some StablePtrs, and also catch cases where
the AP_STACK has been evaluated (this can happen with :history, see
the hist001 test).
]
[improve the :list command
Simon Marlow <simonmar at microsoft.com>**20070503150612
Now you can list source code in various ways:
:list <line>
:list <module> <line>
:list <function>
]
[Add a little documentation to the libraries/Makefile
Ian Lynagh <igloo at earth.li>**20070503133654]
[Only touch the configure stamp if configure succeeds
Ian Lynagh <igloo at earth.li>**20070503123913
We don't touch $@ if configure failed as we would prefer to try
configuring it next time round, rather than assuming it'll still fail.
This is particularly important for corelibs, where failure means the
build dies!
]
[Add history/trace functionality to the GHCi debugger
Simon Marlow <simonmar at microsoft.com>**20070503131955
The debugger can now log each step of the evaluation without actually
stopping, keeping a history of the recent steps (currently 50). When
a (real) breakpoint is hit, you can examine previous steps in the
history (and their free variables) using the :history, :back and
:forward commands.
]
[use extendInteractiveContext instead of custom code
Simon Marlow <simonmar at microsoft.com>**20070503131525]
[cancel out some reverses by changing the order of ic_tmp_ids
Simon Marlow <simonmar at microsoft.com>**20070503125224]
[use the reader part of the monad for the inScope set
Simon Marlow <simonmar at microsoft.com>**20070503125006]
[Make coreSyn/CoreUtils.lhs compile
Ian Lynagh <igloo at earth.li>**20070503120841
Use the right number of arguments in a panic case.
]
[Make boot handle getting the libraries
Ian Lynagh <igloo at earth.li>*-20070430113519]
[Remove references to -fticky-ticky flag
Tim Chevalier <chevalier at alum.wellesley.edu>**20070501053719
-ticky is the command-line flag for ticky-ticky profiling now, but
internally, the -fticky-ticky flag was used to represent whether ticky
was on. This led to link errors if the user supplied -fticky-ticky but
not -ticky (ticky code would be generated but the wrong RTS library
would be passed to the linker). I removed references to -fticky-ticky
-- now, only the way flags dictate whether ticky is on, and
-fticky-ticky is no longer accepted as a command-line option.
]
[Comments, plus type sigs
simonpj at microsoft.com**20070502163854]
[Warning police
simonpj at microsoft.com**20070502163833]
[Layout only
simonpj at microsoft.com**20070502163815]
[Import fiddling
simonpj at microsoft.com**20070502163746]
[Add more assertions
simonpj at microsoft.com**20070502163709]
[Use the record fields of IdInfo.RecordSelId
simonpj at microsoft.com**20070502163618]
[Make records work properly with type families
simonpj at microsoft.com**20070502163457
This fixes Trac #1204. There's quite a delicate interaction of
GADTs, type families, records, and in particular record updates.
Test is indexed-types/should_compile/Records.hs
]
[Refactoring, tidyup and improve layering
Simon Marlow <simonmar at microsoft.com>**20070502135434
The stack of breakpoint resume contexts is now part of the
InteractiveContext and managed by the GHC API. This prevents misuse
of the resume context by the client (e.g. resuming a breakpoint that
isn't the topmost, which would lead to a confused IC at the least).
I changed the TypeEnv in the IC to a [Id]. It only contained Ids
anyway, and this allows us to have shadowing, which removes an ugly
and annoying restriction.
The parts of the GHC API which deal with interactive evaluation are
now in a module of their own, InteractiveEval.
]
[move -fno-print-bind-result into the GHCi section
Simon Marlow <simonmar at microsoft.com>**20070502125523]
[Print the "skipping" messages at verbosity 2 again
Simon Marlow <simonmar at microsoft.com>**20070502124301
This was accidentally changed to 1 in the HEAD a while ago, the
behaviour is now the same as 6.6.x again.
]
[Improve error reporting for type signatures
simonpj at microsoft.com**20070502114738
See Trac #1310
]
[Do not generate warnings for compiler-generated code
simonpj at microsoft.com**20070502103924
Fixes Trac #1313
]
[Add ndp package to boring list
simonpj at microsoft.com**20070502103845]
[Document the fact that you can't make a newtype of an unboxed data type
simonpj at microsoft.com**20070502103815]
[Use pprSourceTyCon; delete unused tyConOrigHead
simonpj at microsoft.com**20070502103632]
[Fixes to data type families
simonpj at microsoft.com**20070502102811
- Fix two distinct bugs, one in MkId.mkDataConIds, one in DataCon.mkDataCon
- Add more comments
- Add a little assertion checking in TyCon
Type-family tests now work.
]
[Fix egregious typo in TcUnify
simonpj at microsoft.com**20070427154131
Tom S found this bug by inspection; we've never seen it
fail in the wild, but it was obviosly Utterly Wrong
]
[Typo in comments
simonpj at microsoft.com**20070425161306]
[Fix misleading debug trace
simonpj at microsoft.com**20070425161244]
[Improve hashing of expressions for CSE (reduces warnings about extendCSEnv)
simonpj at microsoft.com**20070425141530]
[remove unused primitives.xml
Simon Marlow <simonmar at microsoft.com>**20070502082902]
[Fix grammar error in docs (as per Trac 1319)
Tim Chevalier <chevalier at alum.wellesley.edu>**20070502011956]
[Stopping tick boxes for being removed round calls to error.
andy at galois.com**20070501155729]
[-fwarn-monomorphism-restriction is now off by default
Ian Lynagh <igloo at earth.li>**20070501142543]
[Add new skolem tyvars to the InteractiveContext after type reconstruction
Pepe Iborra <mnislaih at gmail.com>**20070501101105
This was being done already for each binding added by :print,
but :sprint does not add any new binding, so we take care of it
separately
]
[document the current behaviour of -Wall, see #1292
Simon Marlow <simonmar at microsoft.com>**20070501082224]
[don't forget to enable ^C after a :cont or :step
Simon Marlow <simonmar at microsoft.com>**20070430150645]
[tidyup comments and fix a few warnings
Simon Marlow <simonmar at microsoft.com>**20070430105722]
[Changing internal data structures used by Hpc
andy at galois.com**20070430225915
- .tix files are now a list of MixModule, which contain a hash of the contents of the .mix file.
- .mix files now have (the same) hash number.
This changes allow different binaries that use the same module compiled in the same way
to share coverage information.
]
[Remove skolem tyvars from the InteractiveContext once they have been instantiated by :print
Pepe Iborra <mnislaih at gmail.com>**20070430184522]
[Restore tidying up of tyvars in :print
Pepe Iborra <mnislaih at gmail.com>**20070430171216
It wasn't a good idea to disable it
]
[Make GHCi's banner fit in a standard 80-column terminal
Ian Lynagh <igloo at earth.li>**20070430151737]
[Make boot handle getting the libraries
Ian Lynagh <igloo at earth.li>**20070430113519]
[Handle unbuildable packages differently
Ian Lynagh <igloo at earth.li>**20070430111540
Now we require that configure fails, and use our own signalling rather
than Cabal's buildable field.
]
[Set rts/gmp/configure executable when booting
Ian Lynagh <igloo at earth.li>**20070430102553]
[Look for -q in the darcs flags as well as the darcs-all flags
Ian Lynagh <igloo at earth.li>**20070430101612]
[Put the darcs-all command parsing into main() so it can use @_
Ian Lynagh <igloo at earth.li>**20070429172734]
[Make darcs-all a perl script
Ian Lynagh <igloo at earth.li>**20070429140004
This fixes a problem where patches altering the darcs-all script break
on Windows as the file is open. The script is now also slightly nicer,
on balance.
]
[Don't enable the monomorphism warning by default
Ian Lynagh <igloo at earth.li>**20070429120625]
[outside of runStmt, if a breakpoint is hit then just print a message
Simon Marlow <simonmar at microsoft.com>**20070427153948]
[give the statements under evaluation in the ":show context" output
Simon Marlow <simonmar at microsoft.com>**20070427153852]
[break by function: make sure we get the correct file
Simon Marlow <simonmar at microsoft.com>**20070427144554
Sometimes parts of a source file come from different places due to
preprocessing, and the lines can overlap.
]
[Breakpoints: don't attempt to bind variables with unboxed types
Simon Marlow <simonmar at microsoft.com>**20070427142036]
[We shouldn't let-bind expressions with unlifted type
Simon Marlow <simonmar at microsoft.com>**20070427142013
Now I can single step through Happy-generated parsers
]
[add missing @ (see bug #1302)
Simon Marlow <simonmar at microsoft.com>**20070427122617]
[don't forget to clean the .bat files
Simon Marlow <simonmar at microsoft.com>**20070427121203
See bug #1295
]
[Basic heap profile support without -prof
Simon Marlow <simonmar at microsoft.com>**20070427120113
Now that constructor info tables contain the name of the constructor,
we can generate useful heap profiles without requiring the whole
program and libraries to be compiled with -prof. So now, "+RTS -hT"
generates a heap profile for any program, dividing the profile by
constructor. It wouldn't be hard to add support for grouping
constructors by module, or to restrict the profile to certain
constructors/modules/packages.
This means that for the first time we can get heap profiles for GHCi,
which was previously impossible because the byte-code
interpreter and linker don't work with -prof.
]
[add the constructor name field to the info table for RTS constructors
Simon Marlow <simonmar at microsoft.com>**20070427115635]
[restore the correct Unicode ellipsis character
Simon Marlow <simonmar at microsoft.com>**20070426213100
It looks like this was accidentally replaced with '?' in the patch
"HsSyn clean up for indexed types". (see bug #1294)
]
[Avoid segfault when ticky file argument is stderr
Tim Chevalier <chevalier at alum.wellesley.edu>**20070426191857
If you compiled a program with -ticky and ran it with:
./foo +RTS -rstderr -RTS
the result would be a segfault. This was because the RTS interprets stderr to
mean "use debugBelch to print out messages," and sets the ticky file pointer
to NULL as a result, but PrintTickyInfo (the function in Ticky.c that prints
out the ticky report) wasn't checking for NULL.
I changed PrintTickyInfo to check whether the ticky file pointer is NULL and
output to stderr if so.
Also removed an unused import from CodeOutput.lhs.
]
[Dont tidy up tyvars after :print type reconstruction
Pepe Iborra <mnislaih at gmail.com>**20070426163540
I introduced a bug yesterday when I changed the way tidying up was performed.
As a result of tidying, cvObtainTerm could be returning types
with regular tyvars inside, which never should.
But actually, it's better if we do not do the tidying up, in order to
keep the tyvar names from the environment.
New names will be introduced only when an existential is found, which
is not so common. In this case the user will see a funny name.
Is that really an issue?
]
[fix scoping issues with mdo (test dynbrk004)
Simon Marlow <simonmar at microsoft.com>**20070426151615]
[Formatting and minor changes in the ghci debugger section
Pepe Iborra <mnislaih at gmail.com>**20070426103051]
[Update an example on the ghci debugger section
Pepe Iborra <mnislaih at gmail.com>**20070426103014]
[We don't have -fdebugging anymore, and fine tuning is not really necessary now
Pepe Iborra <mnislaih at gmail.com>**20070426101853]
[New section on debugging lambdas in the ghci user guide
Pepe Iborra <mnislaih at gmail.com>**20070426093719]
[Unbreak the users_guide
Pepe Iborra <mnislaih at gmail.com>**20070426092342]
[:force is not unsupported anymore
Pepe Iborra <mnislaih at gmail.com>**20070426091109]
[Attach free variables rather than in-scope variables to breakpoints
Simon Marlow <simonmar at microsoft.com>**20070426101127
This speeds up the debugger quite a bit, we're now only about 30%
slower than ordinary GHCi, and still adding breakpoints to every
sub-expression. Also we now get to see the free variables in
recursive bindings, which wasn't working properly before.
]
[getRdrNamesInScope: return interactively-bound names too
Simon Marlow <simonmar at microsoft.com>**20070426083902
so completion can now complete names of local bindings
]
[unused import
Simon Marlow <simonmar at microsoft.com>**20070426083713]
[Give a better error message when we try to print a value of unknown type
Simon Marlow <simonmar at microsoft.com>**20070426083657
Stopped at ../Test3.hs:(1,0)-(2,30)
_result :: [a]
[../Test3.hs:(1,0)-(2,30)] *Main> _result
<interactive>:1:0:
Ambiguous type variable `a' in the constraint:
`Show a' arising from a use of `print' at <interactive>:1:0-6
Cannot resolve unkonwn runtime types: a
Use :print or :force to determine these types
]
[Drop newtypes before computing the refinement substitution after :print type reconstruction
Pepe Iborra <mnislaih at gmail.com>**20070425194048]
[fix :print reconstructing too many types in environment bindings
Pepe Iborra <mnislaih at gmail.com>**20070425170210
For more details, see test print019
]
[Fix some corner cases in :print after the recent changes
Pepe Iborra <mnislaih at gmail.com>**20070425162120]
[Update the users_guide regarding list notation in :print
Pepe Iborra <mnislaih at gmail.com>**20070425095829]
[Tidy types of free vars at a breakpoint
Simon Marlow <simonmar at microsoft.com>**20070425154235
Also share the code that extends the InteractiveContext between
tcRnStmt and GHC.extendEnvironment.
]
[the Unknown types aren't required now
Simon Marlow <simonmar at microsoft.com>**20070425145207]
[remember the type of _result
Simon Marlow <simonmar at microsoft.com>**20070425145025]
[force APs, AP_STACKs and ThunkSelectors in :force
Simon Marlow <simonmar at microsoft.com>**20070425142945]
[use Any as the HValue type, this should be a bit safer than forall a.a
Simon Marlow <simonmar at microsoft.com>**20070425142914]
[unused exports
Simon Marlow <simonmar at microsoft.com>**20070425132455]
[unused import
Simon Marlow <simonmar at microsoft.com>**20070425132433]
[refactor: move pprintClosureCommand out of the GHCi monad
Simon Marlow <simonmar at microsoft.com>**20070425131726
Strictly speaking most of pprintClosureCommand should be exported by
the GHC API, but this is a step in the right direction.
]
[Keep track of free type variables in the interactive bindings
Simon Marlow <simonmar at microsoft.com>**20070425130332
Now, the type checker won't attempt to generalise over the skolem
variables in the interactive bindings. If we end up trying to show
one of these types, there will be an unresolved predicate 'Show t'
which causes a type error (albeit a strange one, I'll fix that
later).
]
[Some tyvars were being introduced in the environment via the thunk bindings '_ti' in :print
Pepe Iborra <mnislaih at gmail.com>**20070424170446]
[When a type is refined after :print, propagate the substitution to all the interactive environment
Pepe Iborra <mnislaih at gmail.com>**20070424111926]
[convert type variables to TcTyVars, otherwise the typechecker gets confused
Simon Marlow <simonmar at microsoft.com>**20070424141847]
[DebuggerTys doesn't exist any more
Simon Marlow <simonmar at microsoft.com>**20070424141806]
[Breakpoints: get the names of the free variables right
Simon Marlow <simonmar at microsoft.com>**20070424113202
Previously we relied on the names of the Ids attached to a tick being
the same as the names of the original variables in the source code.
Sometimes this worked, sometimes it didn't because the simplifier
would inline away the Id. So now we do this properly and retain the
original OccNames from the source code for each breakpoint, and use
these to construct the new Ids when we stop.
Doing this involved moving the tracking of in-scope variables from the
desugarer to the coverage pass.
]
[We no longer instantiate tyvars to Unknown types in the :print mechanism
Pepe Iborra <mnislaih at gmail.com>**20070424102313
Instead, we keep the original tyvars.
The plan is to exploit type relationships among closures to recover more types.
]
[remove unused imports
Simon Marlow <simonmar at microsoft.com>**20070424111418]
[add comments
Simon Marlow <simonmar at microsoft.com>**20070424103125]
[Tweak darcs-all script
Ian Lynagh <igloo at earth.li>**20070425124620
If you got darcs by SSH without specifying a username then the script
would break.
]
[Only haddock a package if it is buildable; spotted by Claus Reinke
Ian Lynagh <igloo at earth.li>**20070425111039]
[Generating synonym instance representation tycons
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20070425091646
- Type synonym instances are turned into representation synonym tycons
- They are entered into the pool of family instances (FamInst environments)
in the same way as data/newtype instances
- Still missing is writing the parent tycon information into ifaces and
various well-formedness checks.
]
[Add -fwarn-monomorphism-restriction (on by default) to warn when the MR is used
simonpj at microsoft.com**20070425101832
Users often trip up on the Dreaded Monomorphism Restriction. This
warning flag tells you when the MR springs into action.
Currently it's on by default, but we could change that.
]
[Retain inline-pragma information on unfoldings in interface files
simonpj at microsoft.com**20070425074924
WARNING: this patch changes interface-file formats slightly
you will need to recompile your libraries
Duncan Coutts wanted to export a function that has a NOINLNE pragma
in a local let-defintion. This works fine within a module, but was
not surviving across the interface-file serialisation.
http://www.haskell.org/pipermail/glasgow-haskell-users/2007-March/012171.html
Regardless of whether or not he's doing something sensible, it seems
reasonable to try to retain local-binder IdInfo across interface files.
This initial patch just retains inline-pragma info, on the grounds that
other IdInfo can be re-inferred at the inline site.
Interface files get a tiny bit bigger, but it seesm slight.
]
[Fix comments about data constructors
simonpj at microsoft.com**20070425074842]
[Give the inferred type when warning of a missing type-signature (Trac #1256)
simonpj at microsoft.com**20070425074719]
[Make ticky work, at least partly, on 64-bit machines
simonpj at microsoft.com**20070424133011
The ticky StgEntCounter structure was trying to be clever by using a
fixed-width 32-bit field for the registeredp value. But the code generators
are not up to handling structures packed tightly like this (on a 64-bit
architecture); result seg-fault on 64-bit.
Really there should be some complaint from the code generators, not simply
a seg fault.
Anyway I switched to using native words for StgEntCounter fields, and
now at least it works.
]
[Add WAY_debug_t_NAME and WAY_debug_t_HC_OPTS
simonpj at microsoft.com**20070424132918]
[Fix bug in boxySplitTyConApp
simonpj at microsoft.com**20070424124334
Merge to STABLE branch
This bug was discovered by Nicolas Frisby. It's an egregious missing guard
in boxySplitTyConApp.
Test is tcfail180
]
[revert previous fix until I can find out why it was wrong
Simon Marlow <simonmar at microsoft.com>**20070423130545
should fix recent GHCi problems in the HEAD
]
[Fixes to datacon wrappers for indexed data types
simonpj at microsoft.com**20070422213503
nominolo at gmail.com pointed out (Trac #1204) that indexed data types
aren't quite right. I investigated and found that the wrapper
functions for indexed data types, generated in MkId, are really very
confusing. In particular, we'd like these combinations to work
newtype + indexed data type
GADT + indexted data type
The wrapper situation gets a bit complicated!
I did a bit of refactoring, and improved matters, I think. I am not
certain that I have gotten it right yet, but I think it's better.
I'm committing it now becuase it's been on my non-backed-up laptop for
a month and I want to get it into the repo. I don't think I've broken
anything, but I don't regard it as 'done'.
]
[Part 2 of: Fix corner case of useless constraint in SPECIALISE pragma
simonpj at microsoft.com**20070422213223
MERGE TO STABLE
I forgot to include this in the previous patch and Darcs
crashes if I try 'amend-record' or 'unrecord' because I
have a partial repo. Sigh.
]
[Fix corner case of useless constraint in SPECIALISE pragma
simonpj at microsoft.com**20070422212911
MERGE TO STABLE
This patch fixes Trac #1287.
The problem is described in Note [Unused spec binders] in DsBinds.
At the same time I realised that the error messages in DsBinds.dsPrag
were being given the location of the *binding* not the *pragma*.
So I've fixed that too.
]
[Warning police
simonpj at microsoft.com**20070422211937]
[Put the default value for -dppr-user-length in the manual
simonpj at microsoft.com**20070422211442
MERGE TO STABLE
Incidentally, this flag should probably be renamed -dppr-user-depth
]
[Improve depth-cutoff for printing HsSyn in error messages
simonpj at microsoft.com**20070422211049
MERGE TO STABLE
The "user style" in Outputable allows us to elide large expressions
when printing HsSyn, printing "..." instead. This is done by calling
Outputable.pprDeeper.
But there was no mechanism for trimming very long lists, which
occur when using do-notation or explicit lists. This patch fixes
the problem, by adding Outputable.pprDeeperList.
I also made some of the pretty-printing in HsExpr rather more
vigorous about increasing the depth; in particular, pprParendExpr.
This should make debug prints shorter.
]
[Comments only (concerning rewrite rules)
simonpj at microsoft.com**20070422210614]
[Fix the GHC.Base.inline builtin rule
simonpj at microsoft.com**20070420211023
The BuiltIn rule for GHC.Base.inline wasn't working for two reasons:
a) inlineIdName wasn't in basicKnownKeyNames
b) The rule function wasn't taking into account the type argument
Thanks to Brian Alliet for spotting this bug.
]
[Haskell list syntax for the :print command
Pepe Iborra <mnislaih at gmail.com>**20070420170206
I did quite a bit of clean up in the Term pretty printer code too.
Support for infix constructors is still on the TODO list
]
[Outputable.cparen
Pepe Iborra <mnislaih at gmail.com>**20070420161828]
[wibbles
Pepe Iborra <mnislaih at gmail.com>**20070420161531]
[breakpoints: fix the in-scope set for 'where' clauses
Simon Marlow <simonmar at microsoft.com>**20070420145354]
[remove unused imports
Simon Marlow <simonmar at microsoft.com>**20070420105548]
[remove a ToDo
Simon Marlow <simonmar at microsoft.com>**20070420103523]
[new commnad :abandon, discards the current computation (used to be :break stop)
Simon Marlow <simonmar at microsoft.com>**20070420103516]
[split off :ctags and :etags support into a separate file
Simon Marlow <simonmar at microsoft.com>**20070420102536]
[export SrcSpan & utils from GHC
Simon Marlow <simonmar at microsoft.com>**20070420102511
]
[The prompt now shows the current breakpoint
Simon Marlow <simonmar at microsoft.com>**20070419152013
when stopped at a breakpoint we now get:
[Test3.hs:2:17-30] *Main>
when there is a stack of breakpoints, we get:
... [Test3.hs:2:17-30] *Main>
showing just the topmost one. Better suggestions are welcome, but
this seems not too bad to me.
]
[fix padding calculation in listAround
Simon Marlow <simonmar at microsoft.com>**20070419144005]
[improve the heuristics to pick the best breakpoint on a given line
Simon Marlow <simonmar at microsoft.com>**20070419143954]
[More debugger improvements
Simon Marlow <simonmar at microsoft.com>**20070419142358
":list" shows the code around the current breakpoint. Also it
highlights the current expression in bold (the bold/unbold codes are
hardwired to the ANSI codes right now, I'll provide a way to change
them later).
":set stop <cmd>" causes <cmd> to be run each time we stop at a
breakpoint. In particular, ":set stop :list" is particularly useful.
]
[we weren't adding breakpoints on parenthesised expressions
Simon Marlow <simonmar at microsoft.com>**20070419141905]
[Get the InteractiveContext right when stopped at a breakpoint
Simon Marlow <simonmar at microsoft.com>**20070419094909
we shouldn't be binding 'it' until the computation has actually finished.
]
[more layering cleanup: BreakArray should come from GHC
Simon Marlow <simonmar at microsoft.com>**20070419094806]
[update the help text
Simon Marlow <simonmar at microsoft.com>**20070418144201]
[add some DEBUG assertions
Pepe Iborra <mnislaih at gmail.com>**20070419115337]
[When possible, replace unification by matching in the RTTI steps
Pepe Iborra <mnislaih at gmail.com>**20070419115220
(RTTI is used in the :print command)
This gives a decent efficiency improvement
]
[:print command - Do not compute all the custom printers, only the first one matching
Pepe Iborra <mnislaih at gmail.com>**20070414173046]
[Add GhciMonad to the package.conf.in Modules list
Pepe Iborra <mnislaih at gmail.com>**20070330091918
When I factored the GhciMonad out of InteractiveUI.hs, I forgot to expose it in the ghc package
]
[Fix bat-script generation for MSys
simonpj at microsoft.com**20070418160519
The bat-script generation was using the wrong paths, in
ghc-inplace
ghc-pkg
hsc2hs
plus there was a double-backslah in the latter two which was wrong.
This patch fixes both. See "MSys Note 3" in compiler/Makefile
]
[Pass configure arguments to the library configure scripts
Ian Lynagh <igloo at earth.li>**20070418155522]
[Add support for breaking by function name: ':break foo'
Simon Marlow <simonmar at microsoft.com>**20070418142217
This is a bit hacky; it grabs the source location from the Name and
tries to set a breakpoint at that location, which in most cases
should be the breakpoint covering the whole definition.
]
[improve completion for debugger commands
Simon Marlow <simonmar at microsoft.com>**20070418142036]
[unused import
Simon Marlow <simonmar at microsoft.com>**20070418142008]
[Restore the interactive context when resuming a breakpoint
Simon Marlow <simonmar at microsoft.com>**20070418134116
So that we don't accumulate bindings from previous breakpoints, which
could lead to a space leak.
]
[remove dead code
Simon Marlow <simonmar at microsoft.com>**20070418134051]
[add ':show context' which lists the current stack of breakpoint contexts
Simon Marlow <simonmar at microsoft.com>**20070418133856]
[handle out-of-range lines in :break more gracefully
Simon Marlow <simonmar at microsoft.com>**20070418133824]
[small cleanup: showForUser -> printForUser, eliminate some duplicate code
Simon Marlow <simonmar at microsoft.com>**20070418124948]
[Check we have all the corelibs when we boot
Ian Lynagh <igloo at earth.li>**20070418124536]
[add missing module
Simon Marlow <simonmar at microsoft.com>**20070418124124]
[Various cleanups and improvements to the breakpoint support
Simon Marlow <simonmar at microsoft.com>**20070418114700
- move parts of the debugger implementation below the GHC API where
they belong. There is still more in Debugger that violates the
layering, hopefully I'll get to that later.
- instead of returning an IO action from runStmt for resuming,
return a ResumeHandle that is passed to GHC.resume.
- breakpoints now return [Name] which is displayed in the same
way as when a binding statement is executed.
- :load, :add, :reload now clear the active breakpoints and context
- :break gives a sensible error when used on a non-interpreted module
- export breakpoint-related types from GHC
- remove a bunch of layer-violating imports from InteractiveUI
- remove some more vestiges of the old breakpoint code (topLevel in
the GHCi state).
- remove TickTree and use a simple array instead, cached per module
]
[add module header
Simon Marlow <simonmar at microsoft.com>**20070418112511]
[remove extraneous "+1"; column numbers start at zero
Simon Marlow <simonmar at microsoft.com>**20070417143512]
[Add distclean target for libraries/ (== clean target)
Ian Lynagh <igloo at earth.li>**20070418113122]
[Distinguish between userError (i.e., deliberate failure) and other immediate and embedded exceptions for TH splices for trac #1265
Tyson Whitehead <twhitehe at uwo.ca>**20070410141709]
[Re-working of the breakpoint support
Simon Marlow <simonmar at microsoft.com>**20070417142458
This is the result of Bernie Pope's internship work at MSR Cambridge,
with some subsequent improvements by me. The main plan was to
(a) Reduce the overhead for breakpoints, so we could enable
the feature by default without incurrent a significant penalty
(b) Scatter more breakpoint sites throughout the code
Currently we can set a breakpoint on almost any subexpression, and the
overhead is around 1.5x slower than normal GHCi. I hope to be able to
get this down further and/or allow breakpoints to be turned off.
This patch also fixes up :print following the recent changes to
constructor info tables. (most of the :print tests now pass)
We now support single-stepping, which just enables all breakpoints.
:step <expr> executes <expr> with single-stepping turned on
:step single-steps from the current breakpoint
The mechanism is quite different to the previous implementation. We
share code with the HPC (haskell program coverage) implementation now.
The coverage pass annotates source code with "tick" locations which
are tracked by the coverage tool. In GHCi, each "tick" becomes a
potential breakpoint location.
Previously breakpoints were compiled into code that magically invoked
a nested instance of GHCi. Now, a breakpoint causes the current
thread to block and control is returned to GHCi.
See the wiki page for more details and the current ToDo list:
http://hackage.haskell.org/trac/ghc/wiki/NewGhciDebugger
]
[remove the ITBL_SIZE constants which were wrong, but fortunately unused
Simon Marlow <simonmar at microsoft.com>**20070417092559]
[con_desc should be an OFFSET_FIELD
Simon Marlow <simonmar at microsoft.com>**20070417092526]
[fix building with pre-6.4
Simon Marlow <simonmar at microsoft.com>**20070416082732]
[Change tabs to spaces in string literals
Ian Lynagh <igloo at earth.li>**20070416211342]
[Remove whitespace, mostly tabs, from string literals
Ian Lynagh <igloo at earth.li>**20070416191524]
[MERGE: another attempt at a workaround for #1110 (Vista bug)
Simon Marlow <simonmar at microsoft.com>**20070416142223
now instead of setting GCC_EXEC_PREFIX, we just add the appropriate
gcc-lib directory to the front of PATH before invoking gcc.
]
[MERGE: Fix a few uses of the wrong return convention for the scheduler
Simon Marlow <simonmar at microsoft.com>**20070416141902
We changed the convention a while ago so that BaseReg is returned to
the scheduler in R1, because BaseReg may change during the run of a
thread, e.g. during a foreign call. A few places got missed,
mostly for very rare events.
Should fix concprog001, although I'm not able to reliably reproduce
the failure.
]
[stm doesn't need to be a core-package
Ian Lynagh <igloo at earth.li>**20070416132421]
[Split objects when building libraries (if SplitObjs is YES)
Ian Lynagh <igloo at earth.li>**20070416132332]
[tab, verttab, formfeed, and CR are not allowed in strings
Simon Marlow <simonmar at microsoft.com>**20070416110433
See #1277
]
[Add missing special case for GHC.Prim
Simon Marlow <simonmar at microsoft.com>**20070416130457
The special cases for GHC.Prim are a bit fragile. We were relying on
(a) the base package to be already registered and (b) the base package
not to be hidden. These used to be true with the old library build
system, but aren't true now. I'm still not sure why we aren't seeing
failures at the moment, but this patch at least fixes the build with
'setup makefile'.
]
[Don't try to install docs stuff if NO_HADDOCK_DOCS=YES
Ian Lynagh <igloo at earth.li>**20070415162717]
[Implement ifBuildable
Ian Lynagh <igloo at earth.li>**20070415162315
ifBuildable only runs a command it is given if the library in . either
must be built (core-package - readline) or is buildable.
]
[make opt_HiVersion an Integer instead of Int to prevent overflow
wolfgang.thaller at gmx.net**20070414214027
When a snapshot version number is included, opt_HiVersion tends to exceed the range of a 32bit Int.
MERGE TO STABLE
]
[Allow ProjectTags to be specified in mk/build.mk
Ian Lynagh <igloo at earth.li>**20070413230555
ProjectTags is expected to be of the form -tag1-tag2 (i.e. the same as
Cabal tags). These are appended to the GHC version number.
]
[Fix a typo related to i386 PIC code generation
wolfgang.thaller at gmx.net**20070412214701
A recent patch accidentally had x86_TARGET_ARCH instead of i386_TARGET_ARCH.
]
[Darwin/x86_64 linker support
wolfgang.thaller at gmx.net**20070412214515
Initial support for loading x86_64 Mach-O files
]
[autoreconf -> sh boot
Ian Lynagh <igloo at earth.li>**20070412223636]
[Darwin/i386 NCG: fix assembly syntax in symbol stubs
wolfgang.thaller at gmx.net**20070412215313
In i386 position-independent symbol stubs, the NCG used to print
jmp %edx
instead of
jmp *%edx
Apple's assembler used to silently accept this, but has recently started to print warnings about it.
MERGE TO STABLE.
]
[Darwin Linker: Do not add local symbols to lochash
wolfgang.thaller at gmx.net**20070412211712
... so that GHCi doesn't complain about duplicate symbols when two C modules define the same static variable.
MERGE TO STABLE.
]
[Handle Weak Definitions in the Darwin Linker
wolfgang.thaller at gmx.net**20070412210155
The __i686.get_pc_thunk symbols generated by gcc's PIC code generator are weak definitions that appear in every object file, so we need to deal with them.
MERGE TO STABLE.
]
[Check boot seems to have been run before we let make proceed
Ian Lynagh <igloo at earth.li>**20070412223014]
[wibble to prep-bin-dist-mingw target
Simon Marlow <simonmar at microsoft.com>**20070412132115]
[tidy up the binary-dist targets a bit more
Simon Marlow <simonmar at microsoft.com>**20070412131702]
[further tweak the comments
Simon Marlow <simonmar at microsoft.com>**20070411145736]
[fix comment
Simon Marlow <simonmar at microsoft.com>**20070411145155]
[do the right thing by default with a current mingw
Simon Marlow <simonmar at microsoft.com>**20070411144825
and hopefully be a bit cleverer about finding things automatically.
]
[MERGE: add prep-bin-dist-mingw to binary-dist target, and add a separate target for
Simon Marlow <simonmar at microsoft.com>**20070412131327
publish-binary-dist
]
[MERGE: fixes to prep-bin-dist-mingw, and add separate rule to tar the bindist
Simon Marlow <simonmar at microsoft.com>**20070412131012]
[call prep-bin-dist-mingw as part of binary-dist, before we make the tarball
Simon Marlow <simonmar at microsoft.com>**20070411145235]
[Remove redundant import
Ian Lynagh <igloo at earth.li>**20070411213833]
[Rationalise GhcMode, HscTarget and GhcLink
Simon Marlow <simonmar at microsoft.com>**20070411101802
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.
]
[Use "$@" rather than $* when calling things in darcs-all
Ian Lynagh <igloo at earth.li>**20070411012258]
[Build library Setup.hs's with -Wall
Ian Lynagh <igloo at earth.li>**20070411002516]
[parsec, regex-base, regex-compat, regex-posix are no longer core-packages
Ian Lynagh <igloo at earth.li>**20070410220306]
[Replace genprimopcode's parsec parser with an alex+happy parser
Ian Lynagh <igloo at earth.li>**20070410220015
This use was the only thing keeping parsec in core-packages, and
we already have a dependency on alex+happy anyway.
]
[Don't use regexps in the GHC sources
Ian Lynagh <igloo at earth.li>**20070410215647
3 small regexps were responsible for pulling 3 packages into core-packages.
The new code should also do a better job of hiding
"call-clobbered register used" warnings.
]
[Use a boot script instead of having autoreconf recurse
Ian Lynagh <igloo at earth.li>**20070410215252
It used to be the case that
autoreconf
in the root would also autoreconf in any libraries that need it, and
./configure
in the root would also configure all the libraries.
However, cabal now configures the libraries, so they were getting
configured twice.
Thus now a small shellscript, boot, autoreconfs the root and all libraries
that need it, and ./configure in the root doesn't configure the libraries.
]
[Tweak AC_MSG_RESULTs
Ian Lynagh <igloo at earth.li>**20070409135734]
[Allow the version date to be overridden with VERSION_DATE
Ian Lynagh <igloo at earth.li>**20070409134640]
[Use cp -R rather than cp -a for portability reasons
Ian Lynagh <igloo at earth.li>**20070406190459]
[Fixes for building the libraries with cabal on Windows
Ian Lynagh <igloo at earth.li>**20070406151822
* configure can be told where ld is
* make an hsc2hs-inplace.bat
* tell Setup configure about foo.bar rather than foo on Windows
* tell Setup configure to pass a --with-cc=$(CC) argument to ./configure
]
[Fix external core syntax (though not full compilation)
Aaron Tomb <atomb at soe.ucsc.edu>**20061113230132
This patch updates the External Core creator, pretty-printer, and parser to
agree on a concrete syntax for External Core, including the constructs
required by the change to System FC. Code to create valid ASTs from External
Core files will come later, as will bits for renaming, typechecking, and
desugaring.
]
[Remove code that is dead, as we require __GLASGOW_HASKELL__ >= 504
Ian Lynagh <igloo at earth.li>**20070406001137]
[Don't break when asked to install-docs
Ian Lynagh <igloo at earth.li>**20070316170003
(we don't actually do anything useful either, because Cabal doesn't have
an install-docs option).
]
[Add a comment
Ian Lynagh <igloo at earth.li>**20070316165957]
[Make building binary dists work with cabalised libraries
Ian Lynagh <igloo at earth.li>**20070310012558]
[Build the libraries with cabal
Ian Lynagh <igloo at earth.li>**20070308163247]
[fix adjustor generation on ia64 (test case ffi009)
red5_2 at hotmail.com**20070401163132
Some fixes to adjustor functions. The 8-byte address returned by the
allocator is adjusted to be aligned to 16-byte boundaries. Fixed a typo
in inserting an immediate address into an instruction.
This fixes the calls to 5-argument and 6-argument functions in ffi009.
Some functions still break. I suspect it's related to passing arguments on
the stack.
]
[save two more FP registers on ia64
red5_2 at hotmail.com**20070327041811
Save/restore two more registers in StgCRun(). The extra
registers are used by ffi009.hs, when compiling with gcc 4.1.2.
]
[add a safety net to avoid generating bogus code
Simon Marlow <simonmar at microsoft.com>**20070404155001]
[add comments about ticky RTS ways
Simon Marlow <simonmar at microsoft.com>**20070404141013]
[slight doc wibble for the -r flag
Simon Marlow <simonmar at microsoft.com>**20070404140805]
[MERGE: Fix bug exposed by conc052.
Simon Marlow <simonmar at microsoft.com>**20070404103027
A thread that was blocked on a blackhole but can now be woken up could
possibly be treated as unreachable by the GC, and sent the
NonTermination exception.
This can give rise to spurious <<loop>>s in concurrent programs, so
it's a good one to fix.
]
[HANDLE --> (void *), we can't rely on having included windows.h here
Simon Marlow <simonmar at microsoft.com>**20070404084018
HANDLE is defined to be (void *) anyway, so this shouldn't hurt
]
[Fix C/Haskell type mismatches
Ian Lynagh <igloo at earth.li>**20070404003425]
[Fix typo
Ian Lynagh <igloo at earth.li>**20070404000347]
[Fix C/Haskell type mismatches
Ian Lynagh <igloo at earth.li>**20070403195324]
[Make type-tidying work for coercion variables
simonpj at microsoft.com**20070402073835
When tidying a TyVar binder, we must tidy its kind if it's a coercion
variable! I had forgotten to do this, which is a serious bug. As a
result some more complicated programs were getting a Lint error when
reading in interface files. Score one for Core Lint!
]
[Make error message output order consistent
Ian Lynagh <igloo at earth.li>**20070401185741]
[Fix darcs-all to be usable with shells other than bash
Alec Berryman <alec at thened.net>**20070306173011]
[Fixed desugaring of parallel array comprehensions
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20070402082424
** MERGE into 6.6.1 **
]
[The ru_local field of a CoreRule is False for implicit Ids
simonpj at microsoft.com**20070330144344
MERGE to 6.6.1
For class-ops, record selectors, data constructors, we want the ru_local
field of the Rule to be False. We do not attach the rule to the binding
for the Id, because there simply isn't a binding until the code gen stage.
(NB: the ru_local field is different to the orphan-hood of the rule.)
This fixes a bug that meant that RULES on class ops were never exported.
]
[Match the type of an Id during rule matching
simonpj at microsoft.com**20070330140033
Please MERGE to 6.6.1
Consider this RULE
forall (c::Char->Int) (x::Char).
f (c x) = "RULE FIRED"
Well, this should only match on arguments of the specified type
But we simply weren't checking this condition before. Now we are.
Test is simplrun008
]
[Add filepath library
Ian Lynagh <igloo at earth.li>**20070328235154]
[Fix the type of wgencat
Ian Lynagh <igloo at earth.li>**20070329164238]
[Document that ghci now adds () to the start of the type defaulting list
Ian Lynagh <igloo at earth.li>**20070329141631]
[Refactoring in HscMain.lhs
Lemmih <lemmih at gmail.com>**20070328224742
I realized that compiling many files is just like compiling a single file
several times. This does sound a bit stupid and I wonder why I didn't
catch it before.
]
[Typo in comment.
Lemmih <lemmih at gmail.com>**20070328220109]
[remove old library doc link (#1098), and point to HackageDB
Simon Marlow <simonmar at microsoft.com>**20070328102938]
[Make GHC main program depend on the libHSghc_dyn when GhcBuildDylibs==YES
wolfgang.thaller at gmx.net**20070327210122
When building a dynamic GHC, we obviously want to build the dynamic library
libHSghc_dyn.[so|dylib] before building the compiler executable.
MERGE TO STABLE
]
[Use a sensible set of compiler options for building dynamic libraries on Mac OS X
wolfgang.thaller at gmx.net**20070327201700
The official options to use for building a dylib on Mac OS X are now
-undefined dynamic_lookup -single_module -Wl,-macosx_version_min -Wl,10.3
... which should work on all arches (10.3 or later).
MERGE TO STABLE
]
[make GHCi use base:Prelude, not just Prelude
Simon Marlow <simonmar at microsoft.com>**20070327154554
The module that GHCi uses for its default scope should be exactly
base:Prelude, not whatever Prelude is found on the search path.
]
[more improvements for #1119
Simon Marlow <simonmar at microsoft.com>**20070327153723
When GHCi compiles its code framgents for setting buffering, it wants
to refer to base:System.IO rather than whatever System.IO is on the
search path, unfortunately there's no way to do this in source code,
so to hack around it we set the search path to empty before compiling
these expressions (not forgetting to flush the finder cache
afterward).
]
[partial fix for #1119
Simon Marlow <simonmar at microsoft.com>**20070327152215
Unless we're in one-shot mode, emit an error if we attempt to
demand-load interfaces for home modules. This can only happen in one
way (that I'm aware of): typing a qualified name at the GHCi prompt
that refers to a module that isn't loaded. Previously you got a
cryptic message about not finding an interface file, now you get:
Prelude> Foo.a
<interactive>:1:0:
attempting to use module `Foo' (Foo.hs) which is not loaded
Of course you can still refer to package modules like this without
loading them explicitly, only home modules are affected, and the
behaviour is exactly the same as if you try to ':browse Foo' and
Foo isn't loaded.
]
[remove docs for unimplemented options
Simon Marlow <simonmar at microsoft.com>**20070326142728
-optdep--include-module and --optdep--exclude-directory were features
of the old mkdependHS script but weren't implemented when mkdependHS
was merged into GHC.
]
[Add comments about the -include-prelude flag for ghc -M
simonpj at microsoft.com**20070327113612]
[Remove dead code from rnExpr (Var v); seems to be a leftover from some breakpoint stuff
simonpj at microsoft.com**20070323122354]
[move "boot :: all" after the include of target.mk to fix #1095
Simon Marlow <simonmar at microsoft.com>**20070326155949]
[add missing progress message
Simon Marlow <simonmar at microsoft.com>**20070326155233]
[Emit a decent error message when there is a decl-splice inside a decl-bracket
simonpj at microsoft.com**20070323111912
This fixes Trac #1065. The fix is just to emit a decent error message
rather than crash. The situation is this:
f x = ... [d| $(..stuff..);
f x = v :: T |] ...
TH wants to rename and typecheck the bracket; but it can't run the
nested splice yet. That seems hard, because we know nothing about v, T,
which are, presumably bound by the splice.
The original TH paper says this isn't allowed, and now it's checked for
properly (in the parser, in fact) rather than causing a crash. In the
fullness of time we might want to do something more flexible, but not now.
]
[Wibble fixing overlapped pattern
simonpj at microsoft.com**20070323111850]
[Tidy up refactoring only
simonpj at microsoft.com**20070323111821]
[Documentation for --install-signal-handlers=<yes|no>
Ian Lynagh <igloo at earth.li>**20070322184607]
[Add an --install-signal-handlers=<yes|no> RTS flag; fixes trac #804
Ian Lynagh <igloo at earth.li>**20070322182900]
[Make a Functor (IOEnv m) instance so it satisfies the new Quasi requirements
Ian Lynagh <igloo at earth.li>**20070322170114]
[Warning police: Removed catch-all case which was overlapped
sven.panne at aedion.de**20070322161040]
[Add -ddump-mod-cycles to -M behaviour
simonpj at microsoft.com**20070322122859
This patch adds a flag -ddump-mod-cycles to the "ghc -M" dependency analyser.
The effect of
ghc -M -ddump-mod-cycles
is to dump a list of cycles foud in the module graph. The display is
trimmed so that only dependencies within the cycle are shown; and the
list of modules in a cycle is itself sorted into dependency order, so that
it is easy to track the chain of dependencies.
Open question: should the flag be "-ddump-mod-cycles" or "-optdep-dump-mod-cycles"? For this reason I have not yet added to the documentation.
]
[Improve documentation of instances
simonpj at microsoft.com**20070322110718]
[Fix checkHiBootIface for instances declared in hs-boot files
simonpj at microsoft.com**20070321140424
Hs-boot files can contain instance declarations, but Duncan used this feature
for the first time today, and it didn't quite work. I'm not sure whether
it worked before; anyway it does now.
The point is that the hs-boot file advertises an instance for, say, Num Int,
with the arbitrary name $fx1. The main module declares Num Int, and gives
it the name, say, $f3. So we need to generate a declaration
$fx1 = $f3
to make it all line up. And (this is the bit that was wrong) we need
to make that new binding visible to imported unfoldings that mention
$fx1.
]
[mangler and runtime updates for gcc 4 on ia64
red5_2 at hotmail.com**20070318033132
Gcc 4 is doing more clever optimizations than earlier gccs.
These changes let ghc compile and run on ia64 with gcc 4.0.3.
Register stack frames are enlarged so that all functions use the
same size stack frame.
The code to mangle tail calls has been cleaned up and made more
general.
Additional floating-point and special-purpose registers used by
GCC are saved upon entering the STG runtime.
More general handling of NOP instructions.
Handling of functions with multiple epilogues or no epilogue.
]
[ia64 tailcall fix
red5_2 at hotmail.com**20070317025529
Tail-calls now branch to the end of the function after the call. This
stops gcc from trying to move instructions into the space immediately
after the call, which confuses the mangler.
]
[Remove bogus export from TcSplice.lhs-boot
simonpj at microsoft.com**20070321112057]
[Wibble to GHCi part of TcRnDriver
simonpj at microsoft.com**20070321111639]
[Yet another wibble to checkHiBootIface; it's trickier than it looks!
simonpj at microsoft.com**20070321093733]
[Improve pretty-printing for IfaceConDecl
simonpj at microsoft.com**20070321093611]
[Remove redundant exports from a hs-boot file
simonpj at microsoft.com**20070321093525]
[Further wibbles to checkBootIface (fixed HEAD build)
simonpj at microsoft.com**20070320154126]
[Use explict layout (fixes breakage when compiling TcSimplify)
simonpj at microsoft.com**20070319151926]
[Fix typo "lazy y x" -> "lazy y"
Ian Lynagh <igloo at earth.li>**20070317004003]
[Desugar applications of 'seq' specially; fix Trac #1031
simonpj at microsoft.com**20070316151712
Merge to 6.6 branch. Test case is dsrun014.
Note [Desugaring seq] cf Trac #1031
~~~~~~~~~~~~~~~~~~~~~
f x y = x `seq` (y `seq` (# x,y #))
The [CoreSyn let/app invariant] means that, other things being equal, because
the argument to the outer 'seq' has an unlifted type, we'll use call-by-value thus:
f x y = case (y `seq` (# x,y #)) of v -> x `seq` v
But that is bad for two reasons:
(a) we now evaluate y before x, and
(b) we can't bind v to an unboxed pair
Seq is very, very special! So we recognise it right here, and desugar to
case x of _ -> case y of _ -> (# x,y #)
The special case would be valid for all calls to 'seq', but it's only *necessary*
for ones whose second argument has an unlifted type. So we only catch the latter
case here, to avoid unnecessary tests.
]
[Improve error messages for 'deriving' clauses
simonpj at microsoft.com**20070316142824
This patch improves the misleading error message reported in Trac #1133.
Please merge the patch to the 6.6.1 branch.
]
[Refactor TcRnDriver, and check exports on hi-boot files
simonpj at microsoft.com**20070316133850
This patch refactors TcRnDriver to make the top-level structure
easier to understand.
The change was driven by Trac #924, and this patch fixes that bug.
When comparing a module against its hs-boot file, we must ensure that
the module exports everything that the hs-boot file exports.
]
[Comment out debug traces
simonpj at microsoft.com**20070316133822]
[Use update-alternatives for handling generic tool names
sven.panne at aedion.de**20070315152823
ATTENTION: Packagers should read the following stuff carefully!
GHC, Hugs and nhc come with various tools like runhaskell or hsc2hs. On the
one hand this is quite handy, avoiding lots of tiny native packages, but OTOH
this leads to a few problems:
* The tools are not always identical in functionality.
* The tools fight for a global generic name like "/usr/bin/runhaskell".
These problems are not new and not unique to Haskell implementations, so for
*nix-based system there is a tool called update-alternatives which handles
those cases. The idea is as follows:
* Each program/man page/etc. installs itself with a very specific name
like /usr/bin/hsc2hs-ghc or /usr/share/man/man1/lua5.1.1.gz, so nothing
clashes.
* The (un-)installation scripts call update-alternatives to notify the
system about new alternatives for a generic tool/manpage/etc.
* Alternatives can be grouped together ("link groups"), so e.g. switching
from Sun's Java to Kaffe switches compiler, JRE, manpages etc. together.
Alas, this doesn't work well with the Haskell implementations yet,
because they come with different sets of tools (in addition to runFOO):
GHC: hsc2hs
Hugs: hsc2hs, cpphs
nhc: cpphs
Either these tools should be disentangled fromt the Haskell
implementations or all implementations should offer the same set.
Opinions and recommendations on this topic are highly welcome.
* This mechanism can be used to easily switch between several versions of
the same implementation, too, but we are not yet fully prepared for that.
As a first step, GHC now installs hsc2hs as 'hsc2hs-ghc' and does *not*
install runhaskell directly anymore, only runghc. hsc2hs and runhaskell are
created via update-alternatives now. What is currently missing is a mechanism
for platforms like Windows and probably Mac OS X.
]
[Make the type-defaulting in GHCi use () as the first default type
simonpj at microsoft.com**20070315142812
See Trac #1200
This is a somewhat experimental fix. I'm not sure we want it in 6.6.1
The idea is explained in Note [Default unitTy] in TcSimplify. In
interative mode (or with -fextended-default-rules) we add () as the
first type we try when defaulting. This has very little real impact,
except in the following case. Consider:
Text.Printf.printf "hello"
This has type (forall a. IO a); it prints "hello", and returns
'undefined'. We don't want the GHCi repl loop to try to print that
'undefined'. The neatest thing is to default the 'a' to (), rather
than to Integer (which is what would otherwise happen; and then GHCi
doesn't attempt to print the (). So in interactive mode, we add () to
the list of defaulting types.
]
[Added support for parallel builds
sven.panne at aedion.de**20070315122457
With this patch, one can define the degree of build parallelism via a 'jobs'
rpm variable. A comfortable way to use this is having a ~/.rpmmacros file with
a line like:
%jobs 2
Alternatively, one could use a '--define "jobs 2"' command line flag for
rpmbuild. On a Core 2 Duo using 2 jobs brings down the time for a full build
including extralibs from 36m to 27m. If 'jobs' is not defined, a normal
sequential build is done, following the usual conventions on e.g. openSUSE.
]
[Wibble to type-error-message improvement
simonpj at microsoft.com**20070314164850]
[Improve error messages slightly, saying "a1...an" instead of "a b c"
simonpj at microsoft.com**20070314162906]
[Tweak hasktags to cope with abc::def correctly
Ian Lynagh <igloo at earth.li>**20070314160102
Patch from Marc Weber in
http://www.haskell.org/pipermail/glasgow-haskell-users/2007-February/011998.html
]
[Unbreak Haddock markup
sven.panne at aedion.de**20070314151517]
[Warning police: Avoid name shadowing
sven.panne at aedion.de**20070314140434]
[Handle primitive types and pseudo ops when generating LaTeX
sven.panne at aedion.de**20070314134328]
[Warning police: Replace patter matching failures by something more informative
sven.panne at aedion.de**20070314134044]
[Added LaTeX commands for primitive types and pseudo ops
sven.panne at aedion.de**20070314132703]
[Fixed LaTeX markup
sven.panne at aedion.de**20070314132521]
[Warning police: Don't rely on defaulting
sven.panne at aedion.de**20070314123608]
[Warning police: Removed "Defined but not used" warnings
sven.panne at aedion.de**20070314123021]
[Warning police: Added type signatures
sven.panne at aedion.de**20070314122316]
[Use -Wall for compilation of genprimopcode
sven.panne at aedion.de**20070314122233]
[Improve typechecker error messages; see Trac #1221
simonpj at microsoft.com**20070314121410]
[Fix the way configure sets the ghc_ge_* variables
Ian Lynagh <igloo at earth.li>**20070313220545]
[cache the values of ghc_ge_XXX at configure-time
Simon Marlow <simonmar at microsoft.com>**20070313160008
This avoids recomputing them via $(shell) each time make expands one
of these variables, which is very expensive (0.3s or so) on Windows.
]
[Update the wired-in name for Data.String.IsString
Brian Alliet <bja8464 at cs.rit.edu>**20070314052807]
[Add helpful cross-references
simonpj at microsoft.com**20070313162254]
[fix #1200: don't evaluate the result of main
Simon Marlow <simonmar at microsoft.com>**20070313144614]
[Fix a bug in the liveness analysis
Simon Marlow <simonmar at microsoft.com>**20070123104025
We were being overly conservative, registers that were live only at a
branch target were not recorded as being dead in the branch-not-taken
code.
]
[Be a bit more verbose about what's happening when recursively making in subdirs
Ian Lynagh <igloo at earth.li>**20070312105053]
[Have configure take arguments telling it where gmp is; fixes trac #957
Ian Lynagh <igloo at earth.li>**20070311175025]
[Avoid duplication in the binary-dist rules for docs
Ian Lynagh <igloo at earth.li>**20070309174825
Rather than building complex sh stuff and echoing what we're doing
ourselves, use make rules to do the looping and let make print things
out.
]
[Remove duplication in binary dist rules
Ian Lynagh <igloo at earth.li>**20070309174307
Rather than building complex sh stuff and echoing what we're doing
ourselves, use make rules to do the looping and let make print things
out.
]
[Make constructor names in info tables position independent
wolfgang.thaller at gmx.net**20070308020503
Info tables, like everything else in the text section, MUST NOT contain
pointers. A pointer is, by definition, position dependent and is therefore
fundamentally incompatible with generating position independent code.
Therefore, we have to store an offset from the info label to the string
instead of the pointer, just as we already did for other things referred
to by the info table (SRTs, large bitmaps, etc.)
]
[when invoking gcc, instead of the -B<dir> flag, use GCC_EXEC_PREFIX
Simon Marlow <simonmar at microsoft.com>**20070308154653
should hopefully fix/workaround #1110, but I haven't had a chance to
test it yet.
]
[small cleanups
Simon Marlow <simonmar at microsoft.com>**20070308134543]
[refactor: use do-notation rather than `thenBc`-style
Simon Marlow <simonmar at microsoft.com>**20070308110619]
[add missing %ENTRY_CODE()
Simon Marlow <simonmar at microsoft.com>**20070308101921
fixes unreg way in HEAD
]
[add noDuplicatezh_fast to symbol table
Simon Marlow <simonmar at microsoft.com>**20070308095717]
[add declaration for noDuplicatezh_fast
Simon Marlow <simonmar at microsoft.com>**20070307085648]
[Remove outdated libraries/doc/libraries.xml and libraries/doc/libtable.xml
Ian Lynagh <igloo at earth.li>**20070306152654]
[add noDuplicate#
Simon Marlow <simonmar at microsoft.com>**20070306143112
This primop ensures that the current computation is not being
duplicated, by calling threadPaused(). The idea is to use it inside
unsafePerformIO/unsafeInterleaveIO (see #986).
]
[THREADED_RTS: use cas() when claiming thunks
Simon Marlow <simonmar at microsoft.com>**20070306142732
I guess I forgot to do this the first time around; the upshot is that
there could be some uncaught duplication of work on a multiprocessor
(but unlikely).
]
[workerTaskStop(): set task->cap = NULL
Simon Marlow <simonmar at microsoft.com>**20070306140453
avoids an assertion failure in newBoundTask()
]
[disable -Wbad-function-cast; it's hard/impossible to work around
Simon Marlow <simonmar at microsoft.com>**20070306135543]
[remove vestiges of CCallable/CReturnable
Simon Marlow <simonmar at microsoft.com>**20070306123533]
[Remove references to the in-tree building guide from teh old commentary
Ian Lynagh <igloo at earth.li>**20070306144724]
[Remove old references to the in-tree building guide
Ian Lynagh <igloo at earth.li>**20070306144341]
[fix the timer_create() test
Simon Marlow <simonmar at microsoft.com>**20070306093525]
[Simple fix for Trac #1199 (pls merge to branch)
simonpj at microsoft.com**20070306065641]
[forkProcess: startTimer() in the child, because the timer will be reset
Simon Marlow <simonmar at microsoft.com>**20070305144550]
[better autoconfery for timer_create()
Simon Marlow <simonmar at microsoft.com>**20070305143643]
[Use Data.String rather than GHC.Base for IsString/fromString
Ian Lynagh <igloo at earth.li>**20070303145315]
[Use timer_create() for the interval timer, if available
Simon Marlow <simonmar at microsoft.com>**20070302113104
This lets the threaded RTS use SIGVTALRM rather than SIGALRM for its
interval timer signal, so the threaded and non-threaded RTS are
compatible. It unfortunately doesn't completely fix #850/#1156, for
that we really have to use a restartable sleep instead of usleep().
Also I cleaned up the timer API a little: instead of returning an
error value that ultimately gets ignored, we now report errors from
system calls and exit.
]
[further improvements to the x86/x86_64 NCG
Simon Marlow <simonmar at microsoft.com>**20070301130628]
[Fix typo in primops docs
Ian Lynagh <igloo at earth.li>**20070301130339]
[Do not go into an infinite loop when pretty-printer finds a negative indent (Trac #1176)
simonpj at microsoft.com**20070301114513]
[Use the most complex form of addressing modes on x86
Simon Marlow <simonmar at microsoft.com>**20070301112625
We had a pattern that matched (base+(index<<N)), but not
(base+(index<<N)+M).
]
[is64BitInteger: truncate to 64 bits before testing
Simon Marlow <simonmar at microsoft.com>**20070301112513
We weren't catching some literals that actually fit in 32 bits before,
because e.g. -1 was sometimes represented as 0xffffffffffffffff in CmmInt.
]
[Fix -keep-s-file with --make
Simon Marlow <simonmar at microsoft.com>**20070301095749]
[some more vectored return stuff to be removed
Simon Marlow <simonmar at microsoft.com>**20070301092250]
[Fix #839 (Generate documentation for built-in types and primitve operations)
Simon Marlow <simonmar at microsoft.com>**20070228163442
This patch was originally by dinko.tenev at gmail.com, but I re-recorded
it in order to add a better log message.
The effect of this patch is to add entries for primitive types in the
documentation: Int#, Char#, etc. and to document the built-in
identifiers (seq, lazy, inline, unsafeCoerce#).
]
[Fix #249 (-caf-all bugs)
Simon Marlow <simonmar at microsoft.com>**20070228155009
There were two bugs:
* we were generating the symbol name for the CAF
cost centre from the OccName, which isn't unique enough
in the case of system-generated non-external names
* :Main.main caused problems, because we were assuming that
every top-level CAF was from the current module.
]
[use -fforce-recomp when compiling Main.hs against the ghc package.
Simon Marlow <simonmar at microsoft.com>**20070228153304
This is necessary because GHC's recompilation checker doesn't check
across package boundaries.
]
[Remove vectored returns.
Simon Marlow <simonmar at microsoft.com>**20070228130714
We recently discovered that they aren't a win any more, and just cost
code size.
]
[Windows: the .hp file is <prog>.exe.hp
Simon Marlow <simonmar at microsoft.com>**20070228120319]
[Make let-matching work in Rules again
simonpj at microsoft.com**20070227231313
A RULE is supposed to match even if there is an intervening let:
RULE f (x:xs) = ....
target f (let x = thing in x:xs)
It's surprisingly tricky to get this right; in effect we are doing
let-floating on the fly. I managed to get it wrong before, or at least
be over-conservative. And in "fixing" that I got it wrong again in a
different way, which made it far too conservative. In particular, it
failed to match f (let x = y+y in let z=x+y in z:xs)
because the binder x was cloned and looked "locally-bound". See the
ever growing comments with the Let rule for details.
That patch reverts to the previous story, which is still a bit too
conservative, but not so egregiously so. Fixes Romans's problem.
]
[Fixes for the mangler on IA64
Ian Lynagh <igloo at earth.li>**20070227174542
From heatsink, in trac #1150.
]
[Remove the itbls field of BCO, put itbls in with the literals
Simon Marlow <simonmar at microsoft.com>**20070227134609
This is a simplification & minor optimisation for GHCi
]
[fix data con patch for 64-bit architectures
Simon Marlow <simonmar at microsoft.com>**20070227134358]
[Constructor names in info tables
bjpop at csse.unimelb.edu.au**20070220190731
This patch adds data constructor names into their info tables.
This is useful in the ghci debugger. It replaces the old scheme which
was based on tracking data con names in the linker.
]
[Doc typo
Ian Lynagh <igloo at earth.li>**20070227125731]
[Don't hardwire RELEASE into configure.ac
sven.panne at aedion.de**20070224180123
Previously one had to edit configure.ac to build a release version. This is
evil, so one can now specify this on the configure invocation line like:
RELEASE=YES ./configure
Note that non-released versions are still the default.
]
[Fix parsing of parallel array literals
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20070224061150]
[Tidy up typechecking for newtypes
simonpj at microsoft.com**20070223141032]
[pthread_key_delete wants the key itself, not a pointer to it
Ian Lynagh <igloo at earth.li>**20070223122312]
[Wibble
Pepe Iborra <mnislaih at gmail.com>**20070223102957]
[Moved argument position info of ATs into tycon rhs info
Manuel M T Chakravarty <chak at cse.unsw.edu.au>**20070223033848]
[Unbreak HEAD
Pepe Iborra <mnislaih at gmail.com>**20070222181201
My previous patch was creating problems with hs-boot files.
]
[Free thread local storage on shutdown
Ian Lynagh <igloo at earth.li>**20070222144306]
[upload documentation too
Simon Marlow <simonmar at microsoft.com>**20070222102823]
[refactoring
Simon Marlow <simonmar at microsoft.com>**20070222100349]
[refactoring only: remove unused code/imports
Simon Marlow <simonmar at microsoft.com>**20070111091944]
[Improving the performance of breakpoints up to 50% (by playing with laziness)
Pepe Iborra <mnislaih at gmail.com>**20070221185649
This patch performs several optimizations with the goal of minimizing the cost of building the arguments to breakpointJump:
- Group them all in a single tuple, to minimize closure creation in heap
- Wrap this with the GHC.Base.lazy combinator, to induce max laziness
- Remove as many literal strings as possible
* injecting a module-local CAF to store the module name and use that
* eliminating the package string (not needed).
]
[Fix the behaviour of :print with functions
Pepe Iborra <mnislaih at gmail.com>**20070221151117
It now outputs "<function>" instead of showing them as thunks
]
[Fix an incomplete pattern in the code for :print
Pepe Iborra <mnislaih at gmail.com>**20070221150942]
[Removed unnecessary code
Pepe Iborra <mnislaih at gmail.com>**20070219122134
The breakpointJump functions never show up in the code that the typechecker sees, as they are inserted by the desugarer later.
]
[Allow GADT syntax for newtypes
simonpj at microsoft.com**20070221170401
Fixes Trac #1154. Please merge.
Tests are tc225, and tcfail176.
]
[Import trimming
simonpj at microsoft.com**20070221165312]
[Deal more correctly with orphan instances
simonpj at microsoft.com**20070221163047
Conal Eliott (Trac #1145) exposed a nasty flaw in the way in which
orphan instances are computed, when there are functional dependencies
in the class. It took me some time to figure out what was going on,
and led to more refactoring.
Briefly:
* Elaborate comments about orphan-hood and versioning added to IfaceSyn
* The is_orph field vanishes from InstEnv.Instance
* Similarly ru_orph vanishes from CoreSyn.CoreRule
* Orphan-hood is computed in MkIface.instanceToIfaceInst, and
MkIface.coreRuleToIfaceRule
Elsewhere just tidying up.
]
[Remove dead code from FunDeps
simonpj at microsoft.com**20070221131340
I forgot to to this when refactoring some months ago!
]
[Fix a deriving bug, arising from recent refactoring
simonpj at microsoft.com**20070221124739
This one is a hangover from something I did a month or two ago, but
didn't get quite right. tcSimplifyDefault should not check for no-instances;
instead the checkValidInstance in TcDeriv does so.
Conal's DeepArrow needs this fix. Test is drv015.
]
[Fix defaulting for overloaded strings
simonpj at microsoft.com**20070221103645
This patch fixes the typechecking of the default declaration itself,
when overloaded strings are involved. It also documents the behaviour
in the user manual.
nofib/spectral/power should work again now!
]
[MERGE from 6.6: Windows fix for stdcall foreign-import-wrapper, fixes ffi012(ghci)
Simon Marlow <simonmar at microsoft.com>**20070221092950]
[Fix case-merge bug that was breaking the HEAD
simonpj at microsoft.com**20070221091123
My re-org of the case-merging transformation introduced a bug, which led
to incorrect code. This only showed up occasionally, but it generated
incorrect code for PprC.pprCastReg in the stage-2 compiler. As a result
the stage-2 compiler ran without crashing, but itself generated bogus C.
For a change, this is one that Core Lint couldn't find, so the trail was
a bit longer. The fix is easy (and commented).
]
[Fix obscure bug in reportDeprecations
simonpj at microsoft.com**20070220174714
Fixes Trac #1128
Please merge to STABLE
A rather obscure bug related to -fno-implicit-prelude.
See Note [Used names with interface not loaded] in RnNames.
Easily fixed, however. Test is rn051
]
[describe the Z-encoding for __stginit symbol names (addresses #1014)
Simon Marlow <simonmar at microsoft.com>**20070220132532]
[freeTaskManager: don't free Tasks that are still in use
Simon Marlow <simonmar at microsoft.com>**20070220095456
See conc059.
]
[Fix sleep delay for the non-threaded Windows RTS
Simon Marlow <simonmar at microsoft.com>**20070220090716
This is the Windows counterpart to "Make the non-threaded-RTS
threadDelay wait at least as long as asked"
]
[Signature type variables must not be instantiated with tycons
simonpj at microsoft.com**20070219175248
An egregious bug in the type checker meant that it was possible for a
"signature type variable" (a MetaTv of SigTv form) to be instantatiated
with a type-constructor application. This destroys the invariant for
SigTv.
The fix is easy; adding the predicate TcType.isTyConableTyVar
Fixes Trac #1153
]
[Fixed a bug with the :print command spotted by Bernie Pope.
Pepe Iborra <mnislaih at gmail.com>**20070216201052
Test ghci.debugger/scripts/print018 covers this
]
[Uniform user interface
Pepe Iborra <mnislaih at gmail.com>**20070216195424
Print
"Breakpoint set at Main:26:13"
instead of
"Breakpoint set at (26,13)"
]
[Taught :breakpoint add to guess the module name if not given
Pepe Iborra <mnislaih at gmail.com>**20070216193810
Now the user can say
> :break add 13
at the ghci prompt and the debugger will use the first top level module as the target for the breakpoint
]
[Fix left-bias in ghci tab-completion code
Judah Jacobson <judah.jacobson at gmail.com>**20070214034234]
[Fixed a bug in the datacon names extension in the dynamic linker
Pepe Iborra <mnislaih at gmail.com>**20070215181934
My code was doing unnecessary work when trying to get hold of all the BCOs in order to sniff the datacon names.
This involved calculating the transitive closure of a relation and was causing a huge performance slowdown in GHCi, as benchmarks uncovered. It turns out that this calculation was unnecessary.
]
[Modify the breakpoint desugaring to introduce more laziness
Pepe Iborra <mnislaih at gmail.com>**20070213203043
Benchmarks have shown that making the formation of the list of locals more lazy can improve performance of -fdebugging up to 50% in some cases
]
[When the pipeline just copies the file, prepend a LINE pragma
Simon Marlow <simonmar at microsoft.com>**20070215115852
For example, "ghc -E Foo.hs -o Foo.bar" just copies Foo.hs to
Foo.bar. This patch adds a LINE pragma to the beginning of Foo.bar so
that further processing can track the location of the original file.
The motiviation for this is bug #1044. When generating Haddock docs,
we preprocess the .hs to a .raw-hs, sometimes this doesn't involve any
actual preprocessing and in those cases we lose track of the original
filename.
]
[add a ToDo, reference bug #1147
Simon Marlow <simonmar at microsoft.com>**20070214144716]
[fix closure_sizeW_() for AP closures
Simon Marlow <simonmar at microsoft.com>**20070214120401
Since thunks grew an extra padding word in GHC 6.6, closure_sizeW()
has been wrong for AP closures because it assumed compatible layout
between PAPs and APs. One symptom is that the compacting GC would
crash if it encountered an AP. APs conly crop up in GHCi or
when using asynchronous exceptions.
Fixes #1010
]
[Fixing bad allocation of tix box breakpointing array.
andy at galois.com**20070213220203]
[Using RTS debug tracing support inside Hpc.c
andy at galois.com**20070213184402]
[Major improvement to SpecConstr
simonpj at microsoft.com**20070209173645
This patch improves the SpecConstr pass, by
a) making it work with join points
b) making it generate specialisations transitively
As part of it, SpecConstr now carries a substitution with it, which
runs over the whole program as it goes. This turned out to be
a big win; simplified the implementation quite a bit.
I have *disabled* the specialisation on lambdas; it's pretty fragile,
and sometimes generates more and more specialisations. Something to
come back to, perhaps.
I rejigged the flag-handling a bit. Now the specification of passes
in DynFlags is a bit nicer; see
- optLevelFlags top-level data structure
- runWhen function
- CoreDoPasses constructor
There are now command-line flags
-fspec-constr
-fliberate-case
-fspec-threshold=N
which do the obvious thing. -O2 switches on both spec-constr and liberate-case.
You can use -fno-liberate-case, -fno-spec-constr after -O2 to switch them off again.
The spec-threshold applies to both these transformations; default value 200 for now.
]
[Refactor the simplifier's treatment of case expressions
simonpj at microsoft.com**20070209172938
(NB: this patch could conceivably require some bits of the
following SpecConstr patch to compile cleanly. It's conceptually
independent, but I'm not 100% certain that I've included all
the necessary bits here.)
This patch cleans up the simplifier's handling of various
otimisations for case expressions, notably
- case elimination (discarding the case altogether)
- merging identical alternatives
- discarding impossible alternative
- merging nested cases
Previously this was partly handled before, and partly after,
simplifying the case alternatives. The trouble with that is
that the dead-ness information on the case binders gets munged
during simplification, and that turned out to mean that
case elmination essentially never happened -- stupid.
Now I've moved it all to before simplifying the alterntives.
In fact this reduces the amount of code, I think, and it's
certainly tidier. I don't think there is any loss.
]
[Ticky is an RTS-only way; also fix collateral damage to other ways
Simon Marlow <simonmar at microsoft.com>**20070209140818
The ticky static flag was being poked too early, which lead to
breakage in the -prof way amongst other things. I've installed some
sanity checking to make sure we catch this earlier if it happens again.
]
[Make it a warning, not an error, if the version date cannot be determined
Simon Marlow <simonmar at microsoft.com>**20070208151323
This happens when the build tree is a link-tree to the source tree,
because lndir will normally omit the _darcs directory.
]
[make VERSION a dependency of dist
Simon Marlow <simonmar at microsoft.com>**20070208121555]
[fix cut-and-pasto in code for binary-dist upload
Simon Marlow <simonmar at microsoft.com>**20070208120712]
[Fixed typo in devel1 flavor
Kirsten Chevalier <chevalier at alum.wellesley.edu>**20070207225957
Under GhcStage2HcOpts, "O" should be "-O"; fixed.
]
[Type reconstruction/RTTI: improve handling of newtypes
Pepe Iborra <mnislaih at gmail.com>**20070207205947
Newtypes have always been a problem because they are not there at runtime, but we need to take them into account.
Tests ghci.debugger/print011 and ghci.debugger/print012 cover this
]
[Optimize dynamic breakpoints for speed
Pepe Iborra <mnislaih at gmail.com>**20070207082110
Made a bit faster the test which gets done every time a running program hits a dynamic breakpoint. I moved the bounds checking inside a DEBUG pragma and replaced (IArray.!) for unsafeAt
]
[Teach darcs-all how to get testsuite and nofib
Ian Lynagh <igloo at earth.li>**20070207165344]
[Improved naming of generated HTML files by using nice IDs
sven.panne at aedion.de**20070207163404]
[Make the User's Guide DocBook XML 4.2 conformant again
sven.panne at aedion.de**20070207161927]
[update version hack to work on partial repositories
Simon Marlow <simonmar at microsoft.com>**20070207105929
Instead of asking for the last 100 patches, we just get the first 500
lines of output from darcs changes (ugh, better ideas welcome).
]
[Force recompilation on all -ddump flags
simonpj at microsoft.com**20070207100245]
[Force recompilation with -ddump-minimal-imports
simonpj at microsoft.com**20070207100053]
[Spelling fix
simonpj at microsoft.com**20070207095153]
[Fix bug in -ddump-minimal imports Trac #1025
simonpj at microsoft.com**20070207094945
The code for -ddump-minimal-imports was erroneously using loadSrcInterface,
which looks only for *exposed* modules. It should instead use loadSysInterface
which looks for all interfaces.
The fix is straightforward. MERGE to 6.6 branch.
]
[Update to manual section for ticky-ticky
Kirsten Chevalier <chevalier at alum.wellesley.edu>**20070207084527
I added a slightly more helpful remark in the profiling
section of the manual about how to use ticky-ticky.
]
[Lightweight ticky-ticky profiling
Kirsten Chevalier <chevalier at alum.wellesley.edu>**20070207081404
The following changes restore ticky-ticky profiling to functionality
from its formerly bit-rotted state. Sort of. (It got bit-rotted as part
of the switch to the C-- back-end.)
The way that ticky-ticky is supposed to work is documented in Section 5.7
of the GHC manual (though the manual doesn't mention that it hasn't worked
since sometime around 6.0, alas). Changes from this are as follows (which
I'll document on the wiki):
* In the past, you had to build all of the libraries with way=t in order to
use ticky-ticky, because it entailed a different closure layout. No longer.
You still need to do make way=t in rts/ in order to build the ticky RTS,
but you should now be able to mix ticky and non-ticky modules.
* Some of the counters that worked in the past aren't implemented yet.
I was originally just trying to get entry counts to work, so those should
be correct. The list of counters was never documented in the first place,
so I hope it's not too much of a disaster that some don't appear anymore.
Someday, someone (perhaps me) should document all the counters and what
they do. For now, all of the counters are either accurate (or at least as
accurate as they always were), zero, or missing from the ticky profiling
report altogether.
This hasn't been particularly well-tested, but these changes shouldn't
affect anything except when compiling with -fticky-ticky (famous last
words...)
Implementation details:
I got rid of StgTicky.h, which in the past had the macros and declarations
for all of the ticky counters. Now, those macros are defined in Cmm.h.
StgTicky.h was still there for inclusion in C code. Now, any remaining C
code simply cannot call the ticky macros -- or rather, they do call those
macros, but from the perspective of C code, they're defined as no-ops.
(This shouldn't be too big a problem.)
I added a new file TickyCounter.h that has all the declarations for ticky
counters, as well as dummy macros for use in C code. Someday, these
declarations should really be automatically generated, since they need
to be kept consistent with the macros defined in Cmm.h.
Other changes include getting rid of the header that was getting added to
closures before, and getting rid of various code having to do with eager
blackholing and permanent indirections (the changes under compiler/
and rts/Updates.*).
]
[Detect the snapshot version number using darcs
Simon Marlow <simonmar at microsoft.com>**20070206212536
For non-release builds, we want to append a date to the version number
(e.g. 6.7.20070206). Previously this was done by the nightly build
script, this new method figures out the snapshot version by querying
the darcs repository and finding the date of the most recent patch
(actually it finds the most recent of the last 100 patches, but that
should be good enough). This is done by the configure script.
To handle source distributions, we create a file VERSION in the
top-level directory that contains the version number, and ship this in
the source distribution. The configure script picks up the version
from this file if it doesn't see a _darcs directory.
]
[Check for escape when unifying forall-types
simonpj at microsoft.com**20070206165456
This egregious omission led to Trac #1128.
]
[Rename local variable (no semantic effect)
simonpj at microsoft.com**20070206122456]
[Comments and debug output
simonpj at microsoft.com**20070206122435]
[Improve rule-matching for let expressions
simonpj at microsoft.com**20070206122233]
[Do more wild-carding in SpecConstr; I'm not quite sure about this, but it does no harm
simonpj at microsoft.com**20070206121552]
[Fix a small bug when comparing patterns for equality
simonpj at microsoft.com**20070206121518]
[Expose rnInScopeSet from VarEnv
simonpj at microsoft.com**20070206120737]
[Don't use compat when compiling utils with stage1
Ian Lynagh <igloo at earth.li>**20070206003232]
[Fix syntax error
Ian Lynagh <igloo at earth.li>**20070205203125]
[fix memory leak in allocExec/freeExec (see bug #985)
Simon Marlow <simonmar at microsoft.com>**20070205102102]
[Implement the PushT rule from the FC paper
simonpj at microsoft.com**20070205174334]
[Improve handling of partial applications involving casts
simonpj at microsoft.com**20070205174058
This patch improves prepareRhs, so that it deals better with casts.
We want to deal well cases like this
v = (f e1 `cast` co) e2
Here we want to make e1,e2 trivial and get
x1 = e1; x2 = e2; v = (f x1 `cast` co) v2
This really happens in parser libraries, which wrap functions in newtypes.
]
[Float casts out of lambdas
simonpj at microsoft.com**20070205173544
See Note [Casts and lambdas] in SimplUtils. I found this transformation
when staring at some cast-heavy code generated by
Language.Haskell.Lexer.hs in the haskell-src library.
The basic transformation is this:
(\x. e `cast` g1) --> (\x.e) `cast` (tx -> g1)
where x:tx.
]
[Use exprIsCheap in floating, just as the simplifier does
simonpj at microsoft.com**20070205173456]
[Establish the CoreSyn let/app invariant
simonpj at microsoft.com**20070205173150
This patch clears up a long-standing wart. For some time it's been the
case that
the RHS of a non-recursive let can be unlifed iff
the RHS is ok-for-speculation
This patch extends the invariant to the argument of an App, and
establishes it by the smart constructors mkDsApp, mkDsApps in the desugarer.
Once established, it should be maintained by the optimiser.
This tides up some awkward cases, notably in exprIsHNF, and I think it
fixes a outright strictness bug in Simplify.prepareRhs.
]
[Improve simplification of coercions
simonpj at microsoft.com**20070205163324
At the moment GHC really does very little simplification of coercions.
This patch improves matters, but it's still not great, especially when
you have chains linked together with 'trans'.
I'm also concerned that I have not yet implemented the 'leftc' and 'rightc'
coercions we added to the paper.
But at least things are better than they were. In particular
g `trans` sym g
now cancels to give the identity.
]
[Move #ifdef __GLASGOW_HASKELL__ < 604 to cover the CSIDL definitions too
Simon Marlow <simonmar at microsoft.com>**20070205160229
Fixes bug exposed by compiling base w/ -fasm on Windows
]
[Make binary-dist tarballs automatically, and add support for uploading
Simon Marlow <simonmar at microsoft.com>**20070205144847
Moving functionality that was previously in the nightly build scripts
into the top-level Makefile, so it's easier to use from BuildBot.
]
[Semi-tagging optimisation
Simon Marlow <simonmar at microsoft.com>*-20070122114016
In the generated code for case-of-variable, test the tag of the
scrutinee closure and only enter if it is unevaluated. Also turn
*off* vectored returns.
]
[don't forget to remove html-docs as part of 'make clean'
Simon Marlow <simonmar at microsoft.com>**20070205140800]
[Simpler, more self-contained, "make dist"
Simon Marlow <simonmar at microsoft.com>**20070205140727
This version does all its work in a subdirectory (no more destructive
'make distclean' in the current build tree), and results in the exact
-src.tar.bz2 distributions that we will put up for download.
]
[optimisation: shortcut branches when possible (x86/x86_64 only for now)
mrchebas at gmail.com**20070122114201
This is only turned on with -O, and probably won't make much
difference at the moment, but it will be important for semi-tagging.
]
[Semi-tagging optimisation
Simon Marlow <simonmar at microsoft.com>**20070122114016
In the generated code for case-of-variable, test the tag of the
scrutinee closure and only enter if it is unevaluated. Also turn
*off* vectored returns.
]
[x86: disable assertion that conditionals are not on I8; they can be
mrchebas at gmail.com**20070119160501
]
[small debugging output cleanup
mrchebas at gmail.com**20070119150800]
[don't make jump tables for small switches (<= 4 branches)
mrchebas at gmail.com**20070119150749
Only affects -fasm: gcc makes its own decisions about jump tables
]
[Small optimisation for comparisons
mrchebas at gmail.com**20070119150433
Comparison of literal with narrowed/widened operand: perform
the comparison at a different width, as long as the literal is
within range. We only do this on x86/x86_64 at the moment, where
we have comparisons at different sizes available.
]
[Extension of testing script to parse PAPI results from GHC programs.
Alexey Rodriguez <mrchebas at gmail.com>**20061221115709]
[One more PAPI measurement, dropped precise cycle counting and replaced it with instructions.
Alexey Rodriguez <mrchebas at gmail.com>**20061221115615]
[TAG 2007-02-05
Ian Lynagh <igloo at earth.li>**20070205121210]
Patch bundle hash:
246b8bd436f6efd1f45018c8977f9b85a70b5b1e
More information about the Cvs-ghc
mailing list