ghc.git
6 years agoFix xhtml's entry in the packages file; fixes #7632
Ian Lynagh [Fri, 1 Feb 2013 20:13:47 +0000 (20:13 +0000)] 
Fix xhtml's entry in the packages file; fixes #7632

xhtml is a submodule

6 years agoImprove an error message; fixes #984
Ian Lynagh [Fri, 1 Feb 2013 15:23:39 +0000 (15:23 +0000)] 
Improve an error message; fixes #984

This code:
    f _ = do
            x <- computation
            case () of
                    _ ->
                            result <- computation
                            case () of () -> undefined
Now gives this error:
    Parse error in pattern: case () of { _ -> result }
    Possibly caused by a missing 'do'?

6 years agoRemove an out-of-date comment
Ian Lynagh [Fri, 1 Feb 2013 14:55:38 +0000 (14:55 +0000)] 
Remove an out-of-date comment

6 years agoA couple of small refactorings
Ian Lynagh [Fri, 1 Feb 2013 14:32:27 +0000 (14:32 +0000)] 
A couple of small refactorings

6 years agoWhitespace only
Ian Lynagh [Fri, 1 Feb 2013 14:14:59 +0000 (14:14 +0000)] 
Whitespace only

6 years agoTry to make ghc-pkg and ghc-cabal use the same flags when bootstrapping.
Simon Marlow [Fri, 1 Feb 2013 07:59:02 +0000 (07:59 +0000)] 
Try to make ghc-pkg and ghc-cabal use the same flags when bootstrapping.

They share modules in Cabal, and unless they use exactly the same
flags GHC recompiles the modules.

6 years agoadd CPP
Simon Marlow [Thu, 31 Jan 2013 14:01:27 +0000 (14:01 +0000)] 
add CPP

6 years agoMachRegs.h requires ghcautoconf.h to be included before it (#7591)
Stephen Blackheath [Wed, 16 Jan 2013 01:28:42 +0000 (14:28 +1300)] 
MachRegs.h requires ghcautoconf.h to be included before it (#7591)

Because, in the case of ARM processors, it needs to know what ARM
variant is being used. This patch fixes that in
includes/CodeGen.Platform.hs, otherwise there is a mismatch between
the compiler and llvm.

6 years agoadd $(CrossCompilePrefix) to hp2ps (#7639)
Simon Marlow [Thu, 31 Jan 2013 12:05:03 +0000 (12:05 +0000)] 
add $(CrossCompilePrefix) to hp2ps (#7639)

6 years agoDocument -fvectorise and -favoid-vect. (#5801)
David Terei [Fri, 1 Feb 2013 01:48:37 +0000 (17:48 -0800)] 
Document -fvectorise and -favoid-vect. (#5801)

6 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Thu, 31 Jan 2013 00:28:02 +0000 (00:28 +0000)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

6 years agotypos
Gabor Greif [Thu, 24 Jan 2013 15:06:57 +0000 (16:06 +0100)] 
typos

6 years agoinclude "stg/MachRegs.h" -> include "MachRegs.h"
Simon Marlow [Wed, 30 Jan 2013 19:40:07 +0000 (19:40 +0000)] 
include "stg/MachRegs.h" -> include "MachRegs.h"

We were getting the installed compiler's MachRegs.h sometimes (in
GenApply.hs, as it turns out).  This probably caused some weird
effects...

6 years ago\#undef REG_R[1-10] as a precaution
Simon Marlow [Wed, 30 Jan 2013 19:38:33 +0000 (19:38 +0000)] 
\#undef REG_R[1-10] as a precaution

6 years agoWe should be including HaskellMachRegs.h here, not RtsMachRegs.h
Simon Marlow [Wed, 30 Jan 2013 15:42:01 +0000 (15:42 +0000)] 
We should be including HaskellMachRegs.h here, not RtsMachRegs.h

This was causing GenApply.hs to use the host architecture's register
settings rather than the target's, with the result that some
cross-compiled programs would crash.

6 years agoremove old cross-compilation stuff
Simon Marlow [Tue, 29 Jan 2013 12:00:46 +0000 (12:00 +0000)] 
remove old cross-compilation stuff

6 years agoDetect hard/soft float in the same way as other ARM features
Simon Marlow [Tue, 29 Jan 2013 11:53:35 +0000 (11:53 +0000)] 
Detect hard/soft float in the same way as other ARM features

6 years agoUse throwIO rather than throw
Ian Lynagh [Wed, 30 Jan 2013 16:37:54 +0000 (16:37 +0000)] 
Use throwIO rather than throw

6 years agoMake MonadIO a superclass of ExceptionMonad
Ian Lynagh [Wed, 30 Jan 2013 16:05:36 +0000 (16:05 +0000)] 
Make MonadIO a superclass of ExceptionMonad

6 years agoChange a few throwGhcException uses to throwGhcExceptionIO
Ian Lynagh [Wed, 30 Jan 2013 14:17:38 +0000 (14:17 +0000)] 
Change a few throwGhcException uses to throwGhcExceptionIO

6 years agoChange a few throwGhcException uses to throwGhcExceptionIO
Ian Lynagh [Wed, 30 Jan 2013 14:06:53 +0000 (14:06 +0000)] 
Change a few throwGhcException uses to throwGhcExceptionIO

6 years agoUse throwGhcExceptionIO rather than throwGhcException in InteractiveEval.hs
Ian Lynagh [Wed, 30 Jan 2013 13:53:47 +0000 (13:53 +0000)] 
Use throwGhcExceptionIO rather than throwGhcException in InteractiveEval.hs

6 years agoUse throwGhcExceptionIO rather than throwGhcException in main/DynFlags.hs
Ian Lynagh [Wed, 30 Jan 2013 13:48:41 +0000 (13:48 +0000)] 
Use throwGhcExceptionIO rather than throwGhcException in main/DynFlags.hs

6 years agoUse throwGhcExceptionIO rather than throwGhcException in main/DriverPipeline.hs
Ian Lynagh [Wed, 30 Jan 2013 13:35:47 +0000 (13:35 +0000)] 
Use throwGhcExceptionIO rather than throwGhcException in main/DriverPipeline.hs

6 years agoChange a few throwGhcException uses to throwGhcExceptionIO
Ian Lynagh [Wed, 30 Jan 2013 13:16:25 +0000 (13:16 +0000)] 
Change a few throwGhcException uses to throwGhcExceptionIO

6 years agoUse throwGhcExceptionIO rather than throwGhcException in ghci/Linker.lhs
Ian Lynagh [Wed, 30 Jan 2013 13:14:29 +0000 (13:14 +0000)] 
Use throwGhcExceptionIO rather than throwGhcException in ghci/Linker.lhs

6 years agoExpand tabs
Simon Peyton Jones [Wed, 30 Jan 2013 14:34:06 +0000 (14:34 +0000)] 
Expand tabs

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Wed, 30 Jan 2013 14:29:20 +0000 (14:29 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

Conflicts:
compiler/types/Coercion.lhs

6 years agoAdd support for *named* holes; an extension of -XTypeHoles
Simon Peyton Jones [Wed, 30 Jan 2013 12:39:07 +0000 (12:39 +0000)] 
Add support for *named* holes; an extension of -XTypeHoles

The idea is that you can use "_foo" rather than just "_"
as a "hole" in an expression, and this name shows up in
type errors etc.

The changes are very straightforward.
Thanks for Thijs Alkemade for making the running here.

6 years agoFix to 02c4ab049: use a weak pointer to the sandbox thread
Simon Marlow [Wed, 30 Jan 2013 10:34:28 +0000 (10:34 +0000)] 
Fix to 02c4ab049: use a weak pointer to the sandbox thread

Otherwise, the sandbox thread cannot be considered deadlocked by the
RTS, and conc033(ghci) hangs (amongst others).

6 years agofix warnings
Simon Marlow [Wed, 30 Jan 2013 09:46:37 +0000 (09:46 +0000)] 
fix warnings

6 years agoSTM: Only wake up once
Ben Gamari [Mon, 28 Jan 2013 16:15:08 +0000 (11:15 -0500)] 
STM: Only wake up once

Previously, threads blocked on an STM retry would be sent a wakeup
message each time an unpark was requested. This could result in the
accumulation of a large number of wake-up messages, which would slow
wake-up once the sleeping thread is finally scheduled.

Here, we introduce a new closure type, STM_AWOKEN, which marks a TSO
which has been sent a wake-up message, allowing us to send only one
wakeup.

6 years agoSchedule.h: Fix path of include file in comment
Ben Gamari [Mon, 28 Jan 2013 14:21:52 +0000 (09:21 -0500)] 
Schedule.h: Fix path of include file in comment

6 years agoAdd throwGhcExceptionIO and change a few uses of throwGhcException to use it
Ian Lynagh [Wed, 30 Jan 2013 00:15:03 +0000 (00:15 +0000)] 
Add throwGhcExceptionIO and change a few uses of throwGhcException to use it

6 years agoTweak the gen_contents_index script
Ian Lynagh [Tue, 29 Jan 2013 15:59:39 +0000 (15:59 +0000)] 
Tweak the gen_contents_index script

6 years agoTweak the mkDocs script
Ian Lynagh [Tue, 29 Jan 2013 14:26:30 +0000 (14:26 +0000)] 
Tweak the mkDocs script

6 years agoPatch for #7628: improve error message when mixing 32 and 64 bit images (on Mac OS X)
Andy Adams-Moran [Fri, 25 Jan 2013 19:11:01 +0000 (11:11 -0800)] 
Patch for #7628: improve error message when mixing 32 and 64 bit images (on Mac OS X)

6 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Tue, 29 Jan 2013 12:50:12 +0000 (12:50 +0000)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

6 years agoDisable any packages built with stage 2 when cross-compiling
Simon Marlow [Tue, 29 Jan 2013 09:34:50 +0000 (09:34 +0000)] 
Disable any  packages built with stage 2 when cross-compiling

Since we can't run stage 2 on the host.

6 years agouse GhcRtsHcOpts and GhcRtsCcOpts for the debug way too
Simon Marlow [Tue, 29 Jan 2013 09:34:12 +0000 (09:34 +0000)] 
use GhcRtsHcOpts and GhcRtsCcOpts for the debug way too

6 years agoARM: infer VFPv2 presence from the C compiler
Simon Marlow [Tue, 29 Jan 2013 09:10:20 +0000 (09:10 +0000)] 
ARM: infer VFPv2 presence from the C compiler

6 years agohopefully fix #7620
Simon Marlow [Mon, 28 Jan 2013 10:04:34 +0000 (10:04 +0000)] 
hopefully fix #7620

6 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Tue, 29 Jan 2013 09:00:25 +0000 (09:00 +0000)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Tue, 29 Jan 2013 08:57:26 +0000 (08:57 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Tue, 29 Jan 2013 08:57:26 +0000 (08:57 +0000)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

6 years agoWhen quantifying associated types, we may have TyVars involved, not just TcTyVars
Simon Peyton Jones [Tue, 29 Jan 2013 08:57:05 +0000 (08:57 +0000)] 
When quantifying associated types, we may have TyVars involved, not just TcTyVars
This required a little adjustment in zonkQuantifiedTyVars

6 years agoImprove consistency checking for associated type-family instances
Simon Peyton Jones [Tue, 29 Jan 2013 08:43:02 +0000 (08:43 +0000)] 
Improve consistency checking for associated type-family instances

The "consistency" in this case is beteween the instance head
and the associated type instance head, which is made trickier
by the presence of kind variables that are not explicitly mentioned
in the class head.

See Note [Checking consistent instantiation] in TcInstDcls

This fixes Trac #7282.

6 years agoStaticFlags code cleanup (fixes #7595)
Jan Stolarek [Wed, 16 Jan 2013 13:21:07 +0000 (14:21 +0100)] 
StaticFlags code cleanup (fixes #7595)

Function responsible for parsing the static flags, that were spread
across two modules (StaticFlags and StaticFlagParser), are now
in one file. This is analogous to dynamic flags parsing, which is
also contained within a single module.

Signed-off-by: David Terei <davidterei@gmail.com>
6 years agoFix comments on isValArg
Simon Peyton Jones [Mon, 28 Jan 2013 18:21:04 +0000 (18:21 +0000)] 
Fix comments on isValArg

6 years agoComments only
Simon Peyton Jones [Mon, 28 Jan 2013 18:12:01 +0000 (18:12 +0000)] 
Comments only

6 years agoMinor pretty printing changes only
Simon Peyton Jones [Mon, 28 Jan 2013 18:11:25 +0000 (18:11 +0000)] 
Minor pretty printing changes only

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Mon, 28 Jan 2013 13:51:55 +0000 (13:51 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoPure refactoring
Simon Peyton Jones [Mon, 28 Jan 2013 13:51:19 +0000 (13:51 +0000)] 
Pure refactoring

* Move tidyType and friends from TcType to TypeRep
  (It was always wrong to have it in TcType.)

* Move mkCoAxBranch and friends from FamInst to Coercion

* Move pprCoAxBranch and friends from FamInstEnv to Coercion

No change in functionality, though there might be a little
wibble in error message output, because I combined two different
functions both called pprCoAxBranch!

6 years agoMore refactoring of FamInst/FamInstEnv; finally fixes Trac #7524
Simon Peyton Jones [Mon, 28 Jan 2013 08:18:28 +0000 (08:18 +0000)] 
More refactoring of FamInst/FamInstEnv; finally fixes Trac #7524

Quite a bit of tidying up here; the fix to #7524 is actually
only a small part.

* Be fully clear that the cab_tvs in a CoAxBranch are not
  fresh.  See Note [CoAxBranch type variables] in CoAxiom.

* Use CoAxBranch to replace the ATDfeault type in Class.
  CoAxBranch is perfect here.  This change allowed me to
  delete quite a bit of boilerplate code, including the
  corresponding IfaceSynType.

* Tidy up the construction of CoAxBranches, and when FamIntBranch is
  freshened.  The latter onw happens only in FamInst.newFamInst.

* Tidy the tyvars of a CoAxBranch when we build them, done in
  FamInst.mkCoAxBranch.  See Note [Tidy axioms when we build them]
  in that module.  This is what fixes #7524.

Much niceer now.

6 years agoFix documentation bug: TSOs are *not* unconditionally kept on the mutable list.
Edward Z. Yang [Mon, 28 Jan 2013 02:25:34 +0000 (18:25 -0800)] 
Fix documentation bug: TSOs are *not* unconditionally kept on the mutable list.

The bug where TSOs were unconditionally kept on the mutable list was #1589
which was fixed in 04cddd339c000df6d02c90ce59dbffa58d2fe166.
Curiously enough, the commit that changed this comment
0417404f5d1230c9d291ea9f73e2831121c8ec99 occurred *after* this
change was made; I can only assume Simon Marlow accidentally forgot
that he had fixed this bug. :-)

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agouse -e rather than -d when checking for the existence of a subrepo
Patrick Palka [Sun, 13 Jan 2013 17:02:10 +0000 (12:02 -0500)] 
use -e rather than -d when checking for the existence of a subrepo

The .git file in a submodule's root directory is not necessarily a
directory, as is the case for the 'time' submodule.

This fixes #7577, where some './sync-all' operations don't detect
that the 'time' submodule is present in the repository.

6 years agoAdd a "Done." line to compare
Ian Lynagh [Sun, 27 Jan 2013 16:28:36 +0000 (16:28 +0000)] 
Add a "Done." line to compare

Makes it clearer whether it succeeded when redirecting output

6 years agoAdd a kludge to the compare tool for unicode filenames
Ian Lynagh [Sun, 27 Jan 2013 16:26:35 +0000 (16:26 +0000)] 
Add a kludge to the compare tool for unicode filenames

It thought that something impossible was happening when they
were involved.

6 years agoUse Test.Regex.PCRE instead of .Posix in compare
Ian Lynagh [Sun, 27 Jan 2013 16:18:06 +0000 (16:18 +0000)] 
Use Test.Regex.PCRE instead of .Posix in compare

This program:

    main :: IO ()
    main = do re "[^ ]" "\207"
              re "[ ]" "\207"
              re " " "\207"

    re :: String -> String -> IO ()
    re r str = let r' = makeRegex r :: Regex
                   res = matchM r' str :: Maybe (String, String, String, [String])
               in print res

prints

    Nothing
    Nothing
    Nothing

for me with Posix, but

    Just ("","\207","",[])
    Nothing
    Nothing

with PCRE. This was causing compare to fail with

    Tar line doesn't parse: "drwxrwxr-x simonmar/GHC       0 2012-12-08 21:35 ghc-7.6.1.20121207/libraries/haskeline/tests/dummy-\206\188\206\177\207\\302\\203/"

on the GHC source tarball.

6 years agoAdd support to compare for comparing whole directories
Ian Lynagh [Sun, 27 Jan 2013 15:59:34 +0000 (15:59 +0000)] 
Add support to compare for comparing whole directories

6 years agofix ARM hard float "detection"
Simon Marlow [Fri, 25 Jan 2013 20:50:43 +0000 (20:50 +0000)] 
fix ARM hard float "detection"

6 years agoImprove LLVM options for ARMv6
Simon Marlow [Fri, 25 Jan 2013 20:50:00 +0000 (20:50 +0000)] 
Improve LLVM options for ARMv6

- -float-abi=hard also works for arm v6
- pass -mattr=+vfp2 if we have VFP2

Submitted by: Karel Gardas <karel.gardas@centrum.cz>

6 years agoRemove dead code
Simon Peyton Jones [Fri, 25 Jan 2013 14:21:46 +0000 (14:21 +0000)] 
Remove dead code

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Fri, 25 Jan 2013 13:26:18 +0000 (13:26 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

Conflicts:
compiler/basicTypes/DataCon.lhs

6 years agoCollapse DmdResult into CPRResult
Simon Peyton Jones [Fri, 25 Jan 2013 13:25:00 +0000 (13:25 +0000)] 
Collapse DmdResult into CPRResult

There was no gain from PureResult; the CPRResult component
needs a BotCPR value anyhow, so it was simply duplicate computation.

6 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Fri, 25 Jan 2013 13:20:56 +0000 (13:20 +0000)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

6 years agoThe type/kind variables of a class decl scope over the associated types
Simon Peyton Jones [Fri, 25 Jan 2013 13:20:37 +0000 (13:20 +0000)] 
The type/kind variables of a class decl scope over the associated types

Fixes Trac #7601

6 years agoComments only
Simon Peyton Jones [Fri, 25 Jan 2013 12:52:37 +0000 (12:52 +0000)] 
Comments only

6 years agoRemove unused argument
Simon Peyton Jones [Fri, 25 Jan 2013 12:52:29 +0000 (12:52 +0000)] 
Remove unused argument

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Fri, 25 Jan 2013 12:50:03 +0000 (12:50 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoUse kind 'Symbol' consistently, rather than kind 'String'
Simon Peyton Jones [Fri, 25 Jan 2013 12:49:19 +0000 (12:49 +0000)] 
Use kind 'Symbol' consistently, rather than kind 'String'

6 years agoRefactor and improve the promotion inference
Simon Peyton Jones [Fri, 25 Jan 2013 12:48:06 +0000 (12:48 +0000)] 
Refactor and improve the promotion inference

It should be the case that either an entire mutually recursive
group of data type declarations can be promoted, or none of them.
It's really odd to promote some data constructors of a type but
not others. Eg
  data T a = T1 a | T2 Int
Here T1 is sort-of-promotable but T2 isn't (becuase Int isn't
promotable).

This patch makes it all-or-nothing. At the same time I've made
the TyCon point to its promoted cousin (via the tcPromoted field
of an AlgTyCon), as well as vice versa (via the ty_con field of
PromotedTyCon).

The inference for the group is done in TcTyDecls, the same place
that infers which data types are recursive, another global question.

6 years agoAllow -fllvm to be used when compiling unregisterised (#7622)
Simon Marlow [Fri, 25 Jan 2013 09:54:49 +0000 (09:54 +0000)] 
Allow -fllvm to be used when compiling unregisterised (#7622)

6 years agoFix various issues with a Stage1Only=NO cross-compile
Simon Marlow [Fri, 25 Jan 2013 08:48:03 +0000 (08:48 +0000)] 
Fix various issues with a Stage1Only=NO cross-compile

6 years agoAdded support to cross-compile to android
Nathan [Wed, 23 Jan 2013 17:07:19 +0000 (18:07 +0100)] 
Added support to cross-compile to android

Signed-off-by: David Terei <davidterei@gmail.com>
6 years agodo not use -rpath-link linker option on Solaris.
David Terei [Thu, 24 Jan 2013 21:45:56 +0000 (13:45 -0800)] 
do not use -rpath-link linker option on Solaris.

Patch from Karel Gardas <karel.gardas@centrum.cz>.

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 24 Jan 2013 15:46:20 +0000 (15:46 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoComments only
Simon Peyton Jones [Thu, 24 Jan 2013 15:45:35 +0000 (15:45 +0000)] 
Comments only

6 years agoUse fsep, not sep, when printing lots of Core binders
Simon Peyton Jones [Thu, 24 Jan 2013 14:51:12 +0000 (14:51 +0000)] 
Use fsep, not sep, when printing lots of Core binders

6 years agoComments only
Simon Peyton Jones [Thu, 24 Jan 2013 14:50:59 +0000 (14:50 +0000)] 
Comments only

6 years agoIntroduce CPR for sum types (Trac #5075)
Simon Peyton Jones [Thu, 24 Jan 2013 14:50:50 +0000 (14:50 +0000)] 
Introduce CPR for sum types (Trac #5075)

The main payload of this patch is to extend CPR so that it
detects when a function always returns a result constructed
with the *same* constructor, even if the constructor comes from
a sum type.  This doesn't matter very often, but it does improve
some things (results below).

Binary sizes increase a little bit, I think because there are more
wrappers.  This with -split-objs.  Without split-ojbs binary sizes
increased by 6% even for HelloWorld.hs.  It's hard to see exactly why,
but I think it was because System.Posix.Types.o got included in the
linked binary, whereas it didn't before.

        Program           Size    Allocs   Runtime   Elapsed  TotalMem
          fluid          +1.8%     -0.3%      0.01      0.01     +0.0%
            tak          +2.2%     -0.2%      0.02      0.02     +0.0%
           ansi          +1.7%     -0.3%      0.00      0.00     +0.0%
      cacheprof          +1.6%     -0.3%     +0.6%     +0.5%     +1.4%
        parstof          +1.4%     -4.4%      0.00      0.00     +0.0%
        reptile          +2.0%     +0.3%      0.02      0.02     +0.0%
----------------------------------------------------------------------
            Min          +1.1%     -4.4%     -4.7%     -4.7%    -15.0%
            Max          +2.3%     +0.3%     +8.3%     +9.4%    +50.0%
 Geometric Mean          +1.9%     -0.1%     +0.6%     +0.7%     +0.3%

Other things in this commit
~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Got rid of the Lattice class in Demand

* Refactored the way that products and newtypes are
  decomposed (no change in functionality)

6 years agoPrint infix type constructors in back-ticks
Simon Peyton Jones [Thu, 24 Jan 2013 13:49:32 +0000 (13:49 +0000)] 
Print infix type constructors in back-ticks

Fixes Trac #7609

6 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Thu, 24 Jan 2013 13:19:31 +0000 (13:19 +0000)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

6 years agoghc: mkGmpDerivedConstants binary gone away
Sergei Trofimovich [Wed, 23 Jan 2013 23:04:23 +0000 (02:04 +0300)] 
ghc: mkGmpDerivedConstants binary gone away

6 years agofix rts/Linker compilation issues on AMD64/Solaris platform
Simon Marlow [Wed, 23 Jan 2013 10:23:08 +0000 (10:23 +0000)] 
fix rts/Linker compilation issues on AMD64/Solaris platform

Submitted by: Karel Gardas <karel.gardas@centrum.cz>

6 years agoSolaris: do not use timer_create
Simon Marlow [Wed, 23 Jan 2013 10:22:47 +0000 (10:22 +0000)] 
Solaris: do not use timer_create

Submitted by: Karel Gardas <karel.gardas@centrum.cz>

6 years agoTidy up: move info-table related stuff to CmmInfo
Simon Marlow [Wed, 23 Jan 2013 10:19:25 +0000 (10:19 +0000)] 
Tidy up: move info-table related stuff to CmmInfo

Prep for #709

6 years agofix validate-breaking warning
Simon Marlow [Wed, 23 Jan 2013 09:27:40 +0000 (09:27 +0000)] 
fix validate-breaking warning

6 years agoAdd support for nto-qnx (BlackBerry 10)
Simon Marlow [Wed, 23 Jan 2013 09:21:39 +0000 (09:21 +0000)] 
Add support for nto-qnx (BlackBerry 10)

Submitted by: Stephen Paul Weber <singpolyma@singpolyma.net>

6 years agoFix our handling of literals and types in LLVM (#7575).
David Terei [Wed, 23 Jan 2013 08:38:43 +0000 (00:38 -0800)] 
Fix our handling of literals and types in LLVM (#7575).

This bug was introduced in the recent fix for #7571, that extended some
existing infastructure in the LLVM backend that handled the conflict
between LLVM's return type from comparison operations (i1) and what GHC
expects (word). By extending it to handle literals though, we forced all
literals to be i1 or word, breaking other code.

This patch resolves this breakage and handles #7571 still, cleaning up
the code for both a little. The overall approach is not ideal but
changing that is left for the future.

6 years agoFix llvm backend when 32bit build on 64bit OSX. (#7617)
David Terei [Wed, 23 Jan 2013 07:05:46 +0000 (23:05 -0800)] 
Fix llvm backend when 32bit build on 64bit OSX. (#7617)

6 years agoAllow CaseElim if the case binder is the next thing to be eval'd
Simon Peyton Jones [Tue, 22 Jan 2013 22:46:33 +0000 (22:46 +0000)] 
Allow CaseElim if the case binder is the next thing to be eval'd

This makes CaseElim happen a bit more often.
See Note [Case binder next] in Simplify.
This came up when investigating Trac #7542.

6 years agoAllow eta-reduction of eval'd functions if of arity 1
Simon Peyton Jones [Tue, 22 Jan 2013 22:43:22 +0000 (22:43 +0000)] 
Allow eta-reduction of eval'd functions if of arity 1

See Note [Eta reduction of an eval'd function] in CoreUtils.
This doesn't fix Trac #7542, but that was the ticket that
pointed out this infelicity.

6 years agoComments only
Simon Peyton Jones [Tue, 22 Jan 2013 22:39:39 +0000 (22:39 +0000)] 
Comments only

6 years agoEnsure the LLVM codegen correctly handles literals in a branch. #7571
Austin Seipp [Sun, 13 Jan 2013 04:34:05 +0000 (04:34 +0000)] 
Ensure the LLVM codegen correctly handles literals in a branch. #7571

We need to be sure that when generating code for literals, we properly narrow
the type of the literal to i1. See Note [Literals and branch conditions] in the
LlvmCodeGen.CodeGen module.

This occurs rarely as the optimizer will remove conditional branches with
literals, however we can get this situation occurring with hand written Cmm
code.

This fixes Trac #7571.

Signed-off-by: David Terei <davidterei@gmail.com>
6 years agoUse pprTypeForUser when printing kinds in ghci
Simon Peyton Jones [Tue, 22 Jan 2013 17:34:30 +0000 (17:34 +0000)] 
Use pprTypeForUser when printing kinds in ghci

6 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Tue, 22 Jan 2013 17:01:49 +0000 (17:01 +0000)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

6 years agoWhen printing types in the interactive UI, take account of free variables
Simon Peyton Jones [Tue, 22 Jan 2013 17:01:30 +0000 (17:01 +0000)] 
When printing types in the interactive UI, take account of free variables

Often the types we print are full-generalised, but in fact *kinds* are
not, so we need to use tidyOpenType.

Fixes Trac #7587

6 years agoExploit the invariant for AxInstCo to simplify coercionKind
Simon Peyton Jones [Tue, 22 Jan 2013 16:57:35 +0000 (16:57 +0000)] 
Exploit the invariant for AxInstCo to simplify coercionKind

6 years agoComments only
Simon Peyton Jones [Tue, 22 Jan 2013 16:57:07 +0000 (16:57 +0000)] 
Comments only