ghc.git
8 years agoAdd header doc to MkIface
David Terei [Wed, 9 Nov 2011 19:17:31 +0000 (11:17 -0800)] 
Add header doc to MkIface

8 years agoTabs -> Spaces
David Terei [Wed, 9 Nov 2011 19:17:08 +0000 (11:17 -0800)] 
Tabs -> Spaces

8 years agoFormatting fixes
David Terei [Wed, 9 Nov 2011 19:15:05 +0000 (11:15 -0800)] 
Formatting fixes

8 years agoClean of BinIface
David Terei [Wed, 9 Nov 2011 19:06:09 +0000 (11:06 -0800)] 
Clean of BinIface

8 years agoTabs -> Spaces
David Terei [Wed, 9 Nov 2011 18:28:48 +0000 (10:28 -0800)] 
Tabs -> Spaces

8 years agoClean of HscTypes
David Terei [Wed, 9 Nov 2011 18:11:32 +0000 (10:11 -0800)] 
Clean of HscTypes

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Wed, 9 Nov 2011 22:01:48 +0000 (22:01 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoComments only
Simon Peyton Jones [Wed, 9 Nov 2011 21:57:13 +0000 (21:57 +0000)] 
Comments only

8 years agoFix Trac #5475: another bug in exprArity
Simon Peyton Jones [Wed, 9 Nov 2011 21:56:50 +0000 (21:56 +0000)] 
Fix Trac #5475: another bug in exprArity

As usual it was to do with the handling of bottoms,
but this time it wasn't terribly subtle; I was using
andArityType (which is designed for case branches) as
a cheap short cut for the arity trimming needed with
a cast.  That did the Wrong Thing for bottoming
expressions.  Sigh.

8 years agoRemove now-unused libffi/package.conf.in
Ian Lynagh [Wed, 9 Nov 2011 18:46:04 +0000 (18:46 +0000)] 
Remove now-unused libffi/package.conf.in

8 years agofix dynamic way on Win32 (missing bits from flushStdHandles changes)
Dimitrios Vytiniotis [Wed, 9 Nov 2011 10:33:07 +0000 (10:33 +0000)] 
fix dynamic way on Win32 (missing bits from flushStdHandles changes)

8 years agoadded NOUNPACK pragma (see #2338)
Stefan Wehr [Wed, 9 Nov 2011 08:37:17 +0000 (09:37 +0100)] 
added NOUNPACK pragma (see #2338)

8 years agoadd -u flag for the new flushStdHandles reference
Simon Marlow [Wed, 9 Nov 2011 09:26:12 +0000 (09:26 +0000)] 
add -u flag for the new flushStdHandles reference

(fix build failure with -split-objs)

8 years agoClose some handle leaks (#5604)
Simon Marlow [Tue, 8 Nov 2011 16:28:57 +0000 (16:28 +0000)] 
Close some handle leaks (#5604)

Also, use the Win32 API (CreateThread) instead of the CRT API
(_beginthreadex) for thread creation.

8 years agoInclude package_flags in allFlags list.
David Terei [Wed, 9 Nov 2011 02:33:59 +0000 (18:33 -0800)] 
Include package_flags in allFlags list.

This means ghci now correctly picks up the package flags
for tab completion.

8 years agoSome code cleaning
David Terei [Wed, 9 Nov 2011 01:49:20 +0000 (17:49 -0800)] 
Some code cleaning

8 years agoSpaces -> Tabs
David Terei [Wed, 9 Nov 2011 01:15:48 +0000 (17:15 -0800)] 
Spaces -> Tabs

8 years agoThrow error if safe imports used when safe haskell isn't on
David Terei [Wed, 9 Nov 2011 01:15:27 +0000 (17:15 -0800)] 
Throw error if safe imports used when safe haskell isn't on

8 years agoWibbles
Manuel M T Chakravarty [Wed, 9 Nov 2011 00:14:38 +0000 (11:14 +1100)] 
Wibbles

8 years agoFirst cut at scalar vectorisation of class instances
Manuel M T Chakravarty [Tue, 8 Nov 2011 23:29:47 +0000 (10:29 +1100)] 
First cut at scalar vectorisation of class instances

8 years agoDocumentation and formatting of Vectorise.Utils.Poly
Manuel M T Chakravarty [Mon, 7 Nov 2011 01:22:03 +0000 (12:22 +1100)] 
Documentation and formatting of Vectorise.Utils.Poly

8 years agoFix handling of safe imports in inference mode
David Terei [Wed, 9 Nov 2011 00:26:09 +0000 (16:26 -0800)] 
Fix handling of safe imports in inference mode

8 years agoFix the libffi ln handling on cygwin
Ian Lynagh [Tue, 8 Nov 2011 17:54:25 +0000 (17:54 +0000)] 
Fix the libffi ln handling on cygwin

iWe were adding c:/... to $PATH, but : is the separator
in $PATH.

8 years agoupdate docs regarding .a files and GHCi (#3345)
Simon Marlow [Tue, 8 Nov 2011 10:28:56 +0000 (10:28 +0000)] 
update docs regarding .a files and GHCi (#3345)

8 years agofix markup
Simon Marlow [Tue, 8 Nov 2011 10:28:17 +0000 (10:28 +0000)] 
fix markup

8 years agoFlush stdout and stderr during hs_exit() (#5594)
Simon Marlow [Mon, 7 Nov 2011 15:24:00 +0000 (15:24 +0000)] 
Flush stdout and stderr during hs_exit() (#5594)

Ensures that these handles are flushed even when the RTS is being used
as a library, with no main.

Needs a corresponding change to libraries/base.

8 years agoget the column widths right for Unicode SCC labels/modules
Simon Marlow [Mon, 7 Nov 2011 14:52:27 +0000 (14:52 +0000)] 
get the column widths right for Unicode SCC labels/modules

8 years agoFix core-lint bug in GHCi
Simon Marlow [Tue, 8 Nov 2011 13:25:00 +0000 (13:25 +0000)] 
Fix core-lint bug in GHCi

The special dead-code eliminator in CorePrep was not taking into
account free variables inside Breakpoint ticks.

8 years agoFix up Safe Haskell handling of FFI imports
David Terei [Mon, 7 Nov 2011 22:28:02 +0000 (14:28 -0800)] 
Fix up Safe Haskell handling of FFI imports

8 years agoImprove user's guide doc for associated type defaults
Jose Pedro Magalhaes [Mon, 7 Nov 2011 16:04:39 +0000 (16:04 +0000)] 
Improve user's guide doc for associated type defaults

Make it a separate section to help it stand out, and add an
example containing multiple defaults for a single type.

8 years agoCost centre names are now in UTF-8 (#5559)
Simon Marlow [Fri, 4 Nov 2011 16:02:17 +0000 (16:02 +0000)] 
Cost centre names are now in UTF-8 (#5559)

So the .prof file will be UTF-8.  This is mostly ok, except that the
RTS doesn't calculate the column widths correctly (it assumes bytes =
chars).

hp2ps doesn't do anything sensible with Unicode strings, it just dumps
the bytes into the .ps file.

8 years agoFix validate by moving OPTIONS -fno-warn-tabs Validate fixed for Mac OS X 10.5 and...
Thorkil Naur [Sun, 6 Nov 2011 16:57:49 +0000 (17:57 +0100)] 
Fix validate by moving OPTIONS -fno-warn-tabs Validate fixed for Mac OS X 10.5 and Linux. For both: compiler/nativeGen/PPC/Instr.hs compiler/nativeGen/SPARC/Instr.hs failed to (stage1) build. For Mac OS X, but mysteriously not for Linux: compiler/basicTypes/Id.lhs compiler/basicTypes/Name.lhs failed during haddock'ing.

8 years agoFix warnings in simplStg/SRT.lhs
Ian Lynagh [Sun, 6 Nov 2011 22:49:34 +0000 (22:49 +0000)] 
Fix warnings in simplStg/SRT.lhs

8 years agoWhitespace in simplStg/SRT.lhs
Ian Lynagh [Sun, 6 Nov 2011 22:43:21 +0000 (22:43 +0000)] 
Whitespace in simplStg/SRT.lhs

8 years agoWarnings appear to already be fixed in hsSyn/HsPat.lhs
Ian Lynagh [Sun, 6 Nov 2011 22:42:17 +0000 (22:42 +0000)] 
Warnings appear to already be fixed in hsSyn/HsPat.lhs

8 years agoWhitespace in hsSyn/HsPat.lhs
Ian Lynagh [Sun, 6 Nov 2011 22:41:50 +0000 (22:41 +0000)] 
Whitespace in hsSyn/HsPat.lhs

8 years agoFix warnings in deSugar/Check.lhs
Ian Lynagh [Sun, 6 Nov 2011 21:41:12 +0000 (21:41 +0000)] 
Fix warnings in deSugar/Check.lhs

8 years agoWhitespace in deSugar/Check.lhs
Ian Lynagh [Sun, 6 Nov 2011 21:26:35 +0000 (21:26 +0000)] 
Whitespace in deSugar/Check.lhs

8 years agoFix warnings in deSugar/DsListComp.lhs
Ian Lynagh [Sun, 6 Nov 2011 20:41:29 +0000 (20:41 +0000)] 
Fix warnings in deSugar/DsListComp.lhs

8 years agoWhitespace in deSugar/DsListComp.lhs
Ian Lynagh [Sun, 6 Nov 2011 20:36:52 +0000 (20:36 +0000)] 
Whitespace in deSugar/DsListComp.lhs

8 years agoWarnings already seem to be fixed in coreSyn/CoreFVs.lhs
Ian Lynagh [Sun, 6 Nov 2011 20:35:24 +0000 (20:35 +0000)] 
Warnings already seem to be fixed in coreSyn/CoreFVs.lhs

8 years agoWhitespace in coreSyn/CoreFVs.lhs
Ian Lynagh [Sun, 6 Nov 2011 20:34:40 +0000 (20:34 +0000)] 
Whitespace in coreSyn/CoreFVs.lhs

8 years agoAllow the use of R9 and R10 in primops; fixes trac #5423
Ian Lynagh [Sun, 6 Nov 2011 18:11:56 +0000 (18:11 +0000)] 
Allow the use of R9 and R10 in primops; fixes trac #5423

8 years agoGive a better error for uses of R11, R12, ...; trac #5422
Ian Lynagh [Sun, 6 Nov 2011 15:53:39 +0000 (15:53 +0000)] 
Give a better error for uses of R11, R12, ...; trac #5422

It's still a panic, as it wouldn't be trivial to give a proper error
at the point that we generate it, but it's now a bit nicer:
    Registers above R10 are not supported (tried to use R11)

8 years agoMerge branch 'dependent7' of https://github.com/gregwebs/ghc
Ian Lynagh [Sun, 6 Nov 2011 12:48:08 +0000 (12:48 +0000)] 
Merge branch 'dependent7' of https://github.com/gregwebs/ghc

8 years agoFix warnings in StgStats
Ian Lynagh [Sun, 6 Nov 2011 12:35:56 +0000 (12:35 +0000)] 
Fix warnings in StgStats

8 years agoFix warnings in typecheck/TcSplice.lhs
Ian Lynagh [Sat, 5 Nov 2011 18:23:40 +0000 (18:23 +0000)] 
Fix warnings in typecheck/TcSplice.lhs

8 years agoWhitespace only in typecheck/TcSplice.lhs
Ian Lynagh [Sat, 5 Nov 2011 18:19:33 +0000 (18:19 +0000)] 
Whitespace only in typecheck/TcSplice.lhs

8 years agoFix stage1 warnings
Ian Lynagh [Sat, 5 Nov 2011 17:24:04 +0000 (17:24 +0000)] 
Fix stage1 warnings

8 years agoFix warnings in deSugar/DsExpr.lhs
Ian Lynagh [Sat, 5 Nov 2011 15:54:20 +0000 (15:54 +0000)] 
Fix warnings in deSugar/DsExpr.lhs

8 years agoFix warnings in deSugar/DsGRHSs.lhs
Ian Lynagh [Sat, 5 Nov 2011 15:02:06 +0000 (15:02 +0000)] 
Fix warnings in deSugar/DsGRHSs.lhs

8 years agoFix warnings in cmm/CmmOpt.hs
Ian Lynagh [Sat, 5 Nov 2011 01:41:57 +0000 (01:41 +0000)] 
Fix warnings in cmm/CmmOpt.hs

8 years agoFinish de-CPPing CmmOpt.hs
Ian Lynagh [Sat, 5 Nov 2011 01:34:12 +0000 (01:34 +0000)] 
Finish de-CPPing CmmOpt.hs

8 years agoFix bitrotted NCG_DEBUG code, and switch to using a Haskell conditional
Ian Lynagh [Sat, 5 Nov 2011 01:23:50 +0000 (01:23 +0000)] 
Fix bitrotted NCG_DEBUG code, and switch to using a Haskell conditional

8 years agoRemove some out-of-date comments
Ian Lynagh [Sat, 5 Nov 2011 00:48:47 +0000 (00:48 +0000)] 
Remove some out-of-date comments

8 years agoClarify some comments
Ian Lynagh [Sat, 5 Nov 2011 00:46:18 +0000 (00:46 +0000)] 
Clarify some comments

8 years agoaddDependentFile #4900
Greg Weber [Sat, 8 Oct 2011 00:28:15 +0000 (17:28 -0700)] 
addDependentFile #4900

Let GHC know about an external dependency that Template Haskell uses
so that GHC can recompile when the dependency changes.
No support for ghc -M

There is a corresponding addition to the template-haskell library

8 years agoremove duplicate comment
Greg Weber [Sat, 8 Oct 2011 02:08:46 +0000 (19:08 -0700)] 
remove duplicate comment

8 years agoCorrectly handle safe inference in Safe Haskell.
David Terei [Wed, 2 Nov 2011 05:54:38 +0000 (22:54 -0700)] 
Correctly handle safe inference in Safe Haskell.

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Fri, 4 Nov 2011 17:03:35 +0000 (17:03 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoImprove optimisation for ticks
Simon Marlow [Fri, 4 Nov 2011 14:51:29 +0000 (14:51 +0000)] 
Improve optimisation for ticks

We want to prevent the SCC from getting in the way when we have
case-of-scc-of-case, and the case-of-case would transform, so we push
the scc inside the inner case to allow the case-of-case to take
place.  See comments for details.

8 years agoUse -fwarn-tabs when validating
Ian Lynagh [Fri, 4 Nov 2011 15:06:56 +0000 (15:06 +0000)] 
Use -fwarn-tabs when validating

We only use it for "compiler" sources, i.e. not for libraries.
Many modules have a -fno-warn-tabs kludge for now.

8 years agoMerge branch 'master' of http://darcs.haskell.org//ghc
Ross Paterson [Fri, 4 Nov 2011 15:42:16 +0000 (15:42 +0000)] 
Merge branch 'master' of darcs.haskell.org//ghc

8 years agofix #5602: (<+>) example in User's Guide
Ross Paterson [Fri, 4 Nov 2011 15:40:19 +0000 (15:40 +0000)] 
fix #5602: (<+>) example in User's Guide

8 years agoAdd eventlog event for thread labels
Duncan Coutts [Wed, 2 Nov 2011 12:02:09 +0000 (12:02 +0000)] 
Add eventlog event for thread labels

The existing GHC.Conc.labelThread will now also emit the the thread
label into the eventlog. Profiling tools like ThreadScope could then
use the thread labels rather than thread numbers.

8 years agobe specific when importing Data.Typeable
Simon Marlow [Thu, 3 Nov 2011 19:49:05 +0000 (19:49 +0000)] 
be specific when importing Data.Typeable

8 years agodrop SCC on a variable when it has a non-function type
Simon Marlow [Fri, 4 Nov 2011 09:08:18 +0000 (09:08 +0000)] 
drop SCC on a variable when it has a non-function type

8 years agoMerge branch 'master' of /home/simonmar/ghc-mirror/ghc
Jose Pedro Magalhaes [Fri, 4 Nov 2011 10:23:59 +0000 (10:23 +0000)] 
Merge branch 'master' of /home/simonmar/ghc-mirror/ghc

8 years agodisable a debugging trace, and a little refactoring
Simon Marlow [Thu, 3 Nov 2011 09:43:22 +0000 (09:43 +0000)] 
disable a debugging trace, and a little refactoring

8 years agodisable debugging trace
Simon Marlow [Thu, 3 Nov 2011 09:39:34 +0000 (09:39 +0000)] 
disable debugging trace

8 years agoImprove -ddump-deriv output for Generic instances
Jose Pedro Magalhaes [Fri, 4 Nov 2011 08:41:52 +0000 (08:41 +0000)] 
Improve -ddump-deriv output for Generic instances

Also print the right-hand side of the generated Rep
type instances.

8 years agoMake sure to look items from D.A.P.P properly up in the HPT
Manuel M T Chakravarty [Fri, 4 Nov 2011 04:52:01 +0000 (15:52 +1100)] 
Make sure to look items from D.A.P.P properly up in the HPT

Kudos to Ben Lippmeier for suggesting this change

8 years agoClean up and complete the vectorisation of type classes
Manuel M T Chakravarty [Fri, 4 Nov 2011 04:22:02 +0000 (15:22 +1100)] 
Clean up and complete the vectorisation of type classes

8 years agoFix build
Ian Lynagh [Fri, 4 Nov 2011 02:00:12 +0000 (02:00 +0000)] 
Fix build

With
    <imagedata fileref="prof_scc.png"
I get
    users_guide.tex:12802: Cannot determine size of graphic in /home/ian/ghc/git/ghc/docs/users_guide//prof_scc.png (no BoundingBox).
    users_guide.tex:12802: leading text: ...width=645pt,height=428pt]{prof_scc.png}

8 years agoAdd format-patch support to sync-all
Ian Lynagh [Thu, 27 Oct 2011 11:50:55 +0000 (12:50 +0100)] 
Add format-patch support to sync-all

8 years agofix configure's generation of settings file on ARM platform
Karel Gardas [Wed, 2 Nov 2011 17:29:39 +0000 (10:29 -0700)] 
fix configure's generation of settings file on ARM platform

This patch fixes generation of settings file on ARM platform
by configure script. This fixes build issue on ARM platform
where ghc-stage1 compiler is not able to read the target arch
value and due to this issue build fails with:

ghc-cabal: Failed to read "target arch" value "ArchARM ARMv7 [VFPv3, NEON]"

Signed-off-by: David Terei <davidterei@gmail.com>
8 years agoremove tabs again
Simon Marlow [Wed, 2 Nov 2011 16:35:56 +0000 (16:35 +0000)] 
remove tabs again

8 years agoFix gratuitous code duplication in the byte code generator
Simon Marlow [Wed, 2 Nov 2011 10:28:55 +0000 (10:28 +0000)] 
Fix gratuitous code duplication in the byte code generator

For a case expression with a default, we were re-emitting the code for
the default branch each time it was referenced, which in a case with
many branches could be many times, leading to an O(n^2) blowup.

This shows up in ghcirun003, which now runs much faster than before.

8 years agofix disassembling of large instructions
Simon Marlow [Wed, 2 Nov 2011 10:19:51 +0000 (10:19 +0000)] 
fix disassembling of large instructions

8 years agoGet label calculations right when we have long (>16 bits) offsets
Simon Marlow [Wed, 2 Nov 2011 10:19:33 +0000 (10:19 +0000)] 
Get label calculations right when we have long (>16 bits) offsets

This shows up as a segfault in GHCi when there is a very large BCO.
I've constructed a test case that crashes with 7.2.1, which I'll put
in the testsuite as ghcirun004.

8 years agofix BCO_GET_LARGE_ARG (seems to be completely wrong)
Simon Marlow [Wed, 2 Nov 2011 10:19:02 +0000 (10:19 +0000)] 
fix BCO_GET_LARGE_ARG (seems to be completely wrong)

8 years agounknownNameSuggestErr: don't panic if we find Ids with UnhelpfulSrcSpans
Simon Marlow [Wed, 2 Nov 2011 08:41:08 +0000 (08:41 +0000)] 
unknownNameSuggestErr: don't panic if we find Ids with UnhelpfulSrcSpans

This happens with the Ids generated by the GHCi debugger for heap
values (_t1, _t2 etc.).

8 years agosimplTick: push type-applications and casts inside ticks.
Simon Marlow [Wed, 2 Nov 2011 08:39:51 +0000 (08:39 +0000)] 
simplTick: push type-applications and casts inside ticks.

8 years agoImprove pretty-printing of BCOs (-ddump-bcos)
Simon Marlow [Wed, 2 Nov 2011 08:39:13 +0000 (08:39 +0000)] 
Improve pretty-printing of BCOs (-ddump-bcos)

8 years agoOverhaul of infrastructure for profiling, coverage (HPC) and breakpoints
Simon Marlow [Thu, 27 Oct 2011 12:47:27 +0000 (13:47 +0100)] 
Overhaul of infrastructure for profiling, coverage (HPC) and breakpoints

User visible changes
====================

Profilng
--------

Flags renamed (the old ones are still accepted for now):

  OLD            NEW
  ---------      ------------
  -auto-all      -fprof-auto
  -auto          -fprof-exported
  -caf-all       -fprof-cafs

New flags:

  -fprof-auto              Annotates all bindings (not just top-level
                           ones) with SCCs

  -fprof-top               Annotates just top-level bindings with SCCs

  -fprof-exported          Annotates just exported bindings with SCCs

  -fprof-no-count-entries  Do not maintain entry counts when profiling
                           (can make profiled code go faster; useful with
                           heap profiling where entry counts are not used)

Cost-centre stacks have a new semantics, which should in most cases
result in more useful and intuitive profiles.  If you find this not to
be the case, please let me know.  This is the area where I have been
experimenting most, and the current solution is probably not the
final version, however it does address all the outstanding bugs and
seems to be better than GHC 7.2.

Stack traces
------------

+RTS -xc now gives more information.  If the exception originates from
a CAF (as is common, because GHC tends to lift exceptions out to the
top-level), then the RTS walks up the stack and reports the stack in
the enclosing update frame(s).

Result: +RTS -xc is much more useful now - but you still have to
compile for profiling to get it.  I've played around a little with
adding 'head []' to GHC itself, and +RTS -xc does pinpoint the problem
quite accurately.

I plan to add more facilities for stack tracing (e.g. in GHCi) in the
future.

Coverage (HPC)
--------------

 * derived instances are now coloured yellow if they weren't used
 * likewise record field names
 * entry counts are more accurate (hpc --fun-entry-count)
 * tab width is now correct (markup was previously off in source with
   tabs)

Internal changes
================

In Core, the Note constructor has been replaced by

        Tick (Tickish b) (Expr b)

which is used to represent all the kinds of source annotation we
support: profiling SCCs, HPC ticks, and GHCi breakpoints.

Depending on the properties of the Tickish, different transformations
apply to Tick.  See CoreUtils.mkTick for details.

Tickets
=======

This commit closes the following tickets, test cases to follow:

  - Close #2552: not a bug, but the behaviour is now more intuitive
    (test is T2552)

  - Close #680 (test is T680)

  - Close #1531 (test is result001)

  - Close #949 (test is T949)

  - Close #2466: test case has bitrotted (doesn't compile against current
    version of vector-space package)

8 years agofix time calculation for retainer profiling
Simon Marlow [Wed, 26 Oct 2011 14:15:50 +0000 (15:15 +0100)] 
fix time calculation for retainer profiling

8 years agoadd BangPatterns, we're starting to use them a fair bit
Simon Marlow [Thu, 13 Oct 2011 15:44:09 +0000 (16:44 +0100)] 
add BangPatterns, we're starting to use them a fair bit

8 years agofix doc bugs
Simon Marlow [Thu, 13 Oct 2011 15:43:09 +0000 (16:43 +0100)] 
fix doc bugs

The description of GHC's divergence from the FFI spec was in the wrong
place, and the xref was broken.

8 years agofix for a deadlock when using +RTS -hb with -prof -threaded
Simon Marlow [Wed, 12 Oct 2011 14:38:09 +0000 (15:38 +0100)] 
fix for a deadlock when using +RTS -hb with -prof -threaded

8 years agominor bugfix for 'make re2' etc.
Simon Marlow [Wed, 12 Oct 2011 13:53:53 +0000 (14:53 +0100)] 
minor bugfix for 'make re2' etc.

8 years agoDon't generate stg_ap thunks when profiling, it loses information (#949)
Simon Marlow [Mon, 10 Oct 2011 13:50:41 +0000 (14:50 +0100)] 
Don't generate stg_ap thunks when profiling, it loses information (#949)

8 years agoFor the location on a record selector binding, use the location of the
Simon Marlow [Thu, 18 Aug 2011 14:32:22 +0000 (15:32 +0100)] 
For the location on a record selector binding, use the location of the
record selector identifier in the data declaration.  Previously the
location was pointing to the TyCon in the source, which was clearly
wrong, and the new way gives more useful information from HPC: if a
record selector is never used, the markup will shade the identifier
yellow.

8 years agoAdd a base size when computing max-ticks,
Simon Peyton Jones [Wed, 2 Nov 2011 13:54:31 +0000 (13:54 +0000)] 
Add a base size when computing max-ticks,
to deal with very small programs (like zero)

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Wed, 2 Nov 2011 10:19:27 +0000 (10:19 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoFix Trac #5592: unused-import warnings with dot-dot notation
Simon Peyton Jones [Wed, 2 Nov 2011 10:18:00 +0000 (10:18 +0000)] 
Fix Trac #5592: unused-import warnings with dot-dot notation

A subtle interaction between two complicate features!

8 years agoIgnore stdcall c-call in native codegen on x86_64
David M Peixotto [Thu, 20 Oct 2011 14:18:19 +0000 (09:18 -0500)] 
Ignore stdcall c-call in native codegen on x86_64

The stdcall calling convention is not supported on x86_64.
When an ffi import requests stdcall, a warning is issued as
desired by #3336. However, the native codegen was still
generating code that expected the callee to cleanup the
stack arguments when calling a c function that requests
stdcall.

This patch changes the codegen to actually use the ccall
calling convention as intended.

Signed-off-by: David Terei <davidterei@gmail.com>
8 years agoChange stack alignment to 16+8 bytes in STG code
David M Peixotto [Wed, 19 Oct 2011 20:49:06 +0000 (15:49 -0500)] 
Change stack alignment to 16+8 bytes in STG code

This patch changes the STG code so that %rsp to be aligned
to a 16-byte boundary + 8. This is the alignment required by
the x86_64 ABI on entry to a function. Previously we kept
%rsp aligned to a 16-byte boundary, but this was causing
problems for the LLVM backend (see #4211).

We now don't need to invoke llvm stack mangler on
x86_64 targets. Since the stack is now 16+8 byte algined in
STG land on x86_64, we don't need to mangle the stack
manipulations with the llvm mangler.

This patch only modifies the alignement for x86_64 backends.

Signed-off-by: David Terei <davidterei@gmail.com>
8 years agoBig formatting clean of HscMain
David Terei [Wed, 26 Oct 2011 00:17:32 +0000 (17:17 -0700)] 
Big formatting clean of HscMain

8 years agoChange HscMain from lhs to hs.
David Terei [Wed, 26 Oct 2011 00:16:54 +0000 (17:16 -0700)] 
Change HscMain from lhs to hs.

8 years agoRemove tab
David Terei [Tue, 1 Nov 2011 08:13:55 +0000 (01:13 -0700)] 
Remove tab