ghc-hetmet.git
13 years agoLook through type synonyms when computing orphans
simonpj@microsoft.com [Wed, 26 Jan 2011 17:12:29 +0000 (17:12 +0000)]
Look through type synonyms when computing orphans

I renamed functions tyClsNamesOfTypes to oprhNamesOfType,
because it's only used in that capacity, and we therefore
want to look through type synonyms.  Similarly exprOrphNames.

This fixes Trac #4912.

13 years agoBleat a bit more informatively in unionLists
simonpj@microsoft.com [Wed, 26 Jan 2011 17:10:30 +0000 (17:10 +0000)]
Bleat a bit more informatively in unionLists

13 years agoKeep separate linker flags, for when we want to link with gcc or ld
Ian Lynagh [Mon, 24 Jan 2011 23:31:21 +0000 (23:31 +0000)]
Keep separate linker flags, for when we want to link with gcc or ld

13 years agoFix validate on OS X 64
Ian Lynagh [Mon, 24 Jan 2011 18:36:18 +0000 (18:36 +0000)]
Fix validate on OS X 64

13 years agoSplit main/GHC into GHC and GhcMake
simonpj@microsoft.com [Tue, 25 Jan 2011 16:16:32 +0000 (16:16 +0000)]
Split main/GHC into GHC and GhcMake

There are two things going on in main/GHC.hs.
  * It's the root module of the GHC package
  * It contains lots of stuff for --make
It is also gigantic (2.7k lines)

This patch splits it into two
  * GHC.hs is the root module for the GHC package
      (1.3k lines)
  * GhcMake.hs contains the stuff for --make
      (1.4k lines)

Happily the functional split divided it almost
exactly in half.

This is a pure refactoring.  There should be no
behavioural change.

13 years agoComments only
simonpj@microsoft.com [Tue, 25 Jan 2011 13:11:15 +0000 (13:11 +0000)]
Comments only

13 years agoFix Trac #3717 by making exprOkForSpeculation a bit cleverer
simonpj@microsoft.com [Tue, 25 Jan 2011 11:05:25 +0000 (11:05 +0000)]
Fix Trac #3717 by making exprOkForSpeculation a bit cleverer

The main change here is to do with dropping redundant seqs.
See Note [exprOkForSpeculation: case expressions] in CoreUtils.

13 years agoImprove dataToTag# magic
simonpj@microsoft.com [Tue, 25 Jan 2011 11:04:18 +0000 (11:04 +0000)]
Improve dataToTag# magic

dataToTag# is a bit unsatisfactory because it requires
its argument to be evaluated, and we don't have a good
way to enforce that. This patch adds some comments, and
makes exprOkForSpeculation a bit less picky in the case
of dataToTag# (since the argument may, in fact, not be
eval'd).

13 years agoFix Trac #4917: try a bit harder to unify on-the-fly
simonpj@microsoft.com [Tue, 25 Jan 2011 11:01:12 +0000 (11:01 +0000)]
Fix Trac #4917: try a bit harder to unify on-the-fly

This is generally a modest improvement but, more important,
it fixes a "unify-under-forall" problem.  See Note [Avoid deferring].

There's still a lurking unsatisfactory-ness in that we can't
defer arbitrary constraints that are trapped under a forall.

13 years agoDPH options updated
Manuel M T Chakravarty [Mon, 24 Jan 2011 04:36:17 +0000 (04:36 +0000)]
DPH options updated
- '-Odph' is now '-O2 -fsimplifier-phases=3 -fsimplifier-iterations=20'
- The new option '-fdph-none' is the default; it indicates that no DPH
  backend is selected and is the only valid option if the DPH libraries
  are not installed.  If vectorisation is attempted with -fdph-none a
  suitable error message is generated.
- Hence, '-fdph-par' (or '-fdph-seq') needs to be explicitly selected
  when using vectorisation and when linking vectorised code.  (There
  seems to be no elegant way to avoid that.)

13 years agoAdd build system profiling to build system
Ian Lynagh [Sun, 23 Jan 2011 15:14:08 +0000 (15:14 +0000)]
Add build system profiling to build system

13 years agoFix ghci in stage3
Ian Lynagh [Sun, 23 Jan 2011 12:02:32 +0000 (12:02 +0000)]
Fix ghci in stage3

13 years agoRemove use of non-existent $$(dir) variable in the rts ghc.mk
Ian Lynagh [Sun, 23 Jan 2011 02:18:15 +0000 (02:18 +0000)]
Remove use of non-existent $$(dir) variable in the rts ghc.mk

13 years agoAdd some missing dependencies
Ian Lynagh [Sun, 23 Jan 2011 00:42:08 +0000 (00:42 +0000)]
Add some missing dependencies

13 years agoTweak some deps to avoid multiple $(wildcard ...)s
Ian Lynagh [Sun, 23 Jan 2011 00:10:45 +0000 (00:10 +0000)]
Tweak some deps to avoid multiple $(wildcard ...)s
Note that some things depending on the rts/includes header files now
depend on more files: They used to include depend on includes/*.h, but
now they also depend on header files in subdirectories. As far as I can
see this was a bug.

13 years agoUse := when assigning the result of $(wildcard ...)
Ian Lynagh [Sat, 22 Jan 2011 22:45:32 +0000 (22:45 +0000)]
Use := when assigning the result of $(wildcard ...)
Avoids repeated evaluations of things that need system calls etc

13 years agoSimplify the build system, and remove 2 phases
Ian Lynagh [Sat, 22 Jan 2011 19:09:28 +0000 (19:09 +0000)]
Simplify the build system, and remove 2 phases
From
    http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture/Idiom/PhaseOrdering

Phase 0:
    Includes: package-data.mk files for things built by the
              bootstrapping compiler.
    Builds:   the dependency files for hsc2hs and genprimopcode. We need
              to do this now, as hsc2hs needs to be buildable in phase 1's
              includes (so that we can make the hpc library's .hs source
              files, which in turn is necessary for making its dependency
              files), and genprimopcode needs to be buildable in phase 1's
              includes (so that we can make the primop-*.hs-incl files,
              which are sources for the stage1 compiler library, and thus
              necessary for making its dependency files).
Phase 1:
    Includes: dependency files for things built by the bootstrapping
              compiler.
    Builds:   package-data.mk files for everything else. Note that this
              requires configuring the packages, which means telling cabal
              which ghc to use, and thus the stage1 compiler gets built
              during this phase.
Phase "":
    Includes: dependency files for everything else.
    Builds:   Everything else.

13 years agoManually control more of the Cabal flags for the compiler and ghc packages
Ian Lynagh [Fri, 21 Jan 2011 23:05:52 +0000 (23:05 +0000)]
Manually control more of the Cabal flags for the compiler and ghc packages
For some reason the Windows HEAD builder has started thinking the ghci
flag should be on in stage 1. This should fix it, and generally make
things a little more resilient.

13 years agoRemove some hardcoded makefile settings
Ian Lynagh [Fri, 21 Jan 2011 23:02:45 +0000 (23:02 +0000)]
Remove some hardcoded makefile settings
Now that we used cabal to configure the ghc-bin package they are no
longer needed.

13 years agotweak newArray# documentation again
Simon Marlow [Wed, 19 Jan 2011 14:06:33 +0000 (14:06 +0000)]
tweak newArray# documentation again

13 years agoFix OSTYPE test
Ian Lynagh [Thu, 20 Jan 2011 00:03:08 +0000 (00:03 +0000)]
Fix OSTYPE test

13 years agoComments only
simonpj@microsoft.com [Wed, 19 Jan 2011 22:22:47 +0000 (22:22 +0000)]
Comments only

13 years agoAdd OSTYPE build-system variable, and use it
simonpj@microsoft.com [Thu, 13 Jan 2011 15:50:23 +0000 (15:50 +0000)]
Add OSTYPE build-system variable, and use it

The use is in install.mk.in, where we need to know when
we're on Cygwin.

This fixes the build on my Windows box, where I have
both Msys and Cygwin.

13 years agoRemove an extraneous comma that stopped ghc-cabal from building
Ian Lynagh [Wed, 19 Jan 2011 22:23:59 +0000 (22:23 +0000)]
Remove an extraneous comma that stopped ghc-cabal from building

13 years agoMove some make variables around
Ian Lynagh [Wed, 19 Jan 2011 22:15:45 +0000 (22:15 +0000)]
Move some make variables around

13 years agoRemove a debugging 'info'
Ian Lynagh [Wed, 19 Jan 2011 20:33:05 +0000 (20:33 +0000)]
Remove a debugging 'info'

13 years agoMove the PACKAGE_MAGIC evaluation inside package-data.mk
Ian Lynagh [Wed, 19 Jan 2011 20:32:29 +0000 (20:32 +0000)]
Move the PACKAGE_MAGIC evaluation inside package-data.mk

13 years agoFix libraries/index.html's haddock dependency on Windows
Ian Lynagh [Wed, 19 Jan 2011 17:23:10 +0000 (17:23 +0000)]
Fix libraries/index.html's haddock dependency on Windows

13 years agoAdd configure phases for the stage 3 compiler
Ian Lynagh [Wed, 19 Jan 2011 13:06:29 +0000 (13:06 +0000)]
Add configure phases for the stage 3 compiler

13 years agoInclude kfreebsdgnu in the list of Target Platforms.
Marco Silva [Tue, 18 Jan 2011 22:23:52 +0000 (22:23 +0000)]
Include kfreebsdgnu in the list of Target Platforms.

13 years agoFix documentation bug: newArray# accepts word count, not byte count.
Edward Z. Yang [Tue, 18 Jan 2011 22:18:34 +0000 (22:18 +0000)]
Fix documentation bug: newArray# accepts word count, not byte count.

13 years agoUpdate the location of libffi.dll.a
Ian Lynagh [Tue, 18 Jan 2011 16:42:25 +0000 (16:42 +0000)]
Update the location of libffi.dll.a
As far as I can see this has been wrong for some time, but only bit
recently.

13 years agoUpdate the generics docs; pointed out by Christian Maeder
Ian Lynagh [Mon, 17 Jan 2011 21:46:32 +0000 (21:46 +0000)]
Update the generics docs; pointed out by Christian Maeder

13 years agoghc-cabal now adds the language flag being used
Ian Lynagh [Mon, 17 Jan 2011 18:48:33 +0000 (18:48 +0000)]
ghc-cabal now adds the language flag being used
This means we get -XHaskell98 added to the list of flags, just like we
would if we were building with Cabal.

13 years agoReinstate the OS X flags in the LDFLAGS etc variables
Ian Lynagh [Mon, 17 Jan 2011 20:05:40 +0000 (20:05 +0000)]
Reinstate the OS X flags in the LDFLAGS etc variables
I expect this will fix:
http://www.haskell.org/pipermail/cvs-ghc/2011-January/059098.html

13 years agoAdd NondecreasingIndentation extension to ghc-bin
Ian Lynagh [Mon, 17 Jan 2011 20:04:27 +0000 (20:04 +0000)]
Add NondecreasingIndentation extension to ghc-bin

13 years agoChange an "if ... else return ()" into a "when"
Ian Lynagh [Mon, 17 Jan 2011 19:17:14 +0000 (19:17 +0000)]
Change an "if ... else return ()" into a "when"

13 years agoAdd NondecreasingIndentation to the list of extensions in ghc-pkg
Ian Lynagh [Mon, 17 Jan 2011 19:06:10 +0000 (19:06 +0000)]
Add NondecreasingIndentation to the list of extensions in ghc-pkg

13 years agoAdd NondecreasingIndentation to the list of extensions in the ghc package
Ian Lynagh [Mon, 17 Jan 2011 19:04:04 +0000 (19:04 +0000)]
Add NondecreasingIndentation to the list of extensions in the ghc package

13 years agoFix deps on the ghc package
Ian Lynagh [Mon, 17 Jan 2011 17:30:10 +0000 (17:30 +0000)]
Fix deps on the ghc package
The standard libraries/$depname scheme doesn't apply, so we need to
handle it specially.

13 years agoTidy up gmp cleaning
Ian Lynagh [Mon, 17 Jan 2011 12:11:55 +0000 (12:11 +0000)]
Tidy up gmp cleaning

13 years agoRemove redundant libraries/cabal-bin.hs
Ian Lynagh [Sun, 16 Jan 2011 19:49:19 +0000 (19:49 +0000)]
Remove redundant libraries/cabal-bin.hs

13 years agoTurn off dtrace unless you override USE_DTRACE
Ian Lynagh [Sun, 16 Jan 2011 18:03:06 +0000 (18:03 +0000)]
Turn off dtrace unless you override USE_DTRACE
There are problems with dtrace on 64bit 10.5. For now at least, we
just turn dtrace off unless you override USE_DTRACE

13 years agoSimplify a bit of makefile
Ian Lynagh [Sun, 16 Jan 2011 17:52:18 +0000 (17:52 +0000)]
Simplify a bit of makefile

13 years agoTweak Windows phase ordering
Ian Lynagh [Sun, 16 Jan 2011 17:34:59 +0000 (17:34 +0000)]
Tweak Windows phase ordering

13 years agoHandle dependencies of programs on libraries correctly
Ian Lynagh [Sun, 16 Jan 2011 15:56:27 +0000 (15:56 +0000)]
Handle dependencies of programs on libraries correctly

13 years agoIt's not clear if LDFLAGS flags will be given to gcc or ld,
Ian Lynagh [Sun, 16 Jan 2011 15:12:30 +0000 (15:12 +0000)]
It's not clear if LDFLAGS flags will be given to gcc or ld,
and they accept different flags, so for now do nothing

13 years agoFix cross-package dependency generation on Windows
Ian Lynagh [Sun, 16 Jan 2011 15:09:01 +0000 (15:09 +0000)]
Fix cross-package dependency generation on Windows

13 years agoAdd some Windows-only CONFIGURE_PHASEs
Ian Lynagh [Sun, 16 Jan 2011 15:08:26 +0000 (15:08 +0000)]
Add some Windows-only CONFIGURE_PHASEs

13 years agoSimplify, and future-proof, a dependency in the build system
Ian Lynagh [Sun, 16 Jan 2011 02:00:35 +0000 (02:00 +0000)]
Simplify, and future-proof, a dependency in the build system

13 years agoRemove an unnecessary phase, and some unnecessary deps
Ian Lynagh [Sun, 16 Jan 2011 01:59:43 +0000 (01:59 +0000)]
Remove an unnecessary phase, and some unnecessary deps
now that cross-package deps are tracked correctly.

13 years agoWe can now pass -include-pkg-deps to the bootstrapping compiler
Ian Lynagh [Sun, 16 Jan 2011 01:57:14 +0000 (01:57 +0000)]
We can now pass -include-pkg-deps to the bootstrapping compiler

13 years agoRemove some flags that are redundant now GHC gets configured by Cabal
Ian Lynagh [Sun, 16 Jan 2011 00:31:54 +0000 (00:31 +0000)]
Remove some flags that are redundant now GHC gets configured by Cabal

13 years agoChange some HC_OPTS var handling
Ian Lynagh [Sun, 16 Jan 2011 00:31:04 +0000 (00:31 +0000)]
Change some HC_OPTS var handling
In particular, this means ghc gets built with -rtsopt, -threaded, etc again.

13 years agoRemove some unnecessary workarounds
Ian Lynagh [Sun, 16 Jan 2011 00:28:03 +0000 (00:28 +0000)]
Remove some unnecessary workarounds
We can now rely on cross-package deps working properly, as we require
GHC 6.12.

13 years agoTidy up a bit
Ian Lynagh [Sun, 16 Jan 2011 00:11:21 +0000 (00:11 +0000)]
Tidy up a bit

13 years agoBuild system improvements
Ian Lynagh [Sat, 15 Jan 2011 23:19:27 +0000 (23:19 +0000)]
Build system improvements
We no longer use dummy-ghc; instead we don't configure most packages
until the stage1 compiler is available.

We also now use Cabal for building the ghc-bin package.

There are a couple more sanity checks too.

13 years agoWhitespace tweak
Ian Lynagh [Sat, 15 Jan 2011 21:41:49 +0000 (21:41 +0000)]
Whitespace tweak

13 years agoFix libffi build rules
Ian Lynagh [Sat, 15 Jan 2011 20:21:04 +0000 (20:21 +0000)]
Fix libffi build rules
Fixes a rare race when both libHSffi.a and libHSffi_p.a were being built
at the same time:

"cp" libffi/dist-install/build/libffi.a libffi/dist-install/build/libHSffi.a
"cp" libffi/dist-install/build/libffi.a libffi/dist-install/build/libHSffi.a
"cp" libffi/dist-install/build/libffi.so libffi/dist-install/build/libHSffi-ghc7.1.20110115.so
cp: cannot create regular file `libffi/dist-install/build/libHSffi.a': File exists

13 years agoFix Trac #4874: specialisation of INLINABLE things
simonpj@microsoft.com [Fri, 14 Jan 2011 16:32:27 +0000 (16:32 +0000)]
Fix Trac #4874: specialisation of INLINABLE things

Johan discovered that when INLINABLE things are specialised
bad things can happen. This patch implements a hack -- but
it's a simple hack and it solves the problem.

See Note [Inline specialisations].

The hack part is that really INLINABLE should not cause *any* loss
optimisation, and it does; see Note [Don't w/w INLINABLE things] in
WorkWrap.

13 years agoComments only
simonpj@microsoft.com [Fri, 14 Jan 2011 16:29:59 +0000 (16:29 +0000)]
Comments only

13 years agoFix a buglet in postInlineUnconditionally
simonpj@microsoft.com [Fri, 14 Jan 2011 16:29:27 +0000 (16:29 +0000)]
Fix a buglet in postInlineUnconditionally

Under obscure circumstances (actually only shown up when fixing something
else) it was possible for a variable binding to be discarded although
it was still used.  See Note [Top level and postInlineUnconditionally]

13 years agocope with empty libraries/stamp directory (in git repo)
Simon Marlow [Fri, 14 Jan 2011 14:24:06 +0000 (14:24 +0000)]
cope with empty libraries/stamp directory (in git repo)

13 years agoadd .gitignore
Simon Marlow [Fri, 14 Jan 2011 14:23:53 +0000 (14:23 +0000)]
add .gitignore

13 years agoFix longstanding bug in C-- inlining for functions calls.
Edward Z. Yang [Thu, 13 Jan 2011 13:06:54 +0000 (13:06 +0000)]
Fix longstanding bug in C-- inlining for functions calls.

13 years agofix for remote repos without -r
Simon Marlow [Thu, 13 Jan 2011 13:11:47 +0000 (13:11 +0000)]
fix for remote repos without -r

13 years agoadd a version of packages that stores all the repos in git
Simon Marlow [Thu, 13 Jan 2011 11:17:33 +0000 (11:17 +0000)]
add a version of packages that stores all the repos in git

13 years agoadd the -r flag from darcs-all
Simon Marlow [Thu, 13 Jan 2011 11:16:54 +0000 (11:16 +0000)]
add the -r flag from darcs-all

13 years agoMake Template Haskell classInstances function return [ClassInstance]
simonpj@microsoft.com [Thu, 13 Jan 2011 11:14:21 +0000 (11:14 +0000)]
Make Template Haskell classInstances function return [ClassInstance]

This is a recently-introduce function, which was returning
a [Name], being the names of the dfuns.  But what you really
want (obviously!) is the ClassInstances, and we have a TH type
for that.

This is an API change, so don't merge into GHC 7.0.  But it's
a new part of TH which is still settling down.

Fixes Trac #4863.

13 years agoImprove the finder's error messages
simonpj@microsoft.com [Thu, 13 Jan 2011 11:12:33 +0000 (11:12 +0000)]
Improve the finder's error messages

I'd done all the work to add fuzzy-match suggestions, but they
weren't really being used!  Here's what you get now

   module Foo where
    import Data.Lst

Foo.hs:3:1:
    Failed to load interface for `Data.Lst'
    Perhaps you meant
      Data.List (from base)
      Data.List (needs flag -package haskell2010-1.0.0.0)
      Data.Int (needs flag -package haskell2010-1.0.0.0)
    Use -v to see a list of the files searched for.

13 years agoWhite space only
simonpj@microsoft.com [Thu, 13 Jan 2011 09:39:31 +0000 (09:39 +0000)]
White space only

13 years agoProduce an error message, not a crash, for HsOpApp with non-var operator
simonpj@microsoft.com [Wed, 12 Jan 2011 17:07:19 +0000 (17:07 +0000)]
Produce an error message, not a crash, for HsOpApp with non-var operator

Fixes Trac #4877.

13 years agoupdate to work with current packages file format
Simon Marlow [Wed, 12 Jan 2011 16:02:24 +0000 (16:02 +0000)]
update to work with current packages file format

13 years agoIn configure, test that GHC generates code for the correct platform (#4819)
Simon Marlow [Fri, 7 Jan 2011 16:35:41 +0000 (16:35 +0000)]
In configure, test that GHC generates code for the correct platform (#4819)
Patch supplied by the bug reporter, tidied up by me.

$ ./configure --with-ghc=$HOME/fp/bin/i386-unknown-linux/ghc --build=x86_64-unknown-linux
checking for gfind... no
checking for find... /usr/bin/find
checking for sort... /usr/bin/sort
checking for GHC version date... inferred 7.1.20110107
checking version of ghc... 7.0.1
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Host platform inferred as: i386-unknown-linux
Target platform inferred as: i386-unknown-linux
This GHC (/home/simonmar/fp/bin/i386-unknown-linux/ghc) does not generate code for the build platform
   GHC target platform    : i386-unknown-linux
   Desired build platform : x86_64-unknown-linux

13 years agoMajor refactoring of the type inference engine
simonpj@microsoft.com [Wed, 12 Jan 2011 14:56:04 +0000 (14:56 +0000)]
Major refactoring of the type inference engine

This patch embodies many, many changes to the contraint solver, which
make it simpler, more robust, and more beautiful.  But it has taken
me ages to get right. The forcing issue was some obscure programs
involving recursive dictionaries, but these eventually led to a
massive refactoring sweep.

Main changes are:
 * No more "frozen errors" in the monad.  Instead "insoluble
   constraints" are now part of the WantedConstraints type.

 * The WantedConstraint type is a product of bags, instead of (as
   before) a bag of sums.  This eliminates a good deal of tagging and
   untagging.

 * This same WantedConstraints data type is used
     - As the way that constraints are gathered
     - As a field of an implication constraint
     - As both argument and result of solveWanted
     - As the argument to reportUnsolved

 * We do not generate any evidence for Derived constraints. They are
   purely there to allow "impovement" by unifying unification
   variables.

 * In consequence, nothing is ever *rewritten* by a Derived
   constraint.  This removes, by construction, all the horrible
   potential recursive-dictionary loops that were making us tear our
   hair out.  No more isGoodRecEv search either. Hurrah!

 * We add the superclass Derived constraints during canonicalisation,
   after checking for duplicates.  So fewer superclass constraints
   are generated than before.

 * Skolem tc-tyvars no longer carry SkolemInfo.  Instead, the
   SkolemInfo lives in the GivenLoc of the Implication, where it
   can be tidied, zonked, and substituted nicely.  This alone is
   a major improvement.

 * Tidying is improved, so that we tend to get t1, t2, t3, rather
   than t1, t11, t111, etc

   Moreover, unification variables are always printed with a digit
   (thus a0, a1, etc), so that plain 'a' is available for a skolem
   arising from a type signature etc. In this way,
     (a) We quietly say which variables are unification variables,
         for those who know and care
     (b) Types tend to get printed as the user expects.  If he writes
             f :: a -> a
             f = ...blah...
         then types involving 'a' get printed with 'a', rather than
         some tidied variant.

 * There are significant improvements in error messages, notably
   in the "Cannot deduce X from Y" messages.

13 years agoFix installation on cygwin
Ian Lynagh [Tue, 11 Jan 2011 19:48:38 +0000 (19:48 +0000)]
Fix installation on cygwin

13 years agoDo dependency analysis when kind-checking type declarations
simonpj@microsoft.com [Mon, 10 Jan 2011 11:03:51 +0000 (11:03 +0000)]
Do dependency analysis when kind-checking type declarations

This patch fixes Trac #4875.  The main point is to do dependency
analysis on type and class declarations, and kind-check them in
dependency order, so as to improve error messages.

This patch means that a few programs that would typecheck before won't
typecheck any more; but before we were (naughtily) going beyond
Haskell 98 without any language-extension flags, and Trac #4875
convinces me that doing so is a Bad Idea.

Here's an example that won't typecheck any more
       data T a b = MkT (a b)
       type F k = T k Maybe

If you look at T on its own you'd default 'a' to kind *->*;
and then kind-checking would fail on F.

But GHC currently accepts this program beause it looks at
the *occurrences* of T.

13 years agoMove imports around (no change in behaviour)
simonpj@microsoft.com [Mon, 10 Jan 2011 10:56:47 +0000 (10:56 +0000)]
Move imports around (no change in behaviour)

13 years agoMake fuzzy matching a little less eager for short identifiers
simonpj@microsoft.com [Fri, 7 Jan 2011 10:28:55 +0000 (10:28 +0000)]
Make fuzzy matching a little less eager for short identifiers

For single-character identifiers we now don't make any suggestions
See comments in Util.fuzzyLookup

13 years agoFix Trac #4870: get the inlining for an imported INLINABLE Id
simonpj@microsoft.com [Wed, 5 Jan 2011 00:27:12 +0000 (00:27 +0000)]
Fix Trac #4870: get the inlining for an imported INLINABLE Id

We need the unfolding even for a *recursive* function (indeed
that's the point) and I was using the wrong function to get it
(idUnfolding rather than realIdUnfolding).

13 years agoRejig the includes/ installation rules
Ian Lynagh [Sun, 9 Jan 2011 18:11:58 +0000 (18:11 +0000)]
Rejig the includes/ installation rules
They're a little nicer now, and a regression in the cygwin build is
fixed (the $i in the destination wasn't surviving being passed through
cygpath).

13 years agoMake DESTDIR an absolute path when installing; fixes #4883
Ian Lynagh [Sat, 8 Jan 2011 17:16:35 +0000 (17:16 +0000)]
Make DESTDIR an absolute path when installing; fixes #4883

13 years agoAdd utils/ghc-cabal/Makefile
Ian Lynagh [Sat, 8 Jan 2011 14:40:49 +0000 (14:40 +0000)]
Add utils/ghc-cabal/Makefile

13 years agoRemove redundant import
Ian Lynagh [Sat, 8 Jan 2011 13:00:47 +0000 (13:00 +0000)]
Remove redundant import

13 years agoImprove error message of :set in ghci (ticket #4190).
Michal Terepeta [Tue, 30 Nov 2010 21:15:05 +0000 (21:15 +0000)]
Improve error message of :set in ghci (ticket #4190).

13 years agoImprove error message when importing data constructors (ticket #4058).
Michal Terepeta [Sat, 27 Nov 2010 21:13:38 +0000 (21:13 +0000)]
Improve error message when importing data constructors (ticket #4058).

13 years agocatch SIGTSTP and save/restore terminal settings (#4460)
Simon Marlow [Fri, 7 Jan 2011 12:40:42 +0000 (12:40 +0000)]
catch SIGTSTP and save/restore terminal settings (#4460)
As far as I can tell, it is the responsibility of the program to save
and restore its own terminal settings across a suspend/foreground, the
shell doesn't do it (which seems odd).  So I've added a signal handler
for SIGTSTP to the RTS which will save and restore the terminal
settings iff we modified them with hSetBuffering or hSetEcho (we
already restore them at exit time in these cases).

13 years agocomment updates
Simon Marlow [Fri, 7 Jan 2011 09:42:36 +0000 (09:42 +0000)]
comment updates

13 years agoOn Cygwin, use a Cygwin-style path for /bin/install's destination
Ian Lynagh [Thu, 6 Jan 2011 22:30:30 +0000 (22:30 +0000)]
On Cygwin, use a Cygwin-style path for /bin/install's destination

cygwin's /bin/install doesn't set file modes correctly if the
destination path is a C: style path:

$ /bin/install -c -m 644 foo /cygdrive/c/cygwin/home/ian/foo2
$ /bin/install -c -m 644 foo c:/cygwin/home/ian/foo3
$ ls -l foo*
-rw-r--r-- 1 ian None 0 2011-01-06 18:28 foo
-rw-r--r-- 1 ian None 0 2011-01-06 18:29 foo2
-rwxrwxrwx 1 ian None 0 2011-01-06 18:29 foo3

This causes problems for bindisttest/checkBinaries.sh which then
thinks that e.g. the userguide HTML files are binaries.

We therefore use a /cygdrive path if we are on cygwin

13 years agoFix mkUserGuidePart program name on Windows
Ian Lynagh [Thu, 6 Jan 2011 14:37:07 +0000 (14:37 +0000)]
Fix mkUserGuidePart program name on Windows

13 years agoadd comment to remind people to update driver/gcc/gcc.c
Simon Marlow [Thu, 6 Jan 2011 15:24:02 +0000 (15:24 +0000)]
add comment to remind people to update driver/gcc/gcc.c

13 years agouse Win32 CreateProcess() rather than mingw spawnv() (#4531)
Simon Marlow [Thu, 6 Jan 2011 13:38:34 +0000 (13:38 +0000)]
use Win32 CreateProcess() rather than mingw spawnv() (#4531)

13 years agoupdate paths now that we upgraded gcc to 4.5.0
Simon Marlow [Thu, 6 Jan 2011 13:37:29 +0000 (13:37 +0000)]
update paths now that we upgraded gcc to 4.5.0

13 years agofix markup
Simon Marlow [Thu, 6 Jan 2011 09:31:52 +0000 (09:31 +0000)]
fix markup

13 years agofix up multi-line GHCi patch (#4316)
Simon Marlow [Wed, 5 Jan 2011 15:45:48 +0000 (15:45 +0000)]
fix up multi-line GHCi patch (#4316)

13 years agomultiline commands in GHCi #4316
Vivian McPhail [Fri, 5 Nov 2010 05:13:08 +0000 (05:13 +0000)]
multiline commands in GHCi #4316
This patch adds support for multiline commands in GHCi.

The first line of input is lexed.  If there is an active
layout context once the lexer reaches the end of file, the
user is prompted for more input.

Multiline input is exited by an empty line and can be escaped
with a user interrupt.

Multiline mode is toggled with `:set +m`

13 years agoReplace a #if with a Haskell conditional
Ian Lynagh [Wed, 5 Jan 2011 18:30:11 +0000 (18:30 +0000)]
Replace a #if with a Haskell conditional

13 years agoWhitespace only in X86.Ppr
Ian Lynagh [Wed, 5 Jan 2011 17:11:24 +0000 (17:11 +0000)]
Whitespace only in X86.Ppr

13 years agoFix error compiling AsmCodeGen.lhs for PPC Mac (unused makeFar addr)
naur@post11.tele.dk [Sun, 19 Dec 2010 21:35:55 +0000 (21:35 +0000)]
Fix error compiling AsmCodeGen.lhs for PPC Mac (unused makeFar addr)

13 years agoDefine cTargetArch and start to use it rather than ifdefs
Ian Lynagh [Tue, 4 Jan 2011 22:00:13 +0000 (22:00 +0000)]
Define cTargetArch and start to use it rather than ifdefs
Using Haskell conditionals means the compiler sees all the code, so
there should be less rot of code specific to uncommon arches. Code
for other platforms should still be optimised away, although if we want
to support targetting other arches then we'll need to compile it
for-real anyway.