ghc-hetmet.git
17 years agoRefactor TcRnDriver, and check exports on hi-boot files
simonpj@microsoft.com [Fri, 16 Mar 2007 13:38:50 +0000 (13:38 +0000)]
Refactor TcRnDriver, and check exports on hi-boot files

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.

17 years agoComment out debug traces
simonpj@microsoft.com [Fri, 16 Mar 2007 13:38:22 +0000 (13:38 +0000)]
Comment out debug traces

17 years agoUse update-alternatives for handling generic tool names
sven.panne@aedion.de [Thu, 15 Mar 2007 15:28:23 +0000 (15:28 +0000)]
Use update-alternatives for handling generic tool names

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.

17 years agoMake the type-defaulting in GHCi use () as the first default type
simonpj@microsoft.com [Thu, 15 Mar 2007 14:28:12 +0000 (14:28 +0000)]
Make the type-defaulting in GHCi use () as the first default type

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.

17 years agoAdded support for parallel builds
sven.panne@aedion.de [Thu, 15 Mar 2007 12:24:57 +0000 (12:24 +0000)]
Added support for parallel builds

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.

17 years agoWibble to type-error-message improvement
simonpj@microsoft.com [Wed, 14 Mar 2007 16:48:50 +0000 (16:48 +0000)]
Wibble to type-error-message improvement

17 years agoImprove error messages slightly, saying "a1...an" instead of "a b c"
simonpj@microsoft.com [Wed, 14 Mar 2007 16:29:06 +0000 (16:29 +0000)]
Improve error messages slightly, saying "a1...an" instead of "a b c"

17 years agoTweak hasktags to cope with abc::def correctly
Ian Lynagh [Wed, 14 Mar 2007 16:01:02 +0000 (16:01 +0000)]
Tweak hasktags to cope with abc::def correctly
Patch from Marc Weber in
http://www.haskell.org/pipermail/glasgow-haskell-users/2007-February/011998.html

17 years agoUnbreak Haddock markup
sven.panne@aedion.de [Wed, 14 Mar 2007 15:15:17 +0000 (15:15 +0000)]
Unbreak Haddock markup

17 years agoWarning police: Avoid name shadowing
sven.panne@aedion.de [Wed, 14 Mar 2007 14:04:34 +0000 (14:04 +0000)]
Warning police: Avoid name shadowing

17 years agoHandle primitive types and pseudo ops when generating LaTeX
sven.panne@aedion.de [Wed, 14 Mar 2007 13:43:28 +0000 (13:43 +0000)]
Handle primitive types and pseudo ops when generating LaTeX

17 years agoWarning police: Replace patter matching failures by something more informative
sven.panne@aedion.de [Wed, 14 Mar 2007 13:40:44 +0000 (13:40 +0000)]
Warning police: Replace patter matching failures by something more informative

17 years agoAdded LaTeX commands for primitive types and pseudo ops
sven.panne@aedion.de [Wed, 14 Mar 2007 13:27:03 +0000 (13:27 +0000)]
Added LaTeX commands for primitive types and pseudo ops

17 years agoFixed LaTeX markup
sven.panne@aedion.de [Wed, 14 Mar 2007 13:25:21 +0000 (13:25 +0000)]
Fixed LaTeX markup

17 years agoWarning police: Don't rely on defaulting
sven.panne@aedion.de [Wed, 14 Mar 2007 12:36:08 +0000 (12:36 +0000)]
Warning police: Don't rely on defaulting

17 years agoWarning police: Removed "Defined but not used" warnings
sven.panne@aedion.de [Wed, 14 Mar 2007 12:30:21 +0000 (12:30 +0000)]
Warning police: Removed "Defined but not used" warnings

17 years agoWarning police: Added type signatures
sven.panne@aedion.de [Wed, 14 Mar 2007 12:23:16 +0000 (12:23 +0000)]
Warning police: Added type signatures

17 years agoUse -Wall for compilation of genprimopcode
sven.panne@aedion.de [Wed, 14 Mar 2007 12:22:33 +0000 (12:22 +0000)]
Use -Wall for compilation of genprimopcode

17 years agoImprove typechecker error messages; see Trac #1221
simonpj@microsoft.com [Wed, 14 Mar 2007 12:14:10 +0000 (12:14 +0000)]
Improve typechecker error messages; see Trac #1221

17 years agoFix the way configure sets the ghc_ge_* variables
Ian Lynagh [Tue, 13 Mar 2007 22:05:45 +0000 (22:05 +0000)]
Fix the way configure sets the ghc_ge_* variables

17 years agocache the values of ghc_ge_XXX at configure-time
Simon Marlow [Tue, 13 Mar 2007 16:00:08 +0000 (16:00 +0000)]
cache the values of ghc_ge_XXX at configure-time
This avoids recomputing them via $(shell) each time make expands one
of these variables, which is very expensive (0.3s or so) on Windows.

17 years agoUpdate the wired-in name for Data.String.IsString
Brian Alliet [Wed, 14 Mar 2007 05:28:07 +0000 (05:28 +0000)]
Update the wired-in name for Data.String.IsString

17 years agoAdd helpful cross-references
simonpj@microsoft.com [Tue, 13 Mar 2007 16:22:54 +0000 (16:22 +0000)]
Add helpful cross-references

17 years agofix #1200: don't evaluate the result of main
Simon Marlow [Tue, 13 Mar 2007 14:46:14 +0000 (14:46 +0000)]
fix #1200: don't evaluate the result of main

17 years agoFix a bug in the liveness analysis
Simon Marlow [Tue, 23 Jan 2007 10:40:25 +0000 (10:40 +0000)]
Fix a bug in the liveness analysis
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.

17 years agoBe a bit more verbose about what's happening when recursively making in subdirs
Ian Lynagh [Mon, 12 Mar 2007 10:50:53 +0000 (10:50 +0000)]
Be a bit more verbose about what's happening when recursively making in subdirs

17 years agoHave configure take arguments telling it where gmp is; fixes trac #957
Ian Lynagh [Sun, 11 Mar 2007 17:50:25 +0000 (17:50 +0000)]
Have configure take arguments telling it where gmp is; fixes trac #957

17 years agoAvoid duplication in the binary-dist rules for docs
Ian Lynagh [Fri, 9 Mar 2007 17:48:25 +0000 (17:48 +0000)]
Avoid duplication in the binary-dist rules for docs
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.

17 years agoRemove duplication in binary dist rules
Ian Lynagh [Fri, 9 Mar 2007 17:43:07 +0000 (17:43 +0000)]
Remove duplication in binary dist rules
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.

17 years agoMake constructor names in info tables position independent
wolfgang.thaller@gmx.net [Thu, 8 Mar 2007 02:05:03 +0000 (02:05 +0000)]
Make constructor names in info tables position independent

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.)

17 years agowhen invoking gcc, instead of the -B<dir> flag, use GCC_EXEC_PREFIX
Simon Marlow [Thu, 8 Mar 2007 15:46:53 +0000 (15:46 +0000)]
when invoking gcc, instead of the -B<dir> flag, use GCC_EXEC_PREFIX
should hopefully fix/workaround #1110, but I haven't had a chance to
test it yet.

17 years agosmall cleanups
Simon Marlow [Thu, 8 Mar 2007 13:45:43 +0000 (13:45 +0000)]
small cleanups

17 years agorefactor: use do-notation rather than `thenBc`-style
Simon Marlow [Thu, 8 Mar 2007 11:06:19 +0000 (11:06 +0000)]
refactor: use do-notation rather than `thenBc`-style

17 years agoadd missing %ENTRY_CODE()
Simon Marlow [Thu, 8 Mar 2007 10:19:21 +0000 (10:19 +0000)]
add missing %ENTRY_CODE()
fixes unreg way in HEAD

17 years agoadd noDuplicatezh_fast to symbol table
Simon Marlow [Thu, 8 Mar 2007 09:57:17 +0000 (09:57 +0000)]
add noDuplicatezh_fast to symbol table

17 years agoadd declaration for noDuplicatezh_fast
Simon Marlow [Wed, 7 Mar 2007 08:56:48 +0000 (08:56 +0000)]
add declaration for noDuplicatezh_fast

17 years agoRemove outdated libraries/doc/libraries.xml and libraries/doc/libtable.xml
Ian Lynagh [Tue, 6 Mar 2007 15:26:54 +0000 (15:26 +0000)]
Remove outdated libraries/doc/libraries.xml and libraries/doc/libtable.xml

17 years agoadd noDuplicate#
Simon Marlow [Tue, 6 Mar 2007 14:31:12 +0000 (14:31 +0000)]
add noDuplicate#
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).

17 years agoTHREADED_RTS: use cas() when claiming thunks
Simon Marlow [Tue, 6 Mar 2007 14:27:32 +0000 (14:27 +0000)]
THREADED_RTS: use cas() when claiming thunks
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).

17 years agoworkerTaskStop(): set task->cap = NULL
Simon Marlow [Tue, 6 Mar 2007 14:04:53 +0000 (14:04 +0000)]
workerTaskStop(): set task->cap = NULL
avoids an assertion failure in newBoundTask()

17 years agodisable -Wbad-function-cast; it's hard/impossible to work around
Simon Marlow [Tue, 6 Mar 2007 13:55:43 +0000 (13:55 +0000)]
disable -Wbad-function-cast; it's hard/impossible to work around

17 years agoremove vestiges of CCallable/CReturnable
Simon Marlow [Tue, 6 Mar 2007 12:35:33 +0000 (12:35 +0000)]
remove vestiges of CCallable/CReturnable

17 years agoRemove references to the in-tree building guide from teh old commentary
Ian Lynagh [Tue, 6 Mar 2007 14:47:24 +0000 (14:47 +0000)]
Remove references to the in-tree building guide from teh old commentary

17 years agoRemove old references to the in-tree building guide
Ian Lynagh [Tue, 6 Mar 2007 14:43:41 +0000 (14:43 +0000)]
Remove old references to the in-tree building guide

17 years agofix the timer_create() test
Simon Marlow [Tue, 6 Mar 2007 09:35:25 +0000 (09:35 +0000)]
fix the timer_create() test

17 years agoSimple fix for Trac #1199 (pls merge to branch)
simonpj@microsoft.com [Tue, 6 Mar 2007 06:56:41 +0000 (06:56 +0000)]
Simple fix for Trac #1199 (pls merge to branch)

17 years agoforkProcess: startTimer() in the child, because the timer will be reset
Simon Marlow [Mon, 5 Mar 2007 14:45:50 +0000 (14:45 +0000)]
forkProcess: startTimer() in the child, because the timer will be reset

17 years agobetter autoconfery for timer_create()
Simon Marlow [Mon, 5 Mar 2007 14:36:43 +0000 (14:36 +0000)]
better autoconfery for timer_create()

17 years agoUse Data.String rather than GHC.Base for IsString/fromString
Ian Lynagh [Sat, 3 Mar 2007 14:53:15 +0000 (14:53 +0000)]
Use Data.String rather than GHC.Base for IsString/fromString

17 years agoUse timer_create() for the interval timer, if available
Simon Marlow [Fri, 2 Mar 2007 11:31:04 +0000 (11:31 +0000)]
Use timer_create() for the interval timer, if available
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.

17 years agofurther improvements to the x86/x86_64 NCG
Simon Marlow [Thu, 1 Mar 2007 13:06:28 +0000 (13:06 +0000)]
further improvements to the x86/x86_64 NCG

17 years agoFix typo in primops docs
Ian Lynagh [Thu, 1 Mar 2007 13:03:39 +0000 (13:03 +0000)]
Fix typo in primops docs

17 years agoDo not go into an infinite loop when pretty-printer finds a negative indent (Trac...
simonpj@microsoft.com [Thu, 1 Mar 2007 11:45:13 +0000 (11:45 +0000)]
Do not go into an infinite loop when pretty-printer finds a negative indent (Trac #1176)

17 years agoUse the most complex form of addressing modes on x86
Simon Marlow [Thu, 1 Mar 2007 11:26:25 +0000 (11:26 +0000)]
Use the most complex form of addressing modes on x86
We had a pattern that matched (base+(index<<N)), but not
(base+(index<<N)+M).

17 years agois64BitInteger: truncate to 64 bits before testing
Simon Marlow [Thu, 1 Mar 2007 11:25:13 +0000 (11:25 +0000)]
is64BitInteger: truncate to 64 bits before testing
We weren't catching some literals that actually fit in 32 bits before,
because e.g. -1 was sometimes represented as 0xffffffffffffffff in CmmInt.

17 years agoFix -keep-s-file with --make
Simon Marlow [Thu, 1 Mar 2007 09:57:49 +0000 (09:57 +0000)]
Fix -keep-s-file with --make

17 years agosome more vectored return stuff to be removed
Simon Marlow [Thu, 1 Mar 2007 09:22:50 +0000 (09:22 +0000)]
some more vectored return stuff to be removed

17 years agoFix #839 (Generate documentation for built-in types and primitve operations)
Simon Marlow [Wed, 28 Feb 2007 16:34:42 +0000 (16:34 +0000)]
Fix #839 (Generate documentation for built-in types and primitve operations)

This patch was originally by dinko.tenev@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#).

17 years agoFix #249 (-caf-all bugs)
Simon Marlow [Wed, 28 Feb 2007 15:50:09 +0000 (15:50 +0000)]
Fix #249 (-caf-all bugs)
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.

17 years agouse -fforce-recomp when compiling Main.hs against the ghc package.
Simon Marlow [Wed, 28 Feb 2007 15:33:04 +0000 (15:33 +0000)]
use -fforce-recomp when compiling Main.hs against the ghc package.
This is necessary because GHC's recompilation checker doesn't check
across package boundaries.

17 years agoRemove vectored returns.
Simon Marlow [Wed, 28 Feb 2007 13:07:14 +0000 (13:07 +0000)]
Remove vectored returns.
We recently discovered that they aren't a win any more, and just cost
code size.

17 years agoWindows: the .hp file is <prog>.exe.hp
Simon Marlow [Wed, 28 Feb 2007 12:03:19 +0000 (12:03 +0000)]
Windows: the .hp file is <prog>.exe.hp

17 years agoMake let-matching work in Rules again
simonpj@microsoft.com [Tue, 27 Feb 2007 23:13:13 +0000 (23:13 +0000)]
Make let-matching work in Rules again

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.

17 years agoFixes for the mangler on IA64
Ian Lynagh [Tue, 27 Feb 2007 17:45:42 +0000 (17:45 +0000)]
Fixes for the mangler on IA64
From heatsink, in trac #1150.

17 years agoRemove the itbls field of BCO, put itbls in with the literals
Simon Marlow [Tue, 27 Feb 2007 13:46:09 +0000 (13:46 +0000)]
Remove the itbls field of BCO, put itbls in with the literals
This is a simplification & minor optimisation for GHCi

17 years agofix data con patch for 64-bit architectures
Simon Marlow [Tue, 27 Feb 2007 13:43:58 +0000 (13:43 +0000)]
fix data con patch for 64-bit architectures

17 years agoConstructor names in info tables
bjpop@csse.unimelb.edu.au [Tue, 20 Feb 2007 19:07:31 +0000 (19:07 +0000)]
Constructor names in info tables

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.

17 years agoDoc typo
Ian Lynagh [Tue, 27 Feb 2007 12:57:31 +0000 (12:57 +0000)]
Doc typo

17 years agoDon't hardwire RELEASE into configure.ac
sven.panne@aedion.de [Sat, 24 Feb 2007 18:01:23 +0000 (18:01 +0000)]
Don't hardwire RELEASE into configure.ac

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.

17 years agoFix parsing of parallel array literals
Manuel M T Chakravarty [Sat, 24 Feb 2007 06:11:50 +0000 (06:11 +0000)]
Fix parsing of parallel array literals

17 years agoTidy up typechecking for newtypes
simonpj@microsoft.com [Fri, 23 Feb 2007 14:10:32 +0000 (14:10 +0000)]
Tidy up typechecking for newtypes

17 years agopthread_key_delete wants the key itself, not a pointer to it
Ian Lynagh [Fri, 23 Feb 2007 12:23:12 +0000 (12:23 +0000)]
pthread_key_delete wants the key itself, not a pointer to it

17 years agoWibble
Pepe Iborra [Fri, 23 Feb 2007 10:29:57 +0000 (10:29 +0000)]
Wibble

17 years agoMoved argument position info of ATs into tycon rhs info
Manuel M T Chakravarty [Fri, 23 Feb 2007 03:38:48 +0000 (03:38 +0000)]
Moved argument position info of ATs into tycon rhs info

17 years agoUnbreak HEAD
Pepe Iborra [Thu, 22 Feb 2007 18:12:01 +0000 (18:12 +0000)]
Unbreak HEAD

My previous patch was creating problems with hs-boot files.

17 years agoFree thread local storage on shutdown
Ian Lynagh [Thu, 22 Feb 2007 14:43:06 +0000 (14:43 +0000)]
Free thread local storage on shutdown

17 years agoupload documentation too
Simon Marlow [Thu, 22 Feb 2007 10:28:23 +0000 (10:28 +0000)]
upload documentation too

17 years agorefactoring
Simon Marlow [Thu, 22 Feb 2007 10:03:49 +0000 (10:03 +0000)]
refactoring

17 years agorefactoring only: remove unused code/imports
Simon Marlow [Thu, 11 Jan 2007 09:19:44 +0000 (09:19 +0000)]
refactoring only: remove unused code/imports

17 years agoImproving the performance of breakpoints up to 50% (by playing with laziness)
Pepe Iborra [Wed, 21 Feb 2007 18:56:49 +0000 (18:56 +0000)]
Improving the performance of breakpoints up to 50% (by playing with laziness)

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).

17 years agoFix the behaviour of :print with functions
Pepe Iborra [Wed, 21 Feb 2007 15:11:17 +0000 (15:11 +0000)]
Fix the behaviour of :print with functions

It now outputs "<function>" instead of showing them as thunks

17 years agoFix an incomplete pattern in the code for :print
Pepe Iborra [Wed, 21 Feb 2007 15:09:42 +0000 (15:09 +0000)]
Fix an incomplete pattern in the code for :print

17 years agoRemoved unnecessary code
Pepe Iborra [Mon, 19 Feb 2007 12:21:34 +0000 (12:21 +0000)]
Removed unnecessary code

The breakpointJump functions never show up in the code that the typechecker sees, as they are inserted by the desugarer later.

17 years agoAllow GADT syntax for newtypes
simonpj@microsoft.com [Wed, 21 Feb 2007 17:04:01 +0000 (17:04 +0000)]
Allow GADT syntax for newtypes

Fixes Trac #1154.   Please merge.
Tests are tc225, and tcfail176.

17 years agoImport trimming
simonpj@microsoft.com [Wed, 21 Feb 2007 16:53:12 +0000 (16:53 +0000)]
Import trimming

17 years agoDeal more correctly with orphan instances
simonpj@microsoft.com [Wed, 21 Feb 2007 16:30:47 +0000 (16:30 +0000)]
Deal more correctly with orphan instances

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.

17 years agoRemove dead code from FunDeps
simonpj@microsoft.com [Wed, 21 Feb 2007 13:13:40 +0000 (13:13 +0000)]
Remove dead code from FunDeps

I forgot to to this when refactoring some months ago!

17 years agoFix a deriving bug, arising from recent refactoring
simonpj@microsoft.com [Wed, 21 Feb 2007 12:47:39 +0000 (12:47 +0000)]
Fix a deriving bug, arising from recent refactoring

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.

17 years agoFix defaulting for overloaded strings
simonpj@microsoft.com [Wed, 21 Feb 2007 10:36:45 +0000 (10:36 +0000)]
Fix defaulting for overloaded strings

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!

17 years agoMERGE from 6.6: Windows fix for stdcall foreign-import-wrapper, fixes ffi012(ghci)
Simon Marlow [Wed, 21 Feb 2007 09:29:50 +0000 (09:29 +0000)]
MERGE from 6.6: Windows fix for stdcall foreign-import-wrapper, fixes ffi012(ghci)

17 years agoFix case-merge bug that was breaking the HEAD
simonpj@microsoft.com [Wed, 21 Feb 2007 09:11:23 +0000 (09:11 +0000)]
Fix case-merge bug that was breaking the HEAD

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).

17 years agoFix obscure bug in reportDeprecations
simonpj@microsoft.com [Tue, 20 Feb 2007 17:47:14 +0000 (17:47 +0000)]
Fix obscure bug in reportDeprecations

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

17 years agodescribe the Z-encoding for __stginit symbol names (addresses #1014)
Simon Marlow [Tue, 20 Feb 2007 13:25:32 +0000 (13:25 +0000)]
describe the Z-encoding for __stginit symbol names (addresses #1014)

17 years agofreeTaskManager: don't free Tasks that are still in use
Simon Marlow [Tue, 20 Feb 2007 09:54:56 +0000 (09:54 +0000)]
freeTaskManager: don't free Tasks that are still in use
See conc059.

17 years agoFix sleep delay for the non-threaded Windows RTS
Simon Marlow [Tue, 20 Feb 2007 09:07:16 +0000 (09:07 +0000)]
Fix sleep delay for the non-threaded Windows RTS
This is the Windows counterpart to "Make the non-threaded-RTS
threadDelay wait at least as long as asked"

17 years agoSignature type variables must not be instantiated with tycons
simonpj@microsoft.com [Mon, 19 Feb 2007 17:52:48 +0000 (17:52 +0000)]
Signature type variables must not be instantiated with tycons

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

17 years agoFixed a bug with the :print command spotted by Bernie Pope.
Pepe Iborra [Fri, 16 Feb 2007 20:10:52 +0000 (20:10 +0000)]
Fixed a bug with the :print command spotted by Bernie Pope.

Test ghci.debugger/scripts/print018 covers this

17 years agoUniform user interface
Pepe Iborra [Fri, 16 Feb 2007 19:54:24 +0000 (19:54 +0000)]
Uniform user interface

Print

"Breakpoint set at Main:26:13"

instead of

"Breakpoint set at (26,13)"

17 years agoTaught :breakpoint add to guess the module name if not given
Pepe Iborra [Fri, 16 Feb 2007 19:38:10 +0000 (19:38 +0000)]
Taught :breakpoint add to guess the module name if not given

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

17 years agoFix left-bias in ghci tab-completion code
Judah Jacobson [Wed, 14 Feb 2007 03:42:34 +0000 (03:42 +0000)]
Fix left-bias in ghci tab-completion code