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
simonpj@microsoft.com [Thu, 11 Jan 2007 13:08:04 +0000 (13:08 +0000)]
Add -ddump-rule-firings
simonpj@microsoft.com [Thu, 11 Jan 2007 08:53:31 +0000 (08:53 +0000)]
Comments
simonpj@microsoft.com [Wed, 10 Jan 2007 13:33:24 +0000 (13:33 +0000)]
Correct spelling
simonpj@microsoft.com [Wed, 10 Jan 2007 12:43:27 +0000 (12:43 +0000)]
Sort rules and instances lexicographically in interface files
We should sort rules and instances lexicographically, not by Unique,
in interface files, else we get unnecessary "rules changed" and hence
unnecessary recompilation.
This bug has been there since the interface-file upheaval that put Names
into IfaceSyn.
Pepe Iborra [Thu, 11 Jan 2007 11:23:51 +0000 (11:23 +0000)]
This patch teaches ghci to announce that a module has beeen loaded in debugging mode
Usually ghci announces when a module has been loaded interpreted. Now it will also announce it when the module has been instrumented for debugging
Pepe Iborra [Thu, 11 Jan 2007 11:17:42 +0000 (11:17 +0000)]
Fix some text in the GHCi help message that was going over 80 columns
Pepe Iborra [Thu, 11 Jan 2007 11:17:07 +0000 (11:17 +0000)]
Comments only
simonpj@microsoft.com [Thu, 11 Jan 2007 09:16:23 +0000 (09:16 +0000)]
Comments only
simonpj@microsoft.com [Thu, 11 Jan 2007 09:15:33 +0000 (09:15 +0000)]
Make the LiberateCase transformation understand associated types
Consider this FC program:
data family AT a :: *
data instance AT Int = T1 Int Int
f :: AT Int -> Int
f t = case t of DEFAULT -> <body>
We'd like to replace the DEFAULT by a use of T1, so that if
we scrutinise t inside <body> we share the evaluation:
f t = case (t `cast` co) of T1 x y -> <body>
I decided to do this as part of the liberate-case transformation,
which is already trying to avoid redundant evals.
The new transformation requires knowledge of the family instance
environment, so I had to extend ModGuts to carry the fam_inst_env,
and put that envt into the liberate-case environment.
Otherwise it's all pretty straightforward.
simonpj@microsoft.com [Thu, 11 Jan 2007 09:10:03 +0000 (09:10 +0000)]
Add comments about invariants
simonpj@microsoft.com [Thu, 11 Jan 2007 09:09:22 +0000 (09:09 +0000)]
Comments
simonpj@microsoft.com [Thu, 11 Jan 2007 09:08:37 +0000 (09:08 +0000)]
Comments
simonpj@microsoft.com [Thu, 11 Jan 2007 09:07:04 +0000 (09:07 +0000)]
Add the function TypeRep.pprTypeApp, and use it
pprTypeApp :: SDoc -> [Type] -> SDoc
pprTypeApp pp tys = hang pp 2 (sep (map pprParendType tys))
simonpj@microsoft.com [Thu, 11 Jan 2007 09:02:52 +0000 (09:02 +0000)]
Log message for: Fix a nasty recursive loop in typechecking interface files
(Alas, Darcs failed to record my log-message for the above patch,
so this patch is an attempt to add the log message retrospectively.)
Roman found a case where the type-checker for interface files
would go into a loop. Here it is:
module BarAT where
class Foo a where
data FooT a :: *
int :: FooT a -> Int
module Baz where
import BarAT
foo :: FooT Int -> Int
foo = foo
The trouble turned out to be that Foo gives rise to a *newtype*,
and using a newtpe caused a little bit too much strictness in
BuildTyCl.mkNewTyConRhs. Specifically, mkNewTypeCoercion did pattern
matching, which forced the call to eta_reduce in mkNewTyConRhs.
This is all too delicate really. But for now I've fixed the bug,
and added an explanatory comment. I'll add a test for it, in
indexed-types/should_compile/ATLoop
simonpj@microsoft.com [Thu, 11 Jan 2007 09:01:23 +0000 (09:01 +0000)]
Log-message for: Improve command-line parser (add OptIntSuffix); make -fliberate-case-threshold dynamic
(Alas, Darcs failed to record my log-message for the above patch,
so this patch is an attempt to add the log message retrospectively.)
Parsing options numeric arguments, such as
-fliberate-case-threshold=30
for dynamic flags wasn't being handled well. I elaborated the
command-line parser to have a new constructor, OptIntSuffix, for this
case, and did the consequential changes.
This patch also makes the -fliberate-case-threshold flag into a
dynamic flag.
simonpj@microsoft.com [Thu, 11 Jan 2007 08:48:51 +0000 (08:48 +0000)]
Improve command-line parser (add OptIntSuffix); make -fliberate-case-threshold dynamic
simonpj@microsoft.com [Thu, 11 Jan 2007 08:47:02 +0000 (08:47 +0000)]
Remove redundant import
simonpj@microsoft.com [Thu, 11 Jan 2007 08:46:45 +0000 (08:46 +0000)]
Add comments (AT-related)
simonpj@microsoft.com [Thu, 11 Jan 2007 08:45:21 +0000 (08:45 +0000)]
Spelling correction only
simonpj@microsoft.com [Thu, 11 Jan 2007 08:29:50 +0000 (08:29 +0000)]
Fix a nasty recursive loop in typechecking interface files
simonpj@microsoft.com [Thu, 11 Jan 2007 08:29:07 +0000 (08:29 +0000)]
Update comments
andy@galois.com [Wed, 10 Jan 2007 20:26:35 +0000 (20:26 +0000)]
Changing bootstrapping for pipes between debugger and debuggee
- Now we use two pipes and a fork rather than use named pipes
- We use the HPCRIX env var to send the pipe numbers in %d:%d format
- We now always breakpoint for special events
- We check to see we are the original process before each breakpoint event
sub processes are not debugged; this lets us debug the debugger.
andy@galois.com [Tue, 9 Jan 2007 19:46:31 +0000 (19:46 +0000)]
Dynamically allocating the tix box breakpoint array
andy@galois.com [Tue, 9 Jan 2007 19:40:11 +0000 (19:40 +0000)]
Adding command channel for the hpc debugger to the hpc part of the RTS
Manuel M T Chakravarty [Wed, 10 Jan 2007 18:44:51 +0000 (18:44 +0000)]
checkTauTvUpdate: take synonym families into account
Simon Marlow [Wed, 10 Jan 2007 16:11:12 +0000 (16:11 +0000)]
remove old building guide, change links to point to the wiki
simonpj@microsoft.com [Wed, 10 Jan 2007 11:13:44 +0000 (11:13 +0000)]
Fix apparently-long-standing bug in FloatIn
The float-in pass wasn't doing the right thing when you have
let x{rule mentions y} = rhs in body
It allowed a binding mentioning y to float into the body, which is
obviously wrong. I think this bug has been there a long time; I don't
really know why it has not come up before.
It showed up when compiling Text.Regex.Base.Context with WAY=p in
package regex-base.
simonpj@microsoft.com [Wed, 10 Jan 2007 11:13:31 +0000 (11:13 +0000)]
Comments only
Manuel M T Chakravarty [Tue, 9 Jan 2007 21:55:41 +0000 (21:55 +0000)]
Handle synonym families in check_tau_type
simonpj@microsoft.com [Tue, 9 Jan 2007 13:53:14 +0000 (13:53 +0000)]
Preserve rigidity for GADTs when typechecking explicit tuples
simonpj@microsoft.com [Tue, 9 Jan 2007 13:47:19 +0000 (13:47 +0000)]
Fix egregious bug in implication constraints
Build an implication constraint if there is a non-trivial
refinement, even if there are no other 'given' constraints.
Test = gadt/set.hs
Simon Marlow [Tue, 9 Jan 2007 09:17:58 +0000 (09:17 +0000)]
reorganise text in the "using packages" section
Pepe Iborra [Tue, 9 Jan 2007 07:42:58 +0000 (07:42 +0000)]
Unbreak usage of ASSERTM
Ian Lynagh [Mon, 8 Jan 2007 16:28:38 +0000 (16:28 +0000)]
When setting stdout and stderr to NoBuffering in GHCi, do stdin too.
Fixes trac #929.
Merge to 6.6 branch.
Simon Marlow [Mon, 8 Jan 2007 15:10:06 +0000 (15:10 +0000)]
fix version checking of .hi files
I broke it during my recent interface-file overhaul
Ian Lynagh [Mon, 8 Jan 2007 12:59:16 +0000 (12:59 +0000)]
Have the splitter duplicate the .note.GNU-stack
Ian Lynagh [Mon, 8 Jan 2007 12:26:42 +0000 (12:26 +0000)]
Have the mangler keep .note.GNU-stack
Pepe Iborra [Sun, 7 Jan 2007 20:43:19 +0000 (20:43 +0000)]
Try to emulate the output of 'deriving Show' in the Term pretty printer
Pepe Iborra [Sun, 7 Jan 2007 19:12:27 +0000 (19:12 +0000)]
Extended the debugger documentation with a 'tips' section
Pepe Iborra [Sat, 6 Jan 2007 10:07:36 +0000 (10:07 +0000)]
More informative message in a breakpoint
Pepe Iborra [Sat, 6 Jan 2007 10:05:09 +0000 (10:05 +0000)]
Reload modules after ':break stop'
This is necessary to revert CAFs. Previously to this patch the user would get a msg "You may need to reload your modules". This patch takes care of that
Pepe Iborra [Fri, 5 Jan 2007 17:48:58 +0000 (17:48 +0000)]
Remove a tracing statement, change a comment, and make more obvious an unexpected condition
Pepe Iborra [Fri, 5 Jan 2007 17:45:25 +0000 (17:45 +0000)]
Improved an error message, giving a more concrete suggestion
Pepe Iborra [Fri, 5 Jan 2007 17:38:51 +0000 (17:38 +0000)]
This patch fixes ticket #1083 in the ghci debugger
A module loaded under debugging mode but owning no breakpoints was erroneously identified by ghci as a non-under debugging module, producing a confusing error msg when the user tried to set a breakpoint
The fix inserts an empty list of sites in the module-sites dictionary used by the debugger
Pepe Iborra [Sun, 31 Dec 2006 13:28:44 +0000 (13:28 +0000)]
Updates to the ghci debugger docs
ijones@syntaxpolice.org [Sun, 7 Jan 2007 21:52:49 +0000 (21:52 +0000)]
Fixed errors in "clunky" definition for pattern guards
Amusingly, this little error in the GHC manual came from the original
SPJ proposal for pattern guards from 1997 and even slipped into the
Haskell Workshop 2000 paper by SPJ and Martin Erwig. It's almost 10
years old.
davve@dtek.chalmers.se [Fri, 5 Jan 2007 17:43:46 +0000 (17:43 +0000)]
Remove the DocEntity type. Fixes the problem with duplicate error messages at
its root. Also gets rid of the getDeclMainBinder function which isn't needed
anylonger.
Simon Marlow [Fri, 5 Jan 2007 13:57:15 +0000 (13:57 +0000)]
Eagerly raise a blocked exception when entering 'unblock' or exiting 'block'
This fixes #1047
Simon Marlow [Fri, 5 Jan 2007 11:46:08 +0000 (11:46 +0000)]
wrap Main.main in GHC.TopHandler.runIOFastExit
This is so that exceptions raised by Main.main do exactly the same
thing as they would in a compiled program, including writing the
message to stderr and shutting down with the correct exit code.
Simon Marlow [Fri, 5 Jan 2007 12:34:03 +0000 (12:34 +0000)]
disable an incorrect ASSERTion in the non-THREADED_RTS case (bug #1067)
Manuel M T Chakravarty [Fri, 5 Jan 2007 01:26:19 +0000 (01:26 +0000)]
HsSyn clean up for indexed types
- This patch cleans up the HsSyn representation of type family declarations.
- The new representation is not only less delicate, it also simplified teh code
a bit.
- I took the opportunity of stream lining the terminology and function names
at the same time.
- I also updated the description on the wiki at
<http://hackage.haskell.org/trac/ghc/wiki/TypeFunctionsSyntax>
Manuel M T Chakravarty [Thu, 4 Jan 2007 01:31:56 +0000 (01:31 +0000)]
Fix and improve deriving for indexed data types
- The test for being able to derive the requested classes needs to be made
with the representation tycon (not the family tycon).
- Standalone deriving for indexed types requires the instance types in the
derive clause to match a data/newtype instance exactly (modulo alpha).
simonpj@microsoft.com [Wed, 3 Jan 2007 17:59:32 +0000 (17:59 +0000)]
Record-ise the liberate-case envt, in preparation for new stuff
simonpj@microsoft.com [Wed, 3 Jan 2007 17:59:13 +0000 (17:59 +0000)]
Add a type synonym for FamInstEnvs
simonpj@microsoft.com [Wed, 3 Jan 2007 17:56:38 +0000 (17:56 +0000)]
Comments only
simonpj@microsoft.com [Wed, 3 Jan 2007 17:55:58 +0000 (17:55 +0000)]
Comments only
simonpj@microsoft.com [Wed, 3 Jan 2007 16:07:03 +0000 (16:07 +0000)]
Be more relaxed about reporting ambiguous class methods
(MERGE to STABLE branch, pls)
This patch makes us a bit more relaxed about ambiguous
class method types. See tc223 for an example.
Reported by Yitzchak Gale
simonpj@microsoft.com [Wed, 3 Jan 2007 15:35:30 +0000 (15:35 +0000)]
Fix bug in cast optimisation; fixes Trac #995
There was a plain bug in the cast-optimiation code -- a call to
splitCoercionKind_maybe instead of coercionKind! Result was that
we missed useful opportunities to move casts around. Trac #995
is an example, but I bet there are more.
simonpj@microsoft.com [Wed, 3 Jan 2007 12:15:40 +0000 (12:15 +0000)]
Fix stupid error in rehashing TcRnDriver (fixes TH test errors)
simonpj@microsoft.com [Wed, 3 Jan 2007 11:50:09 +0000 (11:50 +0000)]
Fix several bugs related to finding free variables
Now that coercion variables mention types, a type-lambda binder can
have free variables. This patch adjusts the free-variable finder
to take account of this, by treating Ids and TyVars more uniformly.
In addition, I fixed a bug in the specialiser that was missing a
free type variable in a binder. And a bug in tyVarsOfInst that
was missing the type variables in the kinds of the quantified tyvars.