simonpj@microsoft.com [Tue, 6 Feb 2007 12:15:52 +0000 (12:15 +0000)]
Do more wild-carding in SpecConstr; I'm not quite sure about this, but it does no harm
simonpj@microsoft.com [Tue, 6 Feb 2007 12:15:18 +0000 (12:15 +0000)]
Fix a small bug when comparing patterns for equality
simonpj@microsoft.com [Tue, 6 Feb 2007 12:07:37 +0000 (12:07 +0000)]
Expose rnInScopeSet from VarEnv
Ian Lynagh [Tue, 6 Feb 2007 00:32:32 +0000 (00:32 +0000)]
Don't use compat when compiling utils with stage1
Ian Lynagh [Mon, 5 Feb 2007 20:31:25 +0000 (20:31 +0000)]
Fix syntax error
Simon Marlow [Mon, 5 Feb 2007 10:21:02 +0000 (10:21 +0000)]
fix memory leak in allocExec/freeExec (see bug #985)
simonpj@microsoft.com [Mon, 5 Feb 2007 17:43:34 +0000 (17:43 +0000)]
Implement the PushT rule from the FC paper
simonpj@microsoft.com [Mon, 5 Feb 2007 17:40:58 +0000 (17:40 +0000)]
Improve handling of partial applications involving casts
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.
simonpj@microsoft.com [Mon, 5 Feb 2007 17:35:44 +0000 (17:35 +0000)]
Float casts out of lambdas
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.
simonpj@microsoft.com [Mon, 5 Feb 2007 17:34:56 +0000 (17:34 +0000)]
Use exprIsCheap in floating, just as the simplifier does
simonpj@microsoft.com [Mon, 5 Feb 2007 17:31:50 +0000 (17:31 +0000)]
Establish the CoreSyn let/app invariant
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.
simonpj@microsoft.com [Mon, 5 Feb 2007 16:33:24 +0000 (16:33 +0000)]
Improve simplification of coercions
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.
Simon Marlow [Mon, 5 Feb 2007 16:02:29 +0000 (16:02 +0000)]
Move #ifdef __GLASGOW_HASKELL__ < 604 to cover the CSIDL definitions too
Fixes bug exposed by compiling base w/ -fasm on Windows
Simon Marlow [Mon, 5 Feb 2007 14:48:47 +0000 (14:48 +0000)]
Make binary-dist tarballs automatically, and add support for uploading
Moving functionality that was previously in the nightly build scripts
into the top-level Makefile, so it's easier to use from BuildBot.
Simon Marlow [Mon, 22 Jan 2007 11:40:16 +0000 (11:40 +0000)]
Semi-tagging optimisation
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.
Simon Marlow [Mon, 5 Feb 2007 14:08:00 +0000 (14:08 +0000)]
don't forget to remove html-docs as part of 'make clean'
Simon Marlow [Mon, 5 Feb 2007 14:07:27 +0000 (14:07 +0000)]
Simpler, more self-contained, "make dist"
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.
mrchebas@gmail.com [Mon, 22 Jan 2007 11:42:01 +0000 (11:42 +0000)]
optimisation: shortcut branches when possible (x86/x86_64 only for now)
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.
Simon Marlow [Mon, 22 Jan 2007 11:40:16 +0000 (11:40 +0000)]
Semi-tagging optimisation
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.
mrchebas@gmail.com [Fri, 19 Jan 2007 16:05:01 +0000 (16:05 +0000)]
x86: disable assertion that conditionals are not on I8; they can be
mrchebas@gmail.com [Fri, 19 Jan 2007 15:08:00 +0000 (15:08 +0000)]
small debugging output cleanup
mrchebas@gmail.com [Fri, 19 Jan 2007 15:07:49 +0000 (15:07 +0000)]
don't make jump tables for small switches (<= 4 branches)
Only affects -fasm: gcc makes its own decisions about jump tables
mrchebas@gmail.com [Fri, 19 Jan 2007 15:04:33 +0000 (15:04 +0000)]
Small optimisation for comparisons
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.
Alexey Rodriguez [Thu, 21 Dec 2006 11:57:09 +0000 (11:57 +0000)]
Extension of testing script to parse PAPI results from GHC programs.
Alexey Rodriguez [Thu, 21 Dec 2006 11:56:15 +0000 (11:56 +0000)]
One more PAPI measurement, dropped precise cycle counting and replaced it with instructions.
lennart@augustsson.net [Sun, 4 Feb 2007 19:28:55 +0000 (19:28 +0000)]
Export a function to grab the local environment as a function.
lennart@augustsson.net [Sun, 4 Feb 2007 19:09:21 +0000 (19:09 +0000)]
Export nameEnvUniqueElts, similar to nameEnvElts, but giving the Unique as well.
lennart@augustsson.net [Sun, 4 Feb 2007 01:59:05 +0000 (01:59 +0000)]
Make HsRecordBinds a data type instead of a synonym.
simonpj@microsoft.com [Fri, 2 Feb 2007 17:35:27 +0000 (17:35 +0000)]
Look through Notes when generating and matching RULES
lennart@augustsson.net [Sun, 4 Feb 2007 19:30:40 +0000 (19:30 +0000)]
Fix a comment typo.
lennart@augustsson.net [Sun, 4 Feb 2007 19:23:29 +0000 (19:23 +0000)]
Fix a typo.
lennart@augustsson.net [Sun, 4 Feb 2007 19:08:55 +0000 (19:08 +0000)]
Fix a typo.
sven.panne@aedion.de [Sat, 3 Feb 2007 12:31:41 +0000 (12:31 +0000)]
Warning police: "%p" format expects a void*
simonpj@microsoft.com [Fri, 2 Feb 2007 23:37:50 +0000 (23:37 +0000)]
Comments only
simonpj@microsoft.com [Fri, 2 Feb 2007 23:36:34 +0000 (23:36 +0000)]
Fix a pair of classic, but tricky, bugs in the type matcher; exposed by a program from Roman
simonpj@microsoft.com [Fri, 2 Feb 2007 22:53:48 +0000 (22:53 +0000)]
One more wibble to FloatOut, fixes HEAD breakage (I hope)
andrew.pimlott.ctr@metnet.navy.mil [Wed, 31 Jan 2007 22:39:21 +0000 (22:39 +0000)]
clarify that -main-is sets main module and function
simonpj@microsoft.com [Fri, 2 Feb 2007 15:54:52 +0000 (15:54 +0000)]
Don't dump floated bindings just outside a lambda
We do not want the FloatOut pass to transform
f = \x. e
to
f = let lvl = ... in \x.e
The arity pinned on f isn't right any more; and see
Note [Floating out of RHSs].
Core Lint is now spotting the arity lossage (for a letrec), which is
how I spotted this bug.
I also re-jigged the code around floatBind; it's a bit tidier now.
simonpj@microsoft.com [Fri, 2 Feb 2007 15:12:06 +0000 (15:12 +0000)]
Reset the demand info on bindings going to top level (since they cannot be strict)
simonpj@microsoft.com [Fri, 2 Feb 2007 15:10:51 +0000 (15:10 +0000)]
Record arity of the worker, to maintain consistency of arity and strictness information (checked by Lint)
Pepe Iborra [Fri, 2 Feb 2007 11:26:29 +0000 (11:26 +0000)]
Extend the local bindings at a breakpoint with one for the wrapped expression
By popular request, in a breakpoint it is possible now to inspect the result of the expression wrapped by the breakpoint.
The user interface for this is right now preliminar; there is a new binding called '_result' at every breakpoint. Suggestions are welcome!
Pepe Iborra [Fri, 2 Feb 2007 10:59:07 +0000 (10:59 +0000)]
Refactoring of DsBreakpoint.hs
Pepe Iborra [Fri, 2 Feb 2007 10:05:02 +0000 (10:05 +0000)]
Fix imports
sven.panne@aedion.de [Thu, 1 Feb 2007 15:08:39 +0000 (15:08 +0000)]
Warning police: Avoid warning about unused variable
sven.panne@aedion.de [Thu, 1 Feb 2007 13:42:43 +0000 (13:42 +0000)]
Adhere to the new GNU Coding Standards, avoiding a warning with autoconf 2.59c and later
Simon Marlow [Thu, 1 Feb 2007 13:11:25 +0000 (13:11 +0000)]
chmod +x install-sh, see bug #978
Simon Marlow [Thu, 1 Feb 2007 12:40:58 +0000 (12:40 +0000)]
some dynamic flags cannot be used with OPTIONS_GHC, e.g. -i, -package
fixes #1108
Simon Marlow [Thu, 1 Feb 2007 11:40:47 +0000 (11:40 +0000)]
Partial fix for #926
It seems that when a program exits with open DLLs on Windows, the
system attempts to shut down the DLLs, but it also terminates (some
of?) the running threads. The RTS isn't prepared for threads to die
unexpectedly, so it sits around waiting for its workers to finish.
This bites in two places: ShutdownIOManager() in the the unthreaded
RTS, and shutdownCapability() in the threaded RTS. So far I've
modified the latter to notice when worker threads have died
unexpectedly and continue shutting down. It seems a bit trickier to
fix the unthreaded RTS, so for now the workaround for #926 is to use
the threaded RTS.
Ian Lynagh [Wed, 31 Jan 2007 15:10:58 +0000 (15:10 +0000)]
Always pay attention to -keep-tmp-files when we want to delete files
simonpj@microsoft.com [Wed, 31 Jan 2007 15:07:01 +0000 (15:07 +0000)]
Slight refactoring for overloaded strings
simonpj@microsoft.com [Wed, 31 Jan 2007 15:06:16 +0000 (15:06 +0000)]
Use Id.isStrictId
Kirsten Chevalier [Mon, 29 Jan 2007 22:55:33 +0000 (22:55 +0000)]
Two new warnings: arity differing from demand type, and strict IDs at top level
I added two new Core Lint checks in lintSingleBinding:
1. Check that the id's arity is equal to the
number of arguments in its demand type, if it has a demand type
at all (i.e., if demand analysis already happened).
2. Check that top-level or recursive binders aren't demanded.
Ian Lynagh [Wed, 31 Jan 2007 12:01:53 +0000 (12:01 +0000)]
Fix typo causing the PowerPC OS X build to fail
Ian Lynagh [Wed, 31 Jan 2007 11:27:24 +0000 (11:27 +0000)]
Fix typo
Pepe Iborra [Wed, 31 Jan 2007 10:28:21 +0000 (10:28 +0000)]
BugFix: do not insert breakpoints around expressions with unlifted kind
I have added a check, and while there removed a few kludges in my code.
Kudos to -dcore-lint for uncovering this.
I think that this restriction could be lifted, if GHC.Base.breakpoint could have kind ?? -> ??. But is this a legal type? Does not look so to me.
Pepe Iborra [Wed, 31 Jan 2007 10:40:01 +0000 (10:40 +0000)]
Fix a typo
simonpj@microsoft.com [Wed, 31 Jan 2007 09:14:51 +0000 (09:14 +0000)]
Add note about Template Haskell and mutual recursion
simonpj@microsoft.com [Tue, 30 Jan 2007 16:13:30 +0000 (16:13 +0000)]
Fix Trac #1122; spot absence of TyCon in data/newtype header
Simon Marlow [Tue, 30 Jan 2007 10:13:06 +0000 (10:13 +0000)]
Fix for #936
We must traverse dependencies recursively if we encounter any [boot]
modules in the dependencies.
Simon Marlow [Mon, 29 Jan 2007 12:45:59 +0000 (12:45 +0000)]
fix bug in GetLastError/SetLastError patch
Ian Lynagh [Sun, 28 Jan 2007 21:32:16 +0000 (21:32 +0000)]
Fix GHCi on PowerPC OS X
David Kirkman and Peter Tanski noticed that a line had been removed during
a patch merge which meant that oc->image pointed to the wrong place and
ultimately caused an error from realloc.
Simon Marlow [Fri, 26 Jan 2007 16:26:20 +0000 (16:26 +0000)]
Save the Win32 error code where necessary
Similarly to the way we save errno across context switches and
suspendThread/resumeThread, we must save and restore the Win32 error
code via GetLastError()/SetLastError(). Fixes #896.
simonpj@microsoft.com [Thu, 25 Jan 2007 12:54:48 +0000 (12:54 +0000)]
Comments and layout only
Simon Marlow [Tue, 23 Jan 2007 12:38:43 +0000 (12:38 +0000)]
Add -stdout-binary and -stderr-binary flags to bypass dos2unix
Apparently some versions of dos2unix can detect a binary file and
ignore it, but others can't, so provide a way to tell runstdtest that
the output is in binary.
lennart@augustsson.net [Sat, 20 Jan 2007 16:14:36 +0000 (16:14 +0000)]
Document the overloaded string extension.
lennart@augustsson.net [Thu, 21 Dec 2006 21:01:47 +0000 (21:01 +0000)]
Add support for overloaded string literals.
The class is named IsString with the single method fromString.
Overloaded strings work the same way as overloaded numeric literals.
In expressions a string literals gets a fromString applied to it.
In a pattern there will be an equality comparison with the fromString:ed literal.
Use -foverloaded-strings to enable this extension.
Pepe Iborra [Sun, 21 Jan 2007 11:06:10 +0000 (11:06 +0000)]
Improve presentation of :print output
Pepe Iborra [Sun, 21 Jan 2007 11:03:44 +0000 (11:03 +0000)]
Comments only
Pepe Iborra [Sun, 21 Jan 2007 10:59:09 +0000 (10:59 +0000)]
Refactoring of Debugger.hs
A big motivation to start with it was getting several independently useful functions out of the Ghci monad and into the IO monad instead. Working in debugger integration for Emacs via the ghc-api is helping me to improve reusability..
While I was there, I tried to make the code less tangled, easier to understand, switched from implicit Exceptions to explicit Eithers in the bkptTable code, etc.
Pepe Iborra [Sat, 20 Jan 2007 20:11:05 +0000 (20:11 +0000)]
Fix a bug in the closure viewer
Pepe Iborra [Sat, 20 Jan 2007 18:52:49 +0000 (18:52 +0000)]
Add obtainTerm1 to the GHC api
Pepe Iborra [Sun, 7 Jan 2007 21:12:40 +0000 (21:12 +0000)]
Reorganizing my mess a bit
Ian Lynagh [Fri, 19 Jan 2007 22:08:50 +0000 (22:08 +0000)]
Tweak hc-build
Touch all the object files at the end of hc-build, as otherwise make
gets upset as the .h files are newer than them and tries to rebuild
stuff (and fails).
Print a nice message when we're finished.
Spencer Janssen [Thu, 4 Jan 2007 07:52:43 +0000 (07:52 +0000)]
User's guide: length is not a good consumer anymore.
Ian Lynagh [Fri, 19 Jan 2007 15:52:31 +0000 (15:52 +0000)]
Don't start a GHC session before answering --version/--numeric-version
This also fixes bootstrapping issues, as when bootstrapping we don't
have a package.conf when we run configure, so it fails to work out
what version of GHC it is which causes breakage later on.
mrchebas@gmail.com [Wed, 17 Jan 2007 13:32:34 +0000 (13:32 +0000)]
prettifying Cmm: print MachOps as identifiers by replacing ' ' with '_'
mrchebas@gmail.com [Wed, 17 Jan 2007 13:00:37 +0000 (13:00 +0000)]
prettifying Cmm a bit: convert (x + (-N)) to (x - N)
Simon Marlow [Wed, 17 Jan 2007 09:59:44 +0000 (09:59 +0000)]
addition to "Eagerly raise a blocked exception" to fix unreg case
Simon Marlow [Tue, 16 Jan 2007 16:11:00 +0000 (16:11 +0000)]
Remove special lambda unicode character, it didn't work anyway
Since lambda is a lower-case letter, it's debatable whether we want to
steal it to mean lambda in Haskell source. However if we did, then we
would probably want to make it a "special" symbol, not just a reserved
symbol, otherwise writing \x->... (using unicode characters of course)
wouldn't work, because \x would be treated as a single identifier,
you'd need a space.
Simon Marlow [Tue, 16 Jan 2007 12:04:09 +0000 (12:04 +0000)]
allow 'ghci -threaded' (fixes #1101)
Ian Lynagh [Tue, 16 Jan 2007 01:29:07 +0000 (01:29 +0000)]
Check with sysconf _POSIX_THREAD_CPUTIME is available before we try to use it.
Calling clock_gettime(CLOCK_THREAD_CPUTIME_ID,_) regardless was
causing a segfault (trac #1030).
Ian Lynagh [Mon, 15 Jan 2007 19:42:50 +0000 (19:42 +0000)]
Give -fwrapv to gcc when it supports it
Fixes trac #952: Haskell requires consistent overflow behaviour, which
gcc doesn't give without this flag.
Ian Lynagh [Mon, 15 Jan 2007 12:44:41 +0000 (12:44 +0000)]
Fix ghc-pkg now showError has been removed
Pepe Iborra [Mon, 15 Jan 2007 09:56:43 +0000 (09:56 +0000)]
Documentation for the new ':breakpoint continue' command
Pepe Iborra [Sun, 14 Jan 2007 13:08:53 +0000 (13:08 +0000)]
Add TcGadt to package.conf
I'm assuming that this was overlooked during the System Fc overhaul
If TcGadt is not supposed to be in package.conf please rollback this patch
Pepe Iborra [Sun, 14 Jan 2007 13:08:15 +0000 (13:08 +0000)]
Add a header for GhciMonad.hs
Pepe Iborra [Fri, 12 Jan 2007 14:40:40 +0000 (14:40 +0000)]
Remove a false assertion
Pepe Iborra [Thu, 11 Jan 2007 17:25:55 +0000 (17:25 +0000)]
Too agressive breakpoint coalescing politics
simonpj@microsoft.com [Sat, 13 Jan 2007 22:04:25 +0000 (22:04 +0000)]
Fix an obscure bug in rule-matching
This bug is the cause of Trac #1092. The fix is easy
by making the RnEnv2 implementation do the right thing.
See Note [rnBndrLR] in VarEnv.
Test case is simplCore/should_compile/rule1
Ian Lynagh [Fri, 12 Jan 2007 16:47:32 +0000 (16:47 +0000)]
Add a warning for tabs in source files
Simon Marlow [Tue, 9 Jan 2007 17:00:19 +0000 (17:00 +0000)]
expand $topdir in the output of 'ghc-pkg field'
this fixed #937, and gets us further towards 'setup haddock' working
for Cabal on Windows.
Kirsten Chevalier [Thu, 11 Jan 2007 17:25:01 +0000 (17:25 +0000)]
Remove bogus assertion in getCallMethod
With my as-yet-uncommitted changes to the demand analyzer, code got
generated for some programs that caused this assertion to fail. The
transformation I was doing was correct; it was the assertion that
wasn't. So, the assertion is removed.
This is actually Simon PJ's patch rather than mine, but I noticed that
it wasn't checked in and it seems completely safe to do so.
sven.panne@aedion.de [Thu, 11 Jan 2007 16:29:56 +0000 (16:29 +0000)]
Fixed .spec file (no building guide anymore)
Pepe Iborra [Thu, 11 Jan 2007 14:56:34 +0000 (14:56 +0000)]
An object code module in ghci is not and cannot be handled by the GHCi debugger
This patch should provide more informative messages to the user
Pepe Iborra [Thu, 11 Jan 2007 13:14:31 +0000 (13:14 +0000)]
Comments only
Pepe Iborra [Thu, 11 Jan 2007 13:13:59 +0000 (13:13 +0000)]
Added the new :breakpoint continue option
Previously, when in a breakpoint, :quit was used to continue execution.
This is not the right thing to do, so this patch restores :quit to its
original meaning whether or not ghci is in an inferior session.
The continue behavior is now provided by ":breakpoint continue".
I added a synonim command in :continue because it is much shorter,
but this is optional
Pepe Iborra [Thu, 11 Jan 2007 13:11:56 +0000 (13:11 +0000)]
:cd is a top level only command, that is, not allowed in inferior ghci sessions
simonpj@microsoft.com [Thu, 11 Jan 2007 13:14:23 +0000 (13:14 +0000)]
Wibble
simonpj@microsoft.com [Thu, 11 Jan 2007 13:12:26 +0000 (13:12 +0000)]
Slightly improve -ddump-hi-diffs output
simonpj@microsoft.com [Thu, 11 Jan 2007 13:10:29 +0000 (13:10 +0000)]
Avoid duplicate defns of 'main' in module Main