ghc.git
7 years agoImplement FastBytes, and use it for MachStr
Ian Lynagh [Sat, 14 Jul 2012 19:48:42 +0000 (20:48 +0100)] 
Implement FastBytes, and use it for MachStr

This is a first step on the way to refactoring the FastString type.

FastBytes currently has no unique, mainly because there isn't currently
a nice way to produce them in Binary.

Also, we don't currently do the "Dictionary" thing with FastBytes in
Binary. I'm not sure whether this is important.

We can change both decisions later, but in the meantime this gets the
refactoring underway.

7 years agoFix a CPP typo
Ian Lynagh [Sat, 14 Jul 2012 17:05:37 +0000 (18:05 +0100)] 
Fix a CPP typo

7 years agoWhitespace only in RnEnv
Ian Lynagh [Sat, 14 Jul 2012 17:00:59 +0000 (18:00 +0100)] 
Whitespace only in RnEnv

7 years agoAdd a missing semi-colon
Ian Lynagh [Sat, 14 Jul 2012 16:57:20 +0000 (17:57 +0100)] 
Add a missing semi-colon

7 years agoWhitespace only in Unique
Ian Lynagh [Sat, 14 Jul 2012 16:44:55 +0000 (17:44 +0100)] 
Whitespace only in Unique

7 years agoAdd some casts to fix warnings
Ian Lynagh [Sat, 14 Jul 2012 16:22:10 +0000 (17:22 +0100)] 
Add some casts to fix warnings

7 years agoFix typo
Ian Lynagh [Sat, 14 Jul 2012 15:09:49 +0000 (16:09 +0100)] 
Fix typo

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Sat, 14 Jul 2012 15:07:51 +0000 (16:07 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoMerge remote branch 'mikolaj/dcoutts'
Ian Lynagh [Sat, 14 Jul 2012 14:29:31 +0000 (15:29 +0100)] 
Merge remote branch 'mikolaj/dcoutts'

7 years agoDo not discard insoluble constraints in simplifyInfer
Simon Peyton Jones [Sat, 14 Jul 2012 12:18:34 +0000 (13:18 +0100)] 
Do not discard insoluble constraints in simplifyInfer

Before -fdefer-type-errors there we no insolubles
(because we'd have failed before then), but with -fdefer-type-errors
there can be.  The code is acutally a bit simpler: we just call
emitConstraints, and eliminate the bogus-looking emitWC from TcRnMonad.

There's a bit more tidying up to do, concerning the places we use
keepWanted, but I need to talk to Dimitrios about that.

Meanwhile this fixes Trac #7023

7 years agoComments only
Simon Peyton Jones [Sat, 14 Jul 2012 12:13:45 +0000 (13:13 +0100)] 
Comments only

7 years agoComments only
Simon Peyton Jones [Sat, 14 Jul 2012 12:13:24 +0000 (13:13 +0100)] 
Comments only

7 years agoComments about associated type tyvar naming
Simon Peyton Jones [Sat, 14 Jul 2012 12:12:59 +0000 (13:12 +0100)] 
Comments about associated type tyvar naming

7 years agoWhen checking associated type instances, check that
Simon Peyton Jones [Sat, 14 Jul 2012 12:12:13 +0000 (13:12 +0100)] 
When checking associated type instances, check that
the *type* indices match those of the class instance.
We don't need to track tke kind indices, and indeed
thay don't have the same careful name scoping.
See the notes in checkValidClass.

Fixes Trac #7073

7 years agoSmall tidy-up
Ian Lynagh [Fri, 13 Jul 2012 17:28:14 +0000 (18:28 +0100)] 
Small tidy-up

7 years agoDon't use tracingDynFlags in assertPprPanic
Ian Lynagh [Fri, 13 Jul 2012 17:15:57 +0000 (18:15 +0100)] 
Don't use tracingDynFlags in assertPprPanic

It wasn't needed, but was left over as an oversight

7 years agoFix build with GHC 7.0
Ian Lynagh [Fri, 13 Jul 2012 17:14:01 +0000 (18:14 +0100)] 
Fix build with GHC 7.0

7 years agoDocument bug in the x86 NCG w.r.t. -fexcess-precision (#7069)
Simon Marlow [Fri, 13 Jul 2012 09:23:12 +0000 (10:23 +0100)] 
Document bug in the x86 NCG w.r.t. -fexcess-precision (#7069)

7 years agoUse dumpSDoc functions to output rules (#7060)
Paolo Capriotti [Thu, 12 Jul 2012 16:53:50 +0000 (17:53 +0100)] 
Use dumpSDoc functions to output rules (#7060)

Make -ddump-rules, -ddump-rule-firings and -ddump-rule-rewrites
behave like the other -ddump flags, by using the dumpSDoc function
instance of pprDefiniteTrace.

7 years agoAdd MonadIO instance to SimplM.
Paolo Capriotti [Thu, 12 Jul 2012 16:49:41 +0000 (17:49 +0100)] 
Add MonadIO instance to SimplM.

7 years agoAdd IO to the SimplM monad.
Paolo Capriotti [Thu, 12 Jul 2012 16:46:23 +0000 (17:46 +0100)] 
Add IO to the SimplM monad.

This is needed to turn the rule-firings traces into proper output.

7 years agoLink the extra-libraries when making a .so for a package (#7062)
Simon Marlow [Wed, 11 Jul 2012 13:32:47 +0000 (14:32 +0100)] 
Link the extra-libraries when making a .so for a package (#7062)

I don't think I completely understand what's going on here, but this
does seem to fix it, and morally it seems like the right thing.

7 years agoProfiling: don't report IDLE time by default
Simon Marlow [Wed, 11 Jul 2012 10:29:24 +0000 (11:29 +0100)] 
Profiling: don't report IDLE time by default

You can get it with +RTS -P, as with the other systemish cost centres
like "GC".

7 years agoAllow 'default' declarations in GHCi
Patrick Palka [Sun, 8 Jul 2012 16:49:22 +0000 (12:49 -0400)] 
Allow 'default' declarations in GHCi

7 years agoFix build for non x86/x86_64 (#7065)
Paolo Capriotti [Wed, 11 Jul 2012 13:07:19 +0000 (14:07 +0100)] 
Fix build for non x86/x86_64 (#7065)

7 years agoadjustHpBackwards before calling a let-no-escape
Simon Marlow [Tue, 10 Jul 2012 13:29:56 +0000 (14:29 +0100)] 
adjustHpBackwards before calling a let-no-escape

7 years agoSupport the 2-result primops in the new code generator
Simon Marlow [Tue, 10 Jul 2012 11:51:04 +0000 (12:51 +0100)] 
Support the 2-result primops in the new code generator

7 years agoremove some redundant SRT-related stuff
Simon Marlow [Mon, 9 Jul 2012 15:46:02 +0000 (16:46 +0100)] 
remove some redundant SRT-related stuff

7 years agoFix overlapping patterns warning (#7065)
Paolo Capriotti [Tue, 10 Jul 2012 09:36:03 +0000 (10:36 +0100)] 
Fix overlapping patterns warning (#7065)

7 years agoMake a little more of the GHCi internal API configurable
David Terei [Tue, 10 Jul 2012 21:21:07 +0000 (14:21 -0700)] 
Make a little more of the GHCi internal API configurable

7 years agoHave a go at fixing the heap info DTrace build failue on OSX
Duncan Coutts [Tue, 3 Jul 2012 18:57:05 +0000 (19:57 +0100)] 
Have a go at fixing the heap info DTrace build failue on OSX

This patch will need to be tested by someone on OSX.

Fixed a couple wrong names:
  CapsetID vs EventCapsetID
  gc__sync vs gc__global__sync

7 years agoEmit the task-tracking events
Duncan Coutts [Tue, 3 Jul 2012 18:48:11 +0000 (19:48 +0100)] 
Emit the task-tracking events

Based on initial patches by Mikolaj Konarski <mikolaj@well-typed.com>

Use the new task tracing functions traceTaskCreate/Migrate/Delete.
There are two key places. One is for worker tasks which have a
relatively simple life cycle. Worker tasks are created and deleted by
the RTS. The other case is bound tasks which are either created by the
RTS, or appear as foreign C threads making calls into the RTS. For bound
threads we do the tracing in rts_lock/unlock, which actually covers both
threads coming in from outside, and also bound threads made by the RTS.

7 years agoDefine the task-tracking events
Duncan Coutts [Tue, 3 Jul 2012 18:28:40 +0000 (19:28 +0100)] 
Define the task-tracking events

Based on initial patches by Mikolaj Konarski <mikolaj@well-typed.com>

These new eventlog events are to let profiling tools keep track of all
the OS threads that belong to an RTS capability at any moment in time.
In the RTS, OS threads correspond to the Task abstraction, so that is
what we track. There are events for tasks being created, migrated
between capabilities and deleted. In particular the task creation event
also records the kernel thread id which lets us match up the OS thread
with data collected by others tools (in the initial use case with
Linux's perf tool, but in principle also with DTrace).

7 years agoMerge branch 'master' of ../HEAD
Simon Peyton Jones [Tue, 10 Jul 2012 15:20:49 +0000 (16:20 +0100)] 
Merge branch 'master' of ../HEAD

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Tue, 10 Jul 2012 15:18:54 +0000 (16:18 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoBe careful not to look for Functor unnecessarily
Simon Peyton Jones [Tue, 10 Jul 2012 15:15:16 +0000 (16:15 +0100)] 
Be careful not to look for Functor unnecessarily

Otherwise we try to load package 'base' when
we are compiling 'ghc-prim'.
See Note [Getting base classes]

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Tue, 10 Jul 2012 15:04:30 +0000 (16:04 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

Conflicts:
compiler/typecheck/TcRnDriver.lhs

7 years agoMore changes to kind inference for type and class declarations
Simon Peyton Jones [Tue, 10 Jul 2012 15:02:03 +0000 (16:02 +0100)] 
More changes to kind inference for type and class declarations

These should fix #7024 and #7022, among others.

The main difficulty was that we were getting occ-name clashes
between kind and type variables in TyCons, when spat into an
interface file. The new scheme is to tidy TyCons during the
conversoin into IfaceSyn, rather than trying to generate them
pre-tidied, which was the already-unsatisfactory previous plan.

There is the usual wave of refactorig as well.

7 years agoRemove dead code
Simon Peyton Jones [Tue, 10 Jul 2012 14:58:53 +0000 (15:58 +0100)] 
Remove dead code

7 years agoRemove dead code
Simon Peyton Jones [Tue, 10 Jul 2012 14:57:43 +0000 (15:57 +0100)] 
Remove dead code

7 years agoTidy up validity checking of types, esp in contexts
Simon Peyton Jones [Tue, 10 Jul 2012 14:56:55 +0000 (15:56 +0100)] 
Tidy up validity checking of types, esp in contexts

7 years agoSuppress ambiguity errors if there are other solid errors to report
Simon Peyton Jones [Tue, 10 Jul 2012 14:49:02 +0000 (15:49 +0100)] 
Suppress ambiguity errors if there are other solid errors to report

7 years agoComments and pretty printing
Simon Peyton Jones [Tue, 10 Jul 2012 14:48:03 +0000 (15:48 +0100)] 
Comments and pretty printing

7 years agoParallelise clearNurseries() in the parallel GC
Simon Marlow [Tue, 10 Jul 2012 08:57:53 +0000 (09:57 +0100)] 
Parallelise clearNurseries() in the parallel GC

The clearNurseries() operation resets the free pointer in each nursery
block to the start of the block, emptying the nursery.  In the
parallel GC this was done on the main GC thread, but that's bad
because it accesses the bdescr of every nursery block, and move all
those cache lines onto the CPU of the main GC thread.  With large
nurseries, this can be especially bad.  So instead we want to clear
each nursery in its local GC thread.

Thanks to Andreas Voellmy <andreas.voellmy@gmail.com> for idenitfying
the issue.

After this change and the previous patch to make the last GC a major
one, I see these results for nofib/parallel on 8 cores:

   blackscholes          +0.0%     +0.0%     -3.7%     -3.3%     +0.3%
          coins          +0.0%     +0.0%     -5.1%     -5.0%     +0.4%
           gray          +0.0%     +0.0%     -4.5%     -2.1%     +0.8%
         mandel          +0.0%     -0.0%     -7.6%     -5.1%     -2.3%
        matmult          +0.0%     +5.5%     -2.8%     -1.9%     -5.8%
        minimax          +0.0%     +0.0%    -10.6%    -10.5%     +0.0%
          nbody          +0.0%     -4.4%     +0.0%      0.07     +0.0%
         parfib          +0.0%     +1.0%     +0.5%     +0.9%     +0.0%
        partree          +0.0%     +0.0%     -2.4%     -2.5%     +1.7%
           prsa          +0.0%     -0.2%     +1.8%     +4.2%     +0.0%
         queens          +0.0%     -0.0%     -1.8%     -1.4%     -4.8%
            ray          +0.0%     -0.6%    -18.5%    -17.8%     +0.0%
       sumeuler          +0.0%     -0.0%     -3.7%     -3.7%     +0.0%
      transclos          +0.0%     -0.0%    -25.7%    -26.6%     +0.0%
--------------------------------------------------------------------------------
            Min          +0.0%     -4.4%    -25.7%    -26.6%     -5.8%
            Max          +0.0%     +5.5%     +1.8%     +4.2%     +1.7%
 Geometric Mean          +0.0%     +0.1%     -6.3%     -6.1%     -0.7%

7 years agoThe final GC should be a major one
Simon Marlow [Tue, 5 Jun 2012 20:17:00 +0000 (21:17 +0100)] 
The final GC should be a major one

We do a final GC before shutting down the system, to clean up.
However, we were doing an ordinary GC rather than forcing a major GC,
so especially when the allocation area is large, this final GC could
be expensive.  This is really just a bug - the final GC should have
virtually nothing to do, because there is nothing live.

7 years agoDon't duplicate arbitrary CmmCalls
Simon Marlow [Mon, 9 Jul 2012 15:23:21 +0000 (16:23 +0100)] 
Don't duplicate arbitrary CmmCalls

7 years agoTrack liveness of GlobalRegs in the new code generator
Simon Marlow [Mon, 9 Jul 2012 15:08:21 +0000 (16:08 +0100)] 
Track liveness of GlobalRegs in the new code generator

This gives the register allocator access to R1.., F1.., D1.. etc. for
the new code generator, and is a cheap way to eliminate all the extra
"x = R1" assignments that we get from copyIn.

7 years agoDon't look for objdump on OS X
Max Bolingbroke [Mon, 9 Jul 2012 14:05:39 +0000 (15:05 +0100)] 
Don't look for objdump on OS X

7 years agoDon't re-allocate %esi on x86.
Simon Marlow [Mon, 9 Jul 2012 12:16:53 +0000 (13:16 +0100)] 
Don't re-allocate %esi on x86.

Recent changes have freed up %esi for general use on x86 when it is
not being used for R1.  However, x86 has a non-uniform register
architecture where there is no 8-bit equivalent of %esi.  The register
allocators aren't sophisticated enough to cope with this, so we have
to back off and treat %esi as non-allocatable for now.  (of course,
LLVM doesn't suffer from this problem)

One workaround would be to change the calling convention to use %rbx
for R1, however we can't change the calling convention now without
patching LLVM too.

7 years agoFix compile failure on non x86/x86-64 (#7054).
Erik de Castro Lopo [Sat, 7 Jul 2012 01:32:21 +0000 (11:32 +1000)] 
Fix compile failure on non x86/x86-64 (#7054).

7 years agoNew functions to get kernel thread Id + serialisable task Id
Duncan Coutts [Tue, 3 Jul 2012 18:18:46 +0000 (19:18 +0100)] 
New functions to get kernel thread Id + serialisable task Id

On most platforms the userspace thread type (e.g. pthread_t) and kernel
thread id are different. Normally we don't care about kernel thread Ids,
but some system tools for tracing/profiling etc report kernel ids.
For example Solaris and OSX's DTrace and Linux's perf tool report kernel
thread ids. To be able to match these up with RTS's OSThread we need a
way to get at the kernel thread, so we add a new function for to do just
that (the implementation is system-dependent).

Additionally, strictly speaking the OSThreadId type, used as task ids,
is not a serialisable representation. On unix OSThreadId is a typedef for
pthread_t, but pthread_t is not guaranteed to be a numeric type.
Indeed on some systems pthread_t is a pointer and in principle it
could be a structure type. So we add another new function to get a
serialisable representation of an OSThreadId. This is only for use
in log files. We use the function to serialise an id of a task,
with the extra feature that it works in non-threaded builds
by always returning 1.

7 years agofix warning
Simon Marlow [Fri, 6 Jul 2012 15:09:23 +0000 (16:09 +0100)] 
fix warning

7 years agoput back the newtype around Label
Simon Marlow [Fri, 6 Jul 2012 13:32:14 +0000 (14:32 +0100)] 
put back the newtype around Label

Having all BlockIds print as integers was a pain for debugging.

7 years agoAllow the register allocator access to argument regs (R1.., F1.., etc.)
Simon Marlow [Fri, 6 Jul 2012 12:32:22 +0000 (13:32 +0100)] 
Allow the register allocator access to argument regs (R1.., F1.., etc.)

This was made possible by the recent change to codeGen to attach the
live GlobalRegs to every CmmJump, and we'll be relying on it quite
heavily in the new code generator too.

What this means essentially is that when we see

  x = R1

the register allocator will automatically assign x to R1 and generate
no code at all (also known as "coalescing"). It wasn't possible before
because the register allocator had to assume that R1 was always live,
because it didn't have access to accurate liveness information.

7 years agobugfix: coalescing moves from RealReg to VirtualReg got broken at some point
Simon Marlow [Fri, 6 Jul 2012 12:20:44 +0000 (13:20 +0100)] 
bugfix: coalescing moves from RealReg to VirtualReg got broken at some point

7 years agoGenerate slightly less crap to be cleaned up later
Simon Marlow [Fri, 6 Jul 2012 10:27:07 +0000 (11:27 +0100)] 
Generate slightly less crap to be cleaned up later

7 years agoRename BTail -> BCons, BHead -> BSnoc
Simon Marlow [Fri, 6 Jul 2012 10:21:33 +0000 (11:21 +0100)] 
Rename BTail -> BCons, BHead -> BSnoc

7 years agodo a pass over this file, remove obsolete stuff
Simon Marlow [Thu, 5 Jul 2012 14:24:33 +0000 (15:24 +0100)] 
do a pass over this file, remove obsolete stuff

7 years agoAdd documentation for -interactive-print (#5461)
Paolo Capriotti [Thu, 5 Jul 2012 18:46:52 +0000 (19:46 +0100)] 
Add documentation for -interactive-print (#5461)

Based on a patch by Vitaly Bragilevsky <bravit111@gmail.com>

7 years agoDelete some unused code
Simon Marlow [Thu, 5 Jul 2012 13:24:50 +0000 (14:24 +0100)] 
Delete some unused code

7 years agoMerge remote-tracking branch 'origin/master' into newcg
Simon Marlow [Thu, 5 Jul 2012 12:38:32 +0000 (13:38 +0100)] 
Merge remote-tracking branch 'origin/master' into newcg

* origin/master:
  prefer later defined commands (fixes #3858)

7 years agoRemove "fuel", adapt to Hoopl changes, fix warnings
Simon Marlow [Thu, 5 Jul 2012 12:23:21 +0000 (13:23 +0100)] 
Remove "fuel", adapt to Hoopl changes, fix warnings

7 years agoFix merge-related problems
Simon Marlow [Wed, 4 Jul 2012 12:19:26 +0000 (13:19 +0100)] 
Fix merge-related problems

7 years agoMerge remote-tracking branch 'origin/master' into newcg
Simon Marlow [Wed, 4 Jul 2012 09:34:48 +0000 (10:34 +0100)] 
Merge remote-tracking branch 'origin/master' into newcg

* origin/master: (756 commits)
  don't crash if argv[0] == NULL (#7037)
  -package P was loading all versions of P in GHCi (#7030)
  Add a Note, copying text from #2437
  improve the --help docs a bit (#7008)
  Copy Data.HashTable's hashString into our Util module
  Build fix
  Build fixes
  Parse error: suggest brackets and indentation.
  Don't build the ghc DLL on Windows; works around trac #5987
  On Windows, detect if DLLs have too many symbols; trac #5987
  Add some more Integer rules; fixes #6111
  Fix PA dfun construction with silent superclass args
  Add silent superclass parameters to the vectoriser
  Add silent superclass parameters (again)
  Mention Generic1 in the user's guide
  Make the GHC API a little more powerful.
  tweak llvm version warning message
  New version of the patch for #5461.
  Fix Word64ToInteger conversion rule.
  Implemented feature request on reconfigurable pretty-printing in GHCi (#5461)
  ...

Conflicts:
compiler/basicTypes/UniqSupply.lhs
compiler/cmm/CmmBuildInfoTables.hs
compiler/cmm/CmmLint.hs
compiler/cmm/CmmOpt.hs
compiler/cmm/CmmPipeline.hs
compiler/cmm/CmmStackLayout.hs
compiler/cmm/MkGraph.hs
compiler/cmm/OldPprCmm.hs
compiler/codeGen/CodeGen.lhs
compiler/codeGen/StgCmm.hs
compiler/codeGen/StgCmmBind.hs
compiler/codeGen/StgCmmLayout.hs
compiler/codeGen/StgCmmUtils.hs
compiler/main/CodeOutput.lhs
compiler/main/HscMain.hs
compiler/nativeGen/AsmCodeGen.lhs
compiler/simplStg/SimplStg.lhs

7 years agoprefer later defined commands (fixes #3858)
Peter Hercek [Tue, 15 May 2012 14:02:48 +0000 (16:02 +0200)] 
prefer later defined commands (fixes #3858)

7 years agoAdd an experimental sinking pass
Simon Marlow [Tue, 3 Jul 2012 14:19:34 +0000 (15:19 +0100)] 
Add an experimental sinking pass

7 years agono need to check for unreachable blocks with -fnew-codegen
Simon Marlow [Tue, 3 Jul 2012 14:19:15 +0000 (15:19 +0100)] 
no need to check for unreachable blocks with -fnew-codegen

we've already done it

7 years agomainly tidyup
Simon Marlow [Tue, 3 Jul 2012 14:18:33 +0000 (15:18 +0100)] 
mainly tidyup

7 years agodon't crash if argv[0] == NULL (#7037)
Simon Marlow [Mon, 2 Jul 2012 14:55:20 +0000 (15:55 +0100)] 
don't crash if argv[0] == NULL (#7037)

7 years ago-package P was loading all versions of P in GHCi (#7030)
Simon Marlow [Mon, 2 Jul 2012 14:04:05 +0000 (15:04 +0100)] 
-package P was loading all versions of P in GHCi (#7030)

-package P means "the latest version of P" if multiple versions are
installed.  It was working as advertised, but we were
eagerly *linking* all versions of P, which might cause an error if the
package has some C code, because we can't link multiple instances of
the same symbol.

7 years agoAdd a Note, copying text from #2437
Simon Marlow [Mon, 2 Jul 2012 13:52:12 +0000 (14:52 +0100)] 
Add a Note, copying text from #2437

7 years agoimprove the --help docs a bit (#7008)
Simon Marlow [Mon, 2 Jul 2012 12:16:13 +0000 (13:16 +0100)] 
improve the --help docs a bit (#7008)

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Sat, 30 Jun 2012 00:30:20 +0000 (01:30 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoCopy Data.HashTable's hashString into our Util module
Ian Lynagh [Fri, 29 Jun 2012 23:45:42 +0000 (00:45 +0100)] 
Copy Data.HashTable's hashString into our Util module

Data.HashTable is now deprecated and will soon be removed, but
deSugar/Coverage.lhs uses hashString.

7 years agoBuild fix
Ian Lynagh [Fri, 29 Jun 2012 20:54:28 +0000 (21:54 +0100)] 
Build fix

7 years agoBuild fixes
Ian Lynagh [Fri, 29 Jun 2012 18:26:14 +0000 (19:26 +0100)] 
Build fixes

7 years agoParse error: suggest brackets and indentation.
Eric Kow [Wed, 27 Jun 2012 11:59:59 +0000 (12:59 +0100)] 
Parse error: suggest brackets and indentation.

I have observed that whenever GHC tells me that I have possibly
incorrect indentation, the real problem is often that I forgot
to close some sort of bracket.

7 years agoDon't build the ghc DLL on Windows; works around trac #5987
Ian Lynagh [Fri, 29 Jun 2012 16:47:32 +0000 (17:47 +0100)] 
Don't build the ghc DLL on Windows; works around trac #5987

We also don't build DLLs for the dph-lifted-* packages as they depend
on ghc.

7 years agoOn Windows, detect if DLLs have too many symbols; trac #5987
Ian Lynagh [Fri, 29 Jun 2012 00:33:17 +0000 (01:33 +0100)] 
On Windows, detect if DLLs have too many symbols; trac #5987

The test isn't very pretty; it involves trawling through the
objdump -p output. I couldn't find an easier way, unfortuantely.

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Wed, 27 Jun 2012 20:51:29 +0000 (21:51 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoAdd some more Integer rules; fixes #6111
Ian Lynagh [Wed, 27 Jun 2012 20:49:57 +0000 (21:49 +0100)] 
Add some more Integer rules; fixes #6111

7 years agoFix PA dfun construction with silent superclass args
Manuel M T Chakravarty [Wed, 27 Jun 2012 10:39:09 +0000 (20:39 +1000)] 
Fix PA dfun construction with silent superclass args

7 years agoAdd silent superclass parameters to the vectoriser
Manuel M T Chakravarty [Wed, 27 Jun 2012 03:54:12 +0000 (13:54 +1000)] 
Add silent superclass parameters to the vectoriser

7 years agoAdd silent superclass parameters (again)
Simon Peyton Jones [Sun, 27 May 2012 21:31:43 +0000 (22:31 +0100)] 
Add silent superclass parameters (again)

Silent superclass parameters solve the problem that
the superclasses of a dicionary construction can easily
turn out to be (wrongly) bottom.  The problem and solution
are described in
   Note [Silent superclass arguments] in TcInstDcls

I first implemented this fix (with Dimitrios) in Dec 2010, but removed
it again in Jun 2011 becuase we thought it wasn't necessary any
more. (The reason we thought it wasn't necessary is that we'd stopped
generating derived superclass constraints for *wanteds*.  But we were
wrong; that didn't solve the superclass-loop problem.)

So we have to re-implement it.  It's not hard.  Main features:

  * The IdDetails for a DFunId says how many silent arguments it has

  * A DFunUnfolding describes which dictionary args are
    just parameters (DFunLamArg) and which are a function to apply
    to the parameters (DFunPolyArg).  This adds the DFunArg type
    to CoreSyn

  * Consequential changes to IfaceSyn.  (Binary hi file format changes
    slightly.)

  * TcInstDcls changes to generate the right dfuns

  * CoreSubst.exprIsConApp_maybe handles the new DFunUnfolding

The thing taht is *not* done yet is to alter the vectoriser to
pass the relevant extra argument when building a PA dictionary.

7 years agoMention Generic1 in the user's guide
Jose Pedro Magalhaes [Tue, 26 Jun 2012 14:07:20 +0000 (15:07 +0100)] 
Mention Generic1 in the user's guide

7 years agoMake the GHC API a little more powerful.
David Terei [Tue, 26 Jun 2012 00:33:05 +0000 (17:33 -0700)] 
Make the GHC API a little more powerful.

7 years agotweak llvm version warning message
David Terei [Mon, 25 Jun 2012 19:17:41 +0000 (12:17 -0700)] 
tweak llvm version warning message

7 years agoNew version of the patch for #5461.
Paolo Capriotti [Mon, 25 Jun 2012 12:45:03 +0000 (13:45 +0100)] 
New version of the patch for #5461.

7 years agoFix Word64ToInteger conversion rule.
Paolo Capriotti [Mon, 25 Jun 2012 10:31:52 +0000 (11:31 +0100)] 
Fix Word64ToInteger conversion rule.

7 years agoImplemented feature request on reconfigurable pretty-printing in GHCi (#5461)
Vitaly Bragilesky [Thu, 21 Jun 2012 08:26:29 +0000 (12:26 +0400)] 
Implemented feature request on reconfigurable pretty-printing in GHCi (#5461)

7 years agoUse errorMsg over putMsg when appropriate.
David Terei [Mon, 25 Jun 2012 08:43:04 +0000 (01:43 -0700)] 
Use errorMsg over putMsg when appropriate.

7 years agoWarn if using unsupported version of LLVM.
David Terei [Mon, 25 Jun 2012 08:42:44 +0000 (01:42 -0700)] 
Warn if using unsupported version of LLVM.

7 years agoFix #6158. LLVM 3.1 doesn't like certain constructions that 3.0 and
David Terei [Mon, 25 Jun 2012 07:51:47 +0000 (00:51 -0700)] 
Fix #6158. LLVM 3.1 doesn't like certain constructions that 3.0 and
earlier did, so we avoid them.

7 years agoRemove the ID Monad
Ian Lynagh [Sat, 23 Jun 2012 01:18:22 +0000 (02:18 +0100)] 
Remove the ID Monad

We don't use it, and if we want an identity Monad then there's one
in transformers:Data.Functor.Identity that we could use.

7 years agoRemove sortLe uses
Ian Lynagh [Fri, 22 Jun 2012 22:06:38 +0000 (23:06 +0100)] 
Remove sortLe uses

7 years agoRemove sortLe
Ian Lynagh [Fri, 22 Jun 2012 21:46:03 +0000 (22:46 +0100)] 
Remove sortLe

We now use Data.List's sort(By)

7 years agoRemove another use of sortLe
Ian Lynagh [Fri, 22 Jun 2012 21:42:19 +0000 (22:42 +0100)] 
Remove another use of sortLe

7 years agoCorrect a comment
Ian Lynagh [Fri, 22 Jun 2012 21:38:28 +0000 (22:38 +0100)] 
Correct a comment

7 years agoRemove a few more sortLe's
Ian Lynagh [Fri, 22 Jun 2012 21:31:24 +0000 (22:31 +0100)] 
Remove a few more sortLe's

7 years agoRemove another sortLe use
Ian Lynagh [Fri, 22 Jun 2012 21:27:05 +0000 (22:27 +0100)] 
Remove another sortLe use