ghc.git
6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Wed, 31 Oct 2012 09:09:28 +0000 (09:09 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoDo not instantiate unification variables with polytypes
Simon Peyton Jones [Wed, 31 Oct 2012 09:08:39 +0000 (09:08 +0000)] 
Do not instantiate unification variables with polytypes

Without -XImpredicativeTypes, the typing rules say that a function
should be instantiated only at a *monotype*.  In implementation terms,
that means that a unification variable should not unify with a type
involving foralls.  But we were not enforcing that rule, and that
gave rise to some confusing error messages, such as
  Trac #7264, #6069

This patch adds the test for foralls.  There are consequences

 * I put the test in occurCheckExpand, since that is where we see if a
   type can unify with a given unification variable.  So
   occurCheckExpand has to get DynFlags, so it can test for
   -XImpredicativeTypes

 * We want this to work
      foo :: (forall a. a -> a) -> Int
      foo = error "foo"
   But that means instantiating error at a polytype!  But error is special
   already because you can instantiate it at an unboxed type like Int#.
   So I extended the specialness to allow type variables of openTypeKind
   to unify with polytypes, regardless of -XImpredicativeTypes.

   Conveniently, this works in TcUnify.matchExpectedFunTys, which generates
   unification variable for the function arguments, which can be polymorphic.

 * GHC has a special typing rule for ($) (see Note [Typing rule
   for ($)] in TcExpr).  It unifies the argument and result with a
   unification variable to exclude unboxed types -- but that means I
   now need a kind of unificatdion variable that *can* unify with a
   polytype.

   So for this sole case I added PolyTv to the data type TcType.MetaInfo.
   I suspect we'll find mor uses for this, and the changes are tiny,
   but it still feel a bit of a hack.  Well the special rule for ($)
   is a hack!

There were some consequential changes in error reporting (TcErrors).

6 years agoComments only
Simon Peyton Jones [Wed, 31 Oct 2012 08:54:33 +0000 (08:54 +0000)] 
Comments only

6 years agoClean some old files that we no longer generate
Ian Lynagh [Wed, 31 Oct 2012 00:50:18 +0000 (01:50 +0100)] 
Clean some old files that we no longer generate

Avoids problems for people with old files in their tree

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Wed, 31 Oct 2012 00:25:55 +0000 (01:25 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoImprove touchy
Ian Lynagh [Wed, 31 Oct 2012 00:08:45 +0000 (01:08 +0100)] 
Improve touchy

It's now simpler, and it fails if something fails rather than just
printing an error message and continuing.

6 years agoChange how touchy sets the file time
Ian Lynagh [Tue, 30 Oct 2012 23:53:59 +0000 (00:53 +0100)] 
Change how touchy sets the file time

Also added a large comment about why we need it

6 years agoGet ride of the -fregs-liveness flag.
Geoffrey Mainland [Thu, 18 Oct 2012 15:53:25 +0000 (16:53 +0100)] 
Get ride of the -fregs-liveness flag.

With the new register allocation scheme, the LLVM back end must always use
liveness information.

6 years agoGenerate correct LLVM for the new register allocation scheme.
Geoffrey Mainland [Thu, 18 Oct 2012 14:43:27 +0000 (15:43 +0100)] 
Generate correct LLVM for the new register allocation scheme.

We now have accurate global register liveness information attached to all Cmm
procedures and jumps. With this patch, the LLVM back end uses this information
to pass only the live floating point (F and D) registers on tail calls. This
makes the LLVM back end compatible with the new register allocation strategy.

Ideally the GHC LLVM calling convention would put all registers that are always
live first in the parameter sequence. Unfortunately the specification is written
so that on x86-64 SpLim (always live) is passed after the R registers. Therefore
we must always pass *something* in the R registers, so we pass the LLVM value
undef.

6 years agoDraw STG F and D registers from the same pool of available SSE registers on x86-64.
Geoffrey Mainland [Fri, 5 Oct 2012 14:19:55 +0000 (15:19 +0100)] 
Draw STG F and D registers from the same pool of available SSE registers on x86-64.

On x86-64 F and D registers are both drawn from SSE registers, so there is no
reason not to draw them from the same pool of available SSE registers. This
means that whereas previously a function could only receive two Double arguments
in registers even if it did not have any Float arguments, now it can receive up
to 6 arguments that are any mix of Float and Double in registers.

This patch breaks the LLVM back end. The next patch will fix this breakage.

6 years agoAttach global register liveness info to Cmm procedures.
Geoffrey Mainland [Wed, 17 Oct 2012 17:20:29 +0000 (18:20 +0100)] 
Attach global register liveness info to Cmm procedures.

All Cmm procedures now include the set of global registers that are live on
procedure entry, i.e., the global registers used to pass arguments to the
procedure. Only global registers that are use to pass arguments are included in
this list.

6 years agoProperly mark C-- calls to _assertFail as "never returns".
Geoffrey Mainland [Tue, 30 Oct 2012 20:49:37 +0000 (20:49 +0000)] 
Properly mark C-- calls to _assertFail as "never returns".

6 years agoGeneralize register sets and liveness calculations.
Geoffrey Mainland [Thu, 18 Oct 2012 10:24:14 +0000 (11:24 +0100)] 
Generalize register sets and liveness calculations.

We would like to calculate register liveness for global registers as well as
local registers, so this patch generalizes the existing infrastructure to set
the stage.

6 years agoSave and restore registers across calls to unlockClosure.
Geoffrey Mainland [Mon, 29 Oct 2012 17:32:10 +0000 (17:32 +0000)] 
Save and restore registers across calls to unlockClosure.

We may not assume that registers are saved across calls to unlockClosure because
it could call a C function on some platforms.

6 years agoAttach proper jump liveness information to generated C-- code.
Geoffrey Mainland [Thu, 25 Oct 2012 10:35:47 +0000 (11:35 +0100)] 
Attach proper jump liveness information to generated C-- code.

6 years agoCmm jumps always have live register information.
Geoffrey Mainland [Wed, 17 Oct 2012 16:03:13 +0000 (17:03 +0100)] 
Cmm jumps always have live register information.

Jumps now always have live register information attached, so drop Maybes.

6 years agoMake DYNAMIC_BY_DEFAULT=NO when GhcUnregisterised
Simon Marlow [Mon, 29 Oct 2012 13:50:35 +0000 (13:50 +0000)] 
Make DYNAMIC_BY_DEFAULT=NO when GhcUnregisterised

6 years agoINFO_TABLE_RET should generate a CmmRetInfoLabel, not a CmmInfoLabel
Simon Marlow [Mon, 29 Oct 2012 13:49:57 +0000 (13:49 +0000)] 
INFO_TABLE_RET should generate a CmmRetInfoLabel, not a CmmInfoLabel

Fixes this, when building unregisterised:

rts/dist/build/AutoApply.hc:87:1:
     error: ‘stg_ap_v_entry’ undeclared (first use in this function)

6 years agoFix dependency generation when GhcLibWays = dyn p
Ian Lynagh [Tue, 30 Oct 2012 02:36:45 +0000 (02:36 +0000)] 
Fix dependency generation when GhcLibWays = dyn p

This is a kludge. A proper fix probably involves improving the "ghc -M"
flags to handle this sort of case better.

6 years agoDo not treat a constructor in a *pattern* as a *use* of that constructor
Simon Peyton Jones [Mon, 29 Oct 2012 23:25:25 +0000 (23:25 +0000)] 
Do not treat a constructor in a *pattern* as a *use* of that constructor

Occurrences in terms are uses, in patterns they are not.
In this way we get unused-constructor warnings from modules like this

   module M( f, g, T ) where
     data T = T1 | T2 Bool

     f x = T2 x

     g T1 = True
     g (T2 x) = x

Here a T1 value cannot be constructed, so we can warn. The use
in a pattern doesn't count.  See Note [Patterns are not uses]
in RnPat.

Interestingly this change exposed three module in GHC itself
that had unused constructors, which I duly removed:
  * ghc/Main.hs
  * compiler/ghci/ByteCodeAsm
  * compiler/nativeGen/PPC/RegInfo
Their changes are in this patch.

6 years agoFix bug with reporting deprecated use of flag (Trac #7349)
Simon Peyton Jones [Mon, 29 Oct 2012 23:19:32 +0000 (23:19 +0000)] 
Fix bug with reporting deprecated use of flag (Trac #7349)

6 years agoFix a makefile rule
Ian Lynagh [Mon, 29 Oct 2012 19:53:54 +0000 (19:53 +0000)] 
Fix a makefile rule

6 years agoMore .gitignore updates
Ian Lynagh [Mon, 29 Oct 2012 18:32:41 +0000 (18:32 +0000)] 
More .gitignore updates

6 years agoRearrange .gitignore a little
Ian Lynagh [Mon, 29 Oct 2012 18:26:28 +0000 (18:26 +0000)] 
Rearrange .gitignore a little

6 years agoMove ghc-pkg's generated Version.hs inside the dist directories
Ian Lynagh [Mon, 29 Oct 2012 00:19:48 +0000 (00:19 +0000)] 
Move ghc-pkg's generated Version.hs inside the dist directories

6 years agoRemove some more unused .gitignore entries
Ian Lynagh [Sun, 28 Oct 2012 22:29:25 +0000 (22:29 +0000)] 
Remove some more unused .gitignore entries

6 years agoRemove some old .gitignore entries
Ian Lynagh [Sun, 28 Oct 2012 19:02:43 +0000 (19:02 +0000)] 
Remove some old .gitignore entries

We no longer generate those files

6 years agoFix build on platforms on which we don't have register info
Ian Lynagh [Sat, 27 Oct 2012 12:37:45 +0000 (13:37 +0100)] 
Fix build on platforms on which we don't have register info

6 years agoFix a couple of format strings
Ian Lynagh [Fri, 26 Oct 2012 21:39:53 +0000 (22:39 +0100)] 
Fix a couple of format strings

6 years agoAdd some missing parentheses to mkDerivedConstants.c
Ian Lynagh [Fri, 26 Oct 2012 19:07:47 +0000 (20:07 +0100)] 
Add some missing parentheses to mkDerivedConstants.c

This was breaking the build on s390. Not sure why it didn't bite on
any other platforms.

6 years agoImprove the GhcLibWays sanity checking
Ian Lynagh [Fri, 26 Oct 2012 17:31:26 +0000 (18:31 +0100)] 
Improve the GhcLibWays sanity checking

6 years agoMake Rank2Types and PolymorphicComponents into a synonym for RankNTypes (no deprecation)
Simon Peyton Jones [Fri, 26 Oct 2012 15:18:03 +0000 (16:18 +0100)] 
Make Rank2Types and PolymorphicComponents into a synonym for RankNTypes (no deprecation)

There was a long thread on cvs-ghc which concluded that although it's
the Right Thing to deprecate Rank2Types and PolymorphicComponents, in
favour of RankNTypes, it would cause lots of busy-work for library
authors and the pain isn't worth the gain.

So this patch removes the deprecation, and documents the synonym-ity.

6 years agoRevert "Suppress deprecation warnings for Rank2Types in libraries that use the flag"
Simon Peyton Jones [Fri, 26 Oct 2012 10:17:21 +0000 (11:17 +0100)] 
Revert "Suppress deprecation warnings for Rank2Types in libraries that use the flag"

After disussing on cvs-ghc and cabal-devel, we decided, in the end,
that it was simpler to make Rank2Types and PolymorphicComponents into
synonyms for RankNTypes.

This reverts commit d277031df8afa64118a1d063e6e09c80028226fe.

6 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Fri, 26 Oct 2012 10:14:02 +0000 (11:14 +0100)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

Conflicts:
compiler/coreSyn/CoreLint.lhs

6 years agoMore info on a Core Lint failure
Simon Peyton Jones [Fri, 26 Oct 2012 10:12:21 +0000 (11:12 +0100)] 
More info on a Core Lint failure

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Fri, 26 Oct 2012 10:06:29 +0000 (11:06 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoComments in Note [Efficient orientation] about interacting CFunEqCans
Simon Peyton Jones [Fri, 26 Oct 2012 10:05:57 +0000 (11:05 +0100)] 
Comments in Note [Efficient orientation] about interacting CFunEqCans

6 years agoImprove trace
Simon Peyton Jones [Fri, 26 Oct 2012 09:55:31 +0000 (10:55 +0100)] 
Improve trace

6 years agoFix installation
Ian Lynagh [Thu, 25 Oct 2012 21:46:26 +0000 (22:46 +0100)] 
Fix installation

We were calling ranlib on the wrong path

6 years agoTweak build.mk.sample
Ian Lynagh [Thu, 25 Oct 2012 20:09:50 +0000 (21:09 +0100)] 
Tweak build.mk.sample

Now that we can build dyn-only, we don't need to force
DYNAMIC_BY_DEFAULT to NO. We just set GhcLibWays appropriately.

6 years agoFix doc typo; fixes #7318
Ian Lynagh [Thu, 25 Oct 2012 19:54:41 +0000 (20:54 +0100)] 
Fix doc typo; fixes #7318

6 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Thu, 25 Oct 2012 17:12:41 +0000 (18:12 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

6 years agoFix the haddocking build system rules when dynamic is the default way
Ian Lynagh [Thu, 25 Oct 2012 17:06:15 +0000 (18:06 +0100)] 
Fix the haddocking build system rules when dynamic is the default way

6 years agoRevert "Always use --force when registering packages"
Ian Lynagh [Thu, 25 Oct 2012 15:37:46 +0000 (16:37 +0100)] 
Revert "Always use --force when registering packages"

This reverts commit c67b43133ee9f71b280577b274cb3753a396a83a.

We no longer need to always force, as ghc-pkg is cleverer.

6 years agoFix installation of vanilla libraries
Ian Lynagh [Thu, 25 Oct 2012 15:36:47 +0000 (16:36 +0100)] 
Fix installation of vanilla libraries

6 years agoFix a bug in CmmSink exposed by a recent optimisation (#7366)
Simon Marlow [Thu, 25 Oct 2012 15:18:36 +0000 (16:18 +0100)] 
Fix a bug in CmmSink exposed by a recent optimisation (#7366)

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Thu, 25 Oct 2012 13:58:03 +0000 (14:58 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoMake DefaultFastGhcLibWays be just "dyn" when we are dynamic by default
Ian Lynagh [Thu, 25 Oct 2012 13:57:11 +0000 (14:57 +0100)] 
Make DefaultFastGhcLibWays be just "dyn" when we are dynamic by default

6 years agoFix the transformers-building code, and move it from validate to ghc.mk
Ian Lynagh [Thu, 25 Oct 2012 13:55:23 +0000 (14:55 +0100)] 
Fix the transformers-building code, and move it from validate to ghc.mk

This makes life easier, as ghc.mk has access to HADDOCK_DOCS
and DYNAMIC_BY_DEFAULT, so knows the right way to build it.

6 years agoMake "ghc-pkg check" check for prof and dyn ways, as well as vanilla
Ian Lynagh [Thu, 25 Oct 2012 13:18:01 +0000 (14:18 +0100)] 
Make "ghc-pkg check" check for prof and dyn ways, as well as vanilla

In particular, this fixes it if we are using dynamic libraries by
default and don't build the vanilla way.

6 years agoRemove an outdated comment
Ian Lynagh [Thu, 25 Oct 2012 12:54:02 +0000 (13:54 +0100)] 
Remove an outdated comment

6 years agofprintCCS_stderr: untag the exception (#7319)
Simon Marlow [Wed, 24 Oct 2012 12:39:34 +0000 (13:39 +0100)] 
fprintCCS_stderr: untag the exception (#7319)

6 years agofix off-by-one-column in showRichTokenStream (#7351)
Simon Marlow [Wed, 24 Oct 2012 12:23:08 +0000 (13:23 +0100)] 
fix off-by-one-column in showRichTokenStream (#7351)

6 years agodeclare stg_gc_prim and stg_killMyself (#7350)
Simon Marlow [Thu, 25 Oct 2012 08:43:34 +0000 (09:43 +0100)] 
declare stg_gc_prim and stg_killMyself (#7350)

6 years agoFix bug in 88a6f863d9f127fc1b03a1e2f068fd20ecbe096c (#7366)
Simon Marlow [Thu, 25 Oct 2012 08:25:49 +0000 (09:25 +0100)] 
Fix bug in 88a6f863d9f127fc1b03a1e2f068fd20ecbe096c (#7366)

6 years agodelete old comments
Simon Marlow [Sat, 13 Oct 2012 19:30:12 +0000 (20:30 +0100)] 
delete old comments

6 years agoremove unused sched_shutting_down
Simon Marlow [Fri, 12 Oct 2012 14:31:17 +0000 (15:31 +0100)] 
remove unused sched_shutting_down

6 years agoSet the default way correctly when dynamic-by-default
Ian Lynagh [Thu, 25 Oct 2012 02:01:56 +0000 (03:01 +0100)] 
Set the default way correctly when dynamic-by-default

6 years agoAlways use --force when registering packages
Ian Lynagh [Thu, 25 Oct 2012 01:16:58 +0000 (02:16 +0100)] 
Always use --force when registering packages

When dynamic-by-default, we may only have .dyn_hi files, and ghc-pkg
complains if there are no .hi files.

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Wed, 24 Oct 2012 18:57:55 +0000 (19:57 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoMake it possible to build with only way dyn
Ian Lynagh [Wed, 24 Oct 2012 16:49:42 +0000 (17:49 +0100)] 
Make it possible to build with only way dyn

6 years agoRemove the kludgy TH dependencies
Ian Lynagh [Wed, 24 Oct 2012 14:57:01 +0000 (15:57 +0100)] 
Remove the kludgy TH dependencies

There are better dependencies for this in the DPH package, where all
the TH is.

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Wed, 24 Oct 2012 13:03:18 +0000 (14:03 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agotypo
Gabor Greif [Wed, 24 Oct 2012 11:45:55 +0000 (13:45 +0200)] 
typo

6 years agofix bug in heap check in putMVar#
Simon Marlow [Wed, 24 Oct 2012 11:55:33 +0000 (12:55 +0100)] 
fix bug in heap check in putMVar#

6 years agoComment to explain why we need to split proc points on x86/Darwin with -fPIC
Simon Marlow [Wed, 24 Oct 2012 11:03:34 +0000 (12:03 +0100)] 
Comment to explain why we need to split proc points on x86/Darwin with -fPIC

6 years agoAdd a case for CmmLabelDiffOff to cmmOffsetLit
Simon Marlow [Wed, 24 Oct 2012 09:10:04 +0000 (10:10 +0100)] 
Add a case for CmmLabelDiffOff to cmmOffsetLit

6 years agoextend LD_LIBRARY_PATH instead of replacing it
Gabor Greif [Fri, 12 Oct 2012 09:25:29 +0000 (11:25 +0200)] 
extend LD_LIBRARY_PATH instead of replacing it

6 years agoUse Cabal to build mkUserGuidePart
Ian Lynagh [Wed, 24 Oct 2012 00:31:20 +0000 (01:31 +0100)] 
Use Cabal to build mkUserGuidePart

6 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Tue, 23 Oct 2012 19:16:24 +0000 (20:16 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

6 years agoSmall optimisation: always sink/inline reg1 = reg2 assignments
Simon Marlow [Tue, 23 Oct 2012 12:06:17 +0000 (13:06 +0100)] 
Small optimisation: always sink/inline reg1 = reg2 assignments

6 years agoa small -fPIC optimisation
Simon Marlow [Tue, 23 Oct 2012 12:05:28 +0000 (13:05 +0100)] 
a small -fPIC optimisation

(PicBaseReg + lit) + N  ==>  PicBaseReg + (lit+N)

6 years agoremoveWay should also unset the wayGeneralFlags
Simon Marlow [Tue, 23 Oct 2012 11:22:59 +0000 (12:22 +0100)] 
removeWay should also unset the wayGeneralFlags

This means that -static now disables the -fPIC that we're currently
getting by default.

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Tue, 23 Oct 2012 12:45:47 +0000 (13:45 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoFix -fPIC on OS X x86
Ian Lynagh [Tue, 23 Oct 2012 12:44:30 +0000 (13:44 +0100)] 
Fix -fPIC on OS X x86

6 years agoAvoid calling toInfoLbl on the entry label (#7313)
Simon Marlow [Tue, 23 Oct 2012 08:50:33 +0000 (09:50 +0100)] 
Avoid calling toInfoLbl on the entry label (#7313)

6 years agoUse canned heap checks to save a few bytes of code
Simon Marlow [Tue, 23 Oct 2012 08:45:05 +0000 (09:45 +0100)] 
Use canned heap checks to save a few bytes of code

6 years agofix a warning
Simon Marlow [Mon, 22 Oct 2012 14:59:06 +0000 (15:59 +0100)] 
fix a warning

6 years agoFix a silly bug that would cause -xc to print less than useful information
Simon Marlow [Mon, 22 Oct 2012 14:44:58 +0000 (15:44 +0100)] 
Fix a silly bug that would cause -xc to print less than useful information

6 years agocomments only
Gabor Greif [Tue, 23 Oct 2012 07:52:30 +0000 (09:52 +0200)] 
comments only

6 years agoOctober 2012 stats
Gabor Greif [Tue, 23 Oct 2012 07:50:31 +0000 (09:50 +0200)] 
October 2012 stats

6 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Mon, 22 Oct 2012 17:24:03 +0000 (18:24 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

6 years agoWhen DYNAMIC_BY_DEFAULT, make inplace wrappers for everything
Ian Lynagh [Mon, 22 Oct 2012 17:22:42 +0000 (18:22 +0100)] 
When DYNAMIC_BY_DEFAULT, make inplace wrappers for everything

Even though e.g. inplace/bin/hpc doesn't normally need a shell wrapper,
it does when we are using dynlibs, as we need to set the
LD_LIBRARY_PATH so that it can find its libraries.

6 years agoForeign calls can clobber heap & stack memory too
Simon Marlow [Mon, 22 Oct 2012 10:43:18 +0000 (11:43 +0100)] 
Foreign calls can clobber heap & stack memory too

We were making an aggressive assumption that foreign calls cannot
clobber heap or stack memory, which for the majority of foreign calls
is true, but we violate the assumption in the implementation of
primops in the RTS.  This was causing crashes in some STM tests.

6 years agotypo
Simon Marlow [Mon, 22 Oct 2012 10:42:03 +0000 (11:42 +0100)] 
typo

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Mon, 22 Oct 2012 08:11:17 +0000 (09:11 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoIn lookupFlatEqn, look in the flat-cache *last*
Simon Peyton Jones [Mon, 22 Oct 2012 08:10:48 +0000 (09:10 +0100)] 
In lookupFlatEqn, look in the flat-cache *last*

The other places (solved fun-eqs and inerts) are
more productive.

6 years agoBe careful when combining two CFunEqCans, in the
Simon Peyton Jones [Mon, 22 Oct 2012 08:09:21 +0000 (09:09 +0100)] 
Be careful when combining two CFunEqCans, in the
case where one has a unification variable on the right.

See Note [Carefully solve the right CFunEqCan].
This makes the error message in SimplFail16 come out
the right way round.

6 years agoUse fromRational when pre-computing fromRational literals
Ian Lynagh [Sun, 21 Oct 2012 17:03:17 +0000 (18:03 +0100)] 
Use fromRational when pre-computing fromRational literals

This makes it easier to be confident that the optimisation gives the
right answer.

6 years agoadd GHC.Float.rationalToFloat, rationalToDouble (fixes #7295)
John Lato [Mon, 8 Oct 2012 04:54:55 +0000 (12:54 +0800)] 
add GHC.Float.rationalToFloat, rationalToDouble (fixes #7295)

Adds better support for constant folding of Float/Double literals.
  - add rationalToFloat, rationalToDouble with associated Name/Id's in PrelNames.
  - add a matching rule in PrelRules for rationalTo* functions.

6 years agoSet V = 1 by default, and add info about turning it off to build.mk.sample
Ian Lynagh [Sun, 21 Oct 2012 16:15:37 +0000 (17:15 +0100)] 
Set V = 1 by default, and add info about turning it off to build.mk.sample

This will hopefully make it less likely that we will get bug reports
with the pretty output, such as in trac ticket 7225.

6 years agoAdd the p_dyn and thr_p_dyn ways
Ian Lynagh [Sun, 21 Oct 2012 16:11:35 +0000 (17:11 +0100)] 
Add the p_dyn and thr_p_dyn ways

6 years agoAdd a rule for (plusAddr# x 0) == x; fixes #7284
Ian Lynagh [Sun, 21 Oct 2012 13:48:29 +0000 (14:48 +0100)] 
Add a rule for (plusAddr# x 0) == x; fixes #7284

6 years agoAdd some more PrimOp rules
Ian Lynagh [Sun, 21 Oct 2012 13:20:17 +0000 (14:20 +0100)] 
Add some more PrimOp rules

6 years agoWhitespace only in hsSyn/HsExpr.lhs
Ian Lynagh [Sun, 21 Oct 2012 12:55:54 +0000 (13:55 +0100)] 
Whitespace only in hsSyn/HsExpr.lhs

6 years agoAdd some more primop rules; fixes #7286
Ian Lynagh [Sun, 21 Oct 2012 12:48:09 +0000 (13:48 +0100)] 
Add some more primop rules; fixes #7286

As well as the rules mentioned in the ticket, I've also gone through
and added some more rules that might be useful in other cases.

6 years agoFix typo
Ian Lynagh [Fri, 19 Oct 2012 23:12:21 +0000 (00:12 +0100)] 
Fix typo

6 years agoWhitespace only in simplCore/OccurAnal.lhs
Ian Lynagh [Fri, 19 Oct 2012 19:56:30 +0000 (20:56 +0100)] 
Whitespace only in simplCore/OccurAnal.lhs

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Fri, 19 Oct 2012 19:35:19 +0000 (20:35 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoSimplify code slightly; no change in behaviour
Simon Peyton Jones [Fri, 19 Oct 2012 19:35:01 +0000 (20:35 +0100)] 
Simplify code slightly; no change in behaviour