ghc-hetmet.git
13 years agoMidstream changes to deal with spontaneous solving and flatten skolem equivalence...
dimitris@microsoft.com [Tue, 19 Oct 2010 17:15:14 +0000 (17:15 +0000)]
Midstream changes to deal with spontaneous solving and flatten skolem equivalence classes

13 years agohasktags was dropped in GHC 6.12, remove it from the docs
Simon Marlow [Mon, 18 Oct 2010 08:44:01 +0000 (08:44 +0000)]
hasktags was dropped in GHC 6.12, remove it from the docs

13 years agoRefactor, plus fix Trac #4418
simonpj@microsoft.com [Wed, 20 Oct 2010 09:09:46 +0000 (09:09 +0000)]
Refactor, plus fix Trac #4418

We weren't doing fundeps for derived superclasses

13 years agoAdd a comment, connecting the seq to the test (#4367) that shows its usefulness
simonpj@microsoft.com [Wed, 20 Oct 2010 07:59:41 +0000 (07:59 +0000)]
Add a comment, connecting the seq to the test (#4367) that shows its usefulness

13 years agoDefine setIdUnfoldingLazily, and use it in Vectorise
Ian Lynagh [Tue, 19 Oct 2010 20:15:37 +0000 (20:15 +0000)]
Define setIdUnfoldingLazily, and use it in Vectorise
Fixes a loop in the compiler, when running the dph tests

13 years agoEvaluate the results in coreToStgApp
Ian Lynagh [Tue, 19 Oct 2010 17:05:32 +0000 (17:05 +0000)]
Evaluate the results in coreToStgApp

13 years agoRetab CoreToStg, and remove trailing whitespace
Ian Lynagh [Tue, 19 Oct 2010 15:55:30 +0000 (15:55 +0000)]
Retab CoreToStg, and remove trailing whitespace

13 years agoseq the unfolding in setUnfoldingInfo
Ian Lynagh [Tue, 19 Oct 2010 15:45:52 +0000 (15:45 +0000)]
seq the unfolding in setUnfoldingInfo
Contrary to the comment, for the module in #4367 at least, it is a big
improvement. Without it we get a huge spike of drag.

13 years agoComments only
simonpj@microsoft.com [Tue, 19 Oct 2010 15:35:31 +0000 (15:35 +0000)]
Comments only

13 years agoFix debugger
simonpj@microsoft.com [Tue, 19 Oct 2010 15:35:22 +0000 (15:35 +0000)]
Fix debugger

A bit yukky; see Note [Runtime skolems] in TcErrors.
But it works, and the debugger just is yukky in places.

13 years agoFix IPRun by fixing the inferred quantification mechanism
simonpj@microsoft.com [Tue, 19 Oct 2010 09:02:20 +0000 (09:02 +0000)]
Fix IPRun by fixing the inferred quantification mechanism

13 years agoRecover after an error in an implication constraint
simonpj@microsoft.com [Tue, 19 Oct 2010 09:02:02 +0000 (09:02 +0000)]
Recover after an error in an implication constraint

13 years agoReject programs with equality superclasses for now
simonpj@microsoft.com [Tue, 19 Oct 2010 09:01:40 +0000 (09:01 +0000)]
Reject programs with equality superclasses for now

13 years agoLayout and tiny refactoring only
simonpj@microsoft.com [Tue, 19 Oct 2010 09:01:24 +0000 (09:01 +0000)]
Layout and tiny refactoring only

13 years agoClean up the debugger code
simonpj@microsoft.com [Tue, 19 Oct 2010 09:01:00 +0000 (09:01 +0000)]
Clean up the debugger code

In particular there is much less fiddly skolemisation now
Things are not *quite* right (break001 and 006 still fail),
but they are *much* better than before.

13 years agoAdd new VarEnv functions minusVarEnv, intersectsVarEnv, unionInScope
simonpj@microsoft.com [Tue, 19 Oct 2010 08:56:09 +0000 (08:56 +0000)]
Add new VarEnv functions minusVarEnv, intersectsVarEnv, unionInScope

13 years agoMajor pass through type checker:(1) prioritizing equalities, (2) improved Derived...
dimitris@microsoft.com [Mon, 18 Oct 2010 15:15:10 +0000 (15:15 +0000)]
Major pass through type checker:(1) prioritizing equalities, (2) improved Derived mechanism, (3) bugfixes

13 years ago(1) Caching FD improvements for efficiency, (2) preventing cascading deriveds from...
dimitris@microsoft.com [Fri, 15 Oct 2010 16:44:21 +0000 (16:44 +0000)]
(1) Caching FD improvements for efficiency, (2) preventing cascading deriveds from entering the inert, (3) Fixing bugs in the creation of FlexiTcS variables

13 years agoMidstream changes for performance improvement related to superclasses and functional...
dimitris@microsoft.com [Thu, 14 Oct 2010 14:38:11 +0000 (14:38 +0000)]
Midstream changes for performance improvement related to superclasses and functional dependencies.

13 years agoMinor
dimitris@microsoft.com [Tue, 12 Oct 2010 08:09:51 +0000 (08:09 +0000)]
Minor

13 years agoCommentary changes
dimitris@microsoft.com [Mon, 11 Oct 2010 14:22:35 +0000 (14:22 +0000)]
Commentary changes

13 years agoKind checking bugfix (#4356) and preventing wanteds from rewriting wanteds
dimitris@microsoft.com [Fri, 8 Oct 2010 17:37:00 +0000 (17:37 +0000)]
Kind checking bugfix (#4356) and preventing wanteds from rewriting wanteds

13 years agoFix a retainer profiling segfault
Ian Lynagh [Tue, 19 Oct 2010 13:27:27 +0000 (13:27 +0000)]
Fix a retainer profiling segfault
The bitmap type wasn't big enough to hold large bitmaps on 64 bit
platforms. Profiling GHC was segfaulting when retainStack was handling a
size 33 bitmap.

13 years agoFix -auto-all: Add SCCs to IDs which have a monotype too
Ian Lynagh [Mon, 18 Oct 2010 15:39:57 +0000 (15:39 +0000)]
Fix -auto-all: Add SCCs to IDs which have a monotype too

13 years agoDefine SpecConstrAnnotation in GHC.Exts, and import it from there
simonpj@microsoft.com [Mon, 18 Oct 2010 13:57:46 +0000 (13:57 +0000)]
Define SpecConstrAnnotation in GHC.Exts, and import it from there

Reason: avoid having to link the entire ghc package in modules
that use compile-time annotations:

     import GHC.Exts( SpecConstrAnnotation )
     {-# ANN type T ForceSpecConstr #-}

It's a kind of bug that the package exporting SpecConstrAnnotation
is linked even though it is only needed at compile time, but putting
the data type declaration in GHC.Exts is a simple way to sidestep
the problem

See See Note [SpecConstrAnnotation] in SpecConstr

13 years agoFix warnings in AsmCodeGen
David Terei [Thu, 7 Oct 2010 14:35:59 +0000 (14:35 +0000)]
Fix warnings in AsmCodeGen

13 years agoLLVM: Fix compilation of writebarrier, #4308
David Terei [Mon, 4 Oct 2010 15:38:43 +0000 (15:38 +0000)]
LLVM: Fix compilation of writebarrier, #4308

13 years agoChange how the OS X installer's create-links finds the versin number
Ian Lynagh [Sun, 17 Oct 2010 12:23:52 +0000 (12:23 +0000)]
Change how the OS X installer's create-links finds the versin number
It now gets created by configure, rather than trying to work out the
version number at runtime.

13 years agoAdd more quoting to distrib/MacOS/installer-scripts/create-links
Ian Lynagh [Sun, 17 Oct 2010 11:26:48 +0000 (11:26 +0000)]
Add more quoting to distrib/MacOS/installer-scripts/create-links

13 years agochange os x installer to allow multiple installed versions
Evan Laforge [Wed, 29 Sep 2010 23:45:38 +0000 (23:45 +0000)]
change os x installer to allow multiple installed versions
This puts the ghc version into the package name so they are considered separate
packages.

13 years agoOnly put the boot packages in the haddock contents/index
Ian Lynagh [Sat, 16 Oct 2010 18:00:31 +0000 (18:00 +0000)]
Only put the boot packages in the haddock contents/index
We don't install dph etc, so don't put them in the doc index.

13 years agoCorrect the regexp used to search for extra packages
Ian Lynagh [Sat, 16 Oct 2010 12:34:21 +0000 (12:34 +0000)]
Correct the regexp used to search for extra packages
We weren't ignoring comment lines

13 years agoNew member "archiveMemberName" for struct _ObjectCode
pho@cielonegro.org [Mon, 27 Sep 2010 22:41:45 +0000 (22:41 +0000)]
New member "archiveMemberName" for struct _ObjectCode

struct _ObjectCode should be able to retain the name of archive members.
Though currently the only use of those names are for debugging outputs.

13 years agoAdd a -fghci-sandbox flag so that we can en/disable the ghci sandbox
Ian Lynagh [Fri, 15 Oct 2010 17:27:46 +0000 (17:27 +0000)]
Add a -fghci-sandbox flag so that we can en/disable the ghci sandbox
It's on by default (which matches the previous behaviour).

Motivation:
GLUT on OS X needs to run on the main thread. If you
try to use it from another thread then you just get a
white rectangle rendered. For this, or anything else
with such restrictions, you can turn the GHCi sandbox off
and things will be run in the main thread.

13 years agoFix boot; it was failing if darcs-all or validate were missing
Ian Lynagh [Fri, 15 Oct 2010 16:45:49 +0000 (16:45 +0000)]
Fix boot; it was failing if darcs-all or validate were missing
(which is the case in sdists)

13 years agoComments and layout
simonpj@microsoft.com [Fri, 15 Oct 2010 13:19:24 +0000 (13:19 +0000)]
Comments and layout

13 years agoMake (Located a) an instance of Eq, Ord
simonpj@microsoft.com [Fri, 15 Oct 2010 13:18:57 +0000 (13:18 +0000)]
Make (Located a) an instance of Eq, Ord

Fulfils Trac #4369

13 years agoGive user-defined rules precedence over built-in rules
simonpj@microsoft.com [Fri, 15 Oct 2010 13:18:14 +0000 (13:18 +0000)]
Give user-defined rules precedence over built-in rules

This fixes Trac #4397.  See comments with 'isMoreSpecific'.

13 years agoFix Trac #4401: meta-tyvars allocated by the constraint solver are always touchable
simonpj@microsoft.com [Fri, 15 Oct 2010 13:08:18 +0000 (13:08 +0000)]
Fix Trac #4401: meta-tyvars allocated by the constraint solver are always touchable

  See Note [Touchable meta type variables] in TcSMonad

13 years agoRemove GHC.extendGlobalRdrScope, GHC.extendGlobalTypeScope
simonpj@microsoft.com [Wed, 13 Oct 2010 09:11:07 +0000 (09:11 +0000)]
Remove GHC.extendGlobalRdrScope, GHC.extendGlobalTypeScope

These functions were added by

   Tue Apr 18 03:36:06 BST 2006  Lemmih <lemmih@gmail.com>
   * Make the initial rdr and type scope available in the ghc-api

The are extremely dubious, because they extend the Rdr and Type
env for every compilation.  The right thing to do is to use
the InteractiveContext for temporary extensions.

So far as we know, no one uses them.  And if they are being used
it's probably a mistake.  So we're backing them out.

13 years agoInlinePrag needs an arity only for INLINE, not INLINABLE
Simon Marlow [Fri, 15 Oct 2010 09:49:25 +0000 (09:49 +0000)]
InlinePrag needs an arity only for INLINE, not INLINABLE
This doesn't fix anything (we think), but it's morally correct.

13 years agoFix #4346 (INLINABLE pragma not behaving consistently)
Simon Marlow [Fri, 15 Oct 2010 09:48:36 +0000 (09:48 +0000)]
Fix #4346 (INLINABLE pragma not behaving consistently)
Debugged thanks to lots of help from Simon PJ: we weren't updating the
UnfoldingGuidance when the unfolding changed.
Also, a bit of refactoring and additinoal comments.

13 years agoHave boot check that we have the dph packages when validating
Ian Lynagh [Thu, 14 Oct 2010 14:05:56 +0000 (14:05 +0000)]
Have boot check that we have the dph packages when validating

13 years agoAdd more documentation for interruptible foreign calls
Simon Marlow [Thu, 14 Oct 2010 08:42:53 +0000 (08:42 +0000)]
Add more documentation for interruptible foreign calls

13 years agominor refactoring
Simon Marlow [Sun, 26 Sep 2010 10:58:19 +0000 (10:58 +0000)]
minor refactoring

13 years agoFix for interruptible FFI handling
Simon Marlow [Sat, 25 Sep 2010 19:34:42 +0000 (19:34 +0000)]
Fix for interruptible FFI handling
Set tso->why_blocked before calling maybePerformBlockedException(), so
that throwToSingleThreaded() doesn't try to unblock the current thread
(it is already unblocked).

13 years agointerruptible FFI: more robust handling of the exception case in the interpreter
Simon Marlow [Sat, 25 Sep 2010 19:33:17 +0000 (19:33 +0000)]
interruptible FFI: more robust handling of the exception case in the interpreter

13 years agoDon't interrupt when task blocks exceptions, don't immediately start exception.
Edward Z. Yang [Sat, 25 Sep 2010 03:30:26 +0000 (03:30 +0000)]
Don't interrupt when task blocks exceptions, don't immediately start exception.

13 years agoInterruptible FFI calls with pthread_kill and CancelSynchronousIO. v4
Edward Z. Yang [Sun, 19 Sep 2010 00:29:05 +0000 (00:29 +0000)]
Interruptible FFI calls with pthread_kill and CancelSynchronousIO. v4

This is patch that adds support for interruptible FFI calls in the form
of a new foreign import keyword 'interruptible', which can be used
instead of 'safe' or 'unsafe'.  Interruptible FFI calls act like safe
FFI calls, except that the worker thread they run on may be interrupted.

Internally, it replaces BlockedOnCCall_NoUnblockEx with
BlockedOnCCall_Interruptible, and changes the behavior of the RTS
to not modify the TSO_ flags on the event of an FFI call from
a thread that was interruptible.  It also modifies the bytecode
format for foreign call, adding an extra Word16 to indicate
interruptibility.

The semantics of interruption vary from platform to platform, but the
intent is that any blocking system calls are aborted with an error code.
This is most useful for making function calls to system library
functions that support interrupting.  There is no support for pre-Vista
Windows.

There is a partner testsuite patch which adds several tests for this
functionality.

13 years agoRemove ghc-pkg's dependency on haskell98
Ian Lynagh [Wed, 13 Oct 2010 19:43:56 +0000 (19:43 +0000)]
Remove ghc-pkg's dependency on haskell98

13 years agoBuild haskell98 and haskell2010 with stage2
Ian Lynagh [Wed, 13 Oct 2010 18:27:59 +0000 (18:27 +0000)]
Build haskell98 and haskell2010 with stage2
Stops us accidentally depending on them

13 years agoFix warning: Remove unused import
Ian Lynagh [Wed, 13 Oct 2010 14:12:24 +0000 (14:12 +0000)]
Fix warning: Remove unused import

13 years agoFix warnings
benl@ouroborus.net [Wed, 13 Oct 2010 04:03:35 +0000 (04:03 +0000)]
Fix warnings

13 years agoRegAlloc: Track slot liveness over jumps in spill cleaner
benl@ouroborus.net [Wed, 13 Oct 2010 01:54:14 +0000 (01:54 +0000)]
RegAlloc: Track slot liveness over jumps in spill cleaner

13 years agoBump Cabal dep
Ian Lynagh [Tue, 12 Oct 2010 15:45:28 +0000 (15:45 +0000)]
Bump Cabal dep

13 years agoRemove __HASKELL1__, __HASKELL98__, __CONCURRENT_HASKELL__
Ian Lynagh [Tue, 12 Oct 2010 13:47:00 +0000 (13:47 +0000)]
Remove __HASKELL1__, __HASKELL98__, __CONCURRENT_HASKELL__
We used to define these CPP symbols, but nothing on hackage uses them
and the first 2 are no longer correct (as we support multiple Haskell
versions).

13 years agoFollow Cabal changes: Cabal no longer has a docbook userguide
Ian Lynagh [Tue, 12 Oct 2010 13:05:38 +0000 (13:05 +0000)]
Follow Cabal changes: Cabal no longer has a docbook userguide
For now we don't build the Cabal userguide, but we should add markdown
support so that we can do so.

13 years agoFix build on Windows: ghc-pkg/Main.hs needs ForeignFunctionInterface
Ian Lynagh [Tue, 12 Oct 2010 11:21:11 +0000 (11:21 +0000)]
Fix build on Windows: ghc-pkg/Main.hs needs ForeignFunctionInterface

13 years agoRemove unnecessary import
Ian Lynagh [Sun, 10 Oct 2010 22:22:31 +0000 (22:22 +0000)]
Remove unnecessary import

13 years agoMake "./validate --slow" run the full testsuite
Ian Lynagh [Thu, 7 Oct 2010 00:43:27 +0000 (00:43 +0000)]
Make "./validate --slow" run the full testsuite

13 years agoFix build following haskell98 and -fglasgow-exts changes
Ian Lynagh [Wed, 6 Oct 2010 16:06:56 +0000 (16:06 +0000)]
Fix build following haskell98 and -fglasgow-exts changes

13 years agoDon't automatically link the haskell98 package
Ian Lynagh [Wed, 6 Oct 2010 13:02:35 +0000 (13:02 +0000)]
Don't automatically link the haskell98 package
The default language is now Haskell2010, so this was a little odd.
Also, --make is now on by default, so this was largely irrelevant.

13 years agoDeprecate -fglasgow-exts
Ian Lynagh [Wed, 6 Oct 2010 12:44:13 +0000 (12:44 +0000)]
Deprecate -fglasgow-exts

13 years agoRemove Opt_GADTs and Opt_TypeFamilies from -fglasgow-exts
Ian Lynagh [Wed, 6 Oct 2010 12:20:00 +0000 (12:20 +0000)]
Remove Opt_GADTs and Opt_TypeFamilies from -fglasgow-exts
This means most code doesn't get caught by monomorphic local bindings.

13 years agoFix Trac #4360: omitted case in combineCtLoc
simonpj@microsoft.com [Fri, 8 Oct 2010 13:57:47 +0000 (13:57 +0000)]
Fix Trac #4360: omitted case in combineCtLoc

13 years agoBeautiful new approach to the skolem-escape check and untouchable
simonpj@microsoft.com [Fri, 8 Oct 2010 13:37:51 +0000 (13:37 +0000)]
Beautiful new approach to the skolem-escape check and untouchable

Instead of keeping a *set* of untouchable variables in each
implication contraints, we keep a *range* of uniques for the
*touchable* variables of an implication.  This are precisely
the ones we would call the "existentials" if we were French.

It turns out that the code is more efficient, and vastly easier
to get right, than the set-based approach.

Fixes Trac #4355 among others

13 years agoDo less simplification when doing let-generalisation
simonpj@microsoft.com [Fri, 8 Oct 2010 13:35:42 +0000 (13:35 +0000)]
Do less simplification when doing let-generalisation

This fixes Trac #4361.  In a rather delicate way, but
no more delicate than before.  A more remoseless typechecker
would reject #4361 altogether.

See Note [Avoid unecessary constraint simplification]

13 years agoSuppress ambiguity errors if any other errors occur
simonpj@microsoft.com [Fri, 8 Oct 2010 11:13:18 +0000 (11:13 +0000)]
Suppress ambiguity errors if any other errors occur

13 years agoFix Trac #4361: be more discerning when inferring types
simonpj@microsoft.com [Fri, 8 Oct 2010 11:12:27 +0000 (11:12 +0000)]
Fix Trac #4361: be more discerning when inferring types

Note [Avoid unecessary constraint simplification] in TcSimplify

13 years agoFloat out partial applications
Simon Marlow [Fri, 8 Oct 2010 09:27:09 +0000 (09:27 +0000)]
Float out partial applications

This fixes at least one case of performance regression in 7.0, and
is nice win on nofib:

        Program           Size    Allocs   Runtime   Elapsed
            Min          +0.3%    -63.0%    -38.5%    -38.7%
            Max          +1.2%     +0.2%     +0.9%     +0.9%
 Geometric Mean          +0.6%     -3.0%     -6.4%     -6.6%

13 years agoSuppress knock-on typechecker errors
simonpj@microsoft.com [Fri, 8 Oct 2010 09:43:48 +0000 (09:43 +0000)]
Suppress knock-on typechecker errors

The error cascade caused puzzling errors in T4093b, and
suppressing some seems like a good plan.  Very few test
outputs change.

13 years agoSome refactoring and simplification in TcInteract.occurCheck
simonpj@microsoft.com [Thu, 7 Oct 2010 16:35:00 +0000 (16:35 +0000)]
Some refactoring and simplification in TcInteract.occurCheck

13 years agoComments only
simonpj@microsoft.com [Thu, 7 Oct 2010 13:03:01 +0000 (13:03 +0000)]
Comments only

13 years agoImplement auto-specialisation of imported Ids
simonpj@microsoft.com [Thu, 7 Oct 2010 11:10:51 +0000 (11:10 +0000)]
Implement auto-specialisation of imported Ids

This big-ish patch arranges that if an Id 'f' is
  * Type-class overloaded
       f :: Ord a => [a] -> [a]
  * Defined with an INLINABLE pragma
       {-# INLINABLE f #-}
  * Exported from its defining module 'D'

then in any module 'U' that imports D

1. Any call of 'f' at a fixed type will generate
   (a) a specialised version of f in U
   (b) a RULE that rewrites unspecialised calls to the
       specialised on

  e.g. if the call is (f Int dOrdInt xs) then the
  specialiser will generate
     $sfInt :: [Int] -> [Int]
     $sfInt = <code for f, imported from D, specialised>
     {-# RULE forall d.  f Int d = $sfInt #-}

2. In addition, you can give an explicit {-# SPECIALISE -#}
   pragma for the imported Id
     {-# SPECIALISE f :: [Bool] -> [Bool] #-}
   This too generates a local specialised definition,
   and the corresponding RULE

The new RULES are exported from module 'U', so that any module
importing U will see the specialised versions of 'f', and will
not re-specialise them.

There's a flag -fwarn-auto-orphan that warns you if the auto-generated
RULES are orphan rules. It's not in -Wall, mainly to avoid lots of
error messages with existing packages.

Main implementation changes

 - A new flag on a CoreRule to say if it was auto-generated.
   This is persisted across interface files, so there's a small
   change in interface file format.

 - Quite a bit of fiddling with plumbing, to get the
   {-# SPECIALISE #-} pragmas for imported Ids.  In particular, a
   new field tgc_imp_specs in TcGblEnv, to keep the specialise
   pragmas for imported Ids between the typechecker and the desugarer.

 - Some new code (although surprisingly little) in Specialise,
   to deal with calls of imported Ids

13 years agoMake NameEnv back into type NameEnv a = UniqFM a
simonpj@microsoft.com [Thu, 7 Oct 2010 10:46:38 +0000 (10:46 +0000)]
Make NameEnv back into type NameEnv a = UniqFM a

I don't think the type distinction of declaring NameEnv with a newtype
(as it was) is really useful to us. Moreover, VarEnv is a UniqFM, and
I do sometimes want to build an envt with Ids and look up with Names.

This may not be the last word on the subject.

13 years agoImprove the rule-matcher
simonpj@microsoft.com [Thu, 7 Oct 2010 10:37:00 +0000 (10:37 +0000)]
Improve the rule-matcher

Previously it was rejecting the match

  Template: forall s t. map s t
  Actual:   map Int t

which should obviously be fine.  It turns out that this kind of match
comes up when specialising.  By freshening that t we could avoid the
difficulty, but morally the (forall t) binds t and the rule should
be alpha-equivalent regardless of the forall'd variables.

This patch makes it so, and incidentally makes matching a little
more efficient.  See Note [Eta expansion] in VarEnv.

13 years agoFix Trac #4345: simplifier bug
simonpj@microsoft.com [Thu, 7 Oct 2010 10:27:20 +0000 (10:27 +0000)]
Fix Trac #4345: simplifier bug

This is another long-standing bug, in which there was a possibility
that a loop-breaker could lose its loop-breaker-hood OccInfo,
and then the simplifer re-simplified the expression. Result, either
non-termination or, in the case of #4345, an unbound identifier.

The fix is very simple, in Id.transferPolyIdInfo.
See Note [transferPolyIdInfo].

13 years agoAvoid redundant simplification
simonpj@microsoft.com [Thu, 7 Oct 2010 09:59:35 +0000 (09:59 +0000)]
Avoid redundant simplification

When adding specialisation for imported Ids, I noticed that the
Glorious Simplifier was repeatedly (and fruitlessly) simplifying the
same term.  It turned out to be easy to fix this, because I already
had a flag in the ApplyTo and Select constructors of SimplUtils.SimplCont.

See Note [Avoid redundant simplification]

13 years agoMake the occurrence analyser deal correctly with RULES for imported Ids
simonpj@microsoft.com [Thu, 7 Oct 2010 09:41:00 +0000 (09:41 +0000)]
Make the occurrence analyser deal correctly with RULES for imported Ids

This patch fixes a long-standing lurking bug, but it surfaced when I
was adding specialisation for imported Ids.

See Note [ImpRuleUsage], which explains the issue.   The solution
seems more complicated than the problem really deserves, but I
could not think of a simpler way, so I just bit the bullet and
wrote the code.  Improvements welcome.

13 years agoMake warning-free
simonpj@microsoft.com [Thu, 7 Oct 2010 09:20:07 +0000 (09:20 +0000)]
Make warning-free

13 years agoThis is just white-space and layout
simonpj@microsoft.com [Thu, 7 Oct 2010 09:16:18 +0000 (09:16 +0000)]
This is just white-space and layout

(At least, I don't think there is anything else.)

13 years agoFix an ASSERT failure in FamInstEnv
simonpj@microsoft.com [Thu, 7 Oct 2010 09:13:27 +0000 (09:13 +0000)]
Fix an ASSERT failure in FamInstEnv

I added a lot of comments too, to explain the preconditions;
esp Note [FamInstEnv]

13 years agoFix a looping bug in the new occur-check code
simonpj@microsoft.com [Thu, 7 Oct 2010 08:41:04 +0000 (08:41 +0000)]
Fix a looping bug in the new occur-check code

13 years agoFix test T4235 with -O
simonpj@microsoft.com [Wed, 6 Oct 2010 15:52:23 +0000 (15:52 +0000)]
Fix test T4235 with -O

The tag2Enum rule wasn't doing the right thing for
enumerations with a phantom type parameter, like
   data T a = A | B

13 years agoMake warning-free
simonpj@microsoft.com [Wed, 6 Oct 2010 15:50:33 +0000 (15:50 +0000)]
Make warning-free

13 years agoMajor bugfixing pass through the type checker
dimitris@microsoft.com [Wed, 6 Oct 2010 15:28:54 +0000 (15:28 +0000)]
Major bugfixing pass through the type checker

13 years agoTypechecker performance fixes and flatten skolem bugfixing
dimitris@microsoft.com [Mon, 4 Oct 2010 13:02:00 +0000 (13:02 +0000)]
Typechecker performance fixes and flatten skolem bugfixing

13 years agoPerformance bug fixes
dimitris@microsoft.com [Thu, 23 Sep 2010 14:39:18 +0000 (14:39 +0000)]
Performance bug fixes

13 years agoFix Trac #4371: matching of view patterns
simonpj@microsoft.com [Wed, 6 Oct 2010 11:53:16 +0000 (11:53 +0000)]
Fix Trac #4371: matching of view patterns

13 years agoRemove unused NoMatchContext construtor
simonpj@microsoft.com [Wed, 6 Oct 2010 11:52:51 +0000 (11:52 +0000)]
Remove unused NoMatchContext construtor

13 years agoRefactoring: mainly rename ic_env_tvs to ic_untch
simonpj@microsoft.com [Wed, 6 Oct 2010 10:28:30 +0000 (10:28 +0000)]
Refactoring: mainly rename ic_env_tvs to ic_untch

Plus remember to zonk the free_tvs in TcUnify.newImplication

13 years agoremove unnecessary/broken definition of mask_
Simon Marlow [Sat, 2 Oct 2010 19:51:18 +0000 (19:51 +0000)]
remove unnecessary/broken definition of mask_

13 years ago-fwarn-tabs: add "Warning" to the message
Simon Marlow [Sat, 2 Oct 2010 19:51:00 +0000 (19:51 +0000)]
-fwarn-tabs: add "Warning" to the message

13 years agogive a better error message in the non-threaded RTS for out-of-range FDs
Simon Marlow [Wed, 29 Sep 2010 21:29:16 +0000 (21:29 +0000)]
give a better error message in the non-threaded RTS for out-of-range FDs

# ./aw
aw: file descriptor 1027 out of range for select (0--1024).
Recompile with -threaded to work around this.

13 years agoFix a very rare crash in GHCi
Simon Marlow [Tue, 5 Oct 2010 14:47:35 +0000 (14:47 +0000)]
Fix a very rare crash in GHCi
When a BCO with a zero-length bitmap was right at the edge of
allocated memory, we were reading a word of non-existent memory.

This showed up as a segfault in T789(ghci) for me, but the crash was
extremely sensitive and went away with most changes.

Also, optimised scavenge_large_bitmap a bit while I was in there.

13 years agoUsing 'stdcall' when it is not supported is only a warning now (#3336)
Simon Marlow [Fri, 24 Sep 2010 15:24:45 +0000 (15:24 +0000)]
Using 'stdcall' when it is not supported is only a warning now (#3336)

13 years agoremove unnecessary stg_noForceIO (#3508)
Simon Marlow [Fri, 24 Sep 2010 15:02:02 +0000 (15:02 +0000)]
remove unnecessary stg_noForceIO (#3508)

13 years agoReplace an outputStr with putStrLn calls; fixes #4332
Ian Lynagh [Sun, 3 Oct 2010 12:57:07 +0000 (12:57 +0000)]
Replace an outputStr with putStrLn calls; fixes #4332

13 years agomake test and fulltest targets in the main Makefile; fixes #4297
Ian Lynagh [Thu, 30 Sep 2010 22:47:41 +0000 (22:47 +0000)]
make test and fulltest targets in the main Makefile; fixes #4297
You can now run "make test" in the root, and the fast testsuite will be
run with cleaning enabled. It will also put the summary in
testsuite_summary.txt.

13 years agoDon't show the loaded packages in ":show packages"; fixes #4300
Ian Lynagh [Thu, 30 Sep 2010 21:01:28 +0000 (21:01 +0000)]
Don't show the loaded packages in ":show packages"; fixes #4300
It's never worked properly, and the information is in ":show linker".