ghc.git
7 years agoUpdate the sdist VCS exclusions
Ian Lynagh [Thu, 24 Nov 2011 14:57:05 +0000 (14:57 +0000)] 
Update the sdist VCS exclusions

In particular, we now ignore .git directories

7 years agoFix sdist creation
Ian Lynagh [Thu, 24 Nov 2011 14:49:41 +0000 (14:49 +0000)] 
Fix sdist creation

7 years agoFix markup (non-validate-breaking)
Simon Marlow [Thu, 24 Nov 2011 14:36:33 +0000 (14:36 +0000)] 
Fix markup (non-validate-breaking)

7 years agoRelax the restriction on using abstract newtypes in FFI declarations.
Simon Marlow [Thu, 24 Nov 2011 14:04:23 +0000 (14:04 +0000)] 
Relax the restriction on using abstract newtypes in FFI declarations.

Given the high impact of this change, we decided to back off and make
abstract newtypes give a warning for one release, before we make it an
error in 7.6.1.

Codec/Compression/Zlib/Stream.hsc:884:1:
    Warning: newtype `CInt' is used in an FFI declaration,
             but its constructor is not in scope.
             This will become an error in GHC 7.6.1.
    When checking declaration:
      foreign import ccall unsafe "static zlib.h deflate" c_deflate
        :: StreamState -> CInt -> IO CInt

7 years agoFix the filename passed to unlit (see comment for details)
Simon Marlow [Thu, 24 Nov 2011 14:00:00 +0000 (14:00 +0000)] 
Fix the filename passed to unlit (see comment for details)

7 years agocopyFileWithHeader: write the header in UTF-8
Simon Marlow [Thu, 24 Nov 2011 10:59:57 +0000 (10:59 +0000)] 
copyFileWithHeader: write the header in UTF-8

7 years agoFix userguide markup
Ian Lynagh [Thu, 24 Nov 2011 14:10:59 +0000 (14:10 +0000)] 
Fix userguide markup

7 years agoReplace a couple of "rm -rf" invocations with $(call removeTrees,...)
Ian Lynagh [Thu, 24 Nov 2011 13:36:23 +0000 (13:36 +0000)] 
Replace a couple of "rm -rf" invocations with $(call removeTrees,...)

7 years agoSupport "phase control" for SPECIALISE pragmas
Simon Peyton Jones [Thu, 24 Nov 2011 12:35:33 +0000 (12:35 +0000)] 
Support "phase control" for SPECIALISE pragmas

This featurelet allows Trac #5237 to be fixed.
The idea is to allow SPECIALISE pragmas to specify
the phases in which the RULE is active, just as you can
do with RULES themselves.
  {-# SPECIALISE [1] foo :: Int -> Int #-}

This feature is so obvious that not having it is really a bug.
There are, needless to say, a few wrinkles.  See
   Note [Activation pragmas for SPECIALISE]
in DsBinds

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 24 Nov 2011 12:32:03 +0000 (12:32 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

Conflicts:
compiler/ghci/ByteCodeItbls.lhs

7 years agoFix bug in flushStdHandles()
Simon Marlow [Thu, 24 Nov 2011 10:37:14 +0000 (10:37 +0000)] 
Fix bug in flushStdHandles()

Was causing occasional failure in some threaded2 tests.

7 years agofix warnings (validate was failing on i386)
Simon Marlow [Thu, 24 Nov 2011 09:01:05 +0000 (09:01 +0000)] 
fix warnings (validate was failing on i386)

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 24 Nov 2011 09:07:33 +0000 (09:07 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoRemove unused cRelocatableBuild
Simon Marlow [Fri, 11 Nov 2011 15:24:46 +0000 (15:24 +0000)] 
Remove unused cRelocatableBuild

7 years agoDecode escape sequences properly in line pragmas (see comment for details).
Simon Marlow [Wed, 23 Nov 2011 16:13:59 +0000 (16:13 +0000)] 
Decode escape sequences properly in line pragmas (see comment for details).

7 years agoChecking UsageFile: don't fail if the file doesn't exist, just recompile
Simon Marlow [Wed, 23 Nov 2011 15:25:35 +0000 (15:25 +0000)] 
Checking UsageFile: don't fail if the file doesn't exist, just recompile

If a file we depended on last time is missing, we should recompile.

This also makes us insensitive to mistakes when recording dependent
source files (such as storing a temporary file), but will make more
recompilation happen instead.  With DEBUG on, you get a warning.

7 years agoFix build on Windows
Simon Peyton Jones [Wed, 23 Nov 2011 15:15:27 +0000 (15:15 +0000)] 
Fix build on Windows

7 years agoUse mkAppTys, not foldl AppTy, which was utterly wrong
Simon Peyton Jones [Wed, 23 Nov 2011 15:14:56 +0000 (15:14 +0000)] 
Use mkAppTys, not foldl AppTy, which was utterly wrong

This bug caused Trac #5655

7 years agoKeep the flag lists as IntSets rather than lists
Simon Marlow [Tue, 22 Nov 2011 16:23:48 +0000 (16:23 +0000)] 
Keep the flag lists as IntSets rather than lists

This improves compile times slightly.

7 years agoFix and clean up 'PData' and 'Wrap' usage of the vectoriser
Manuel M T Chakravarty [Wed, 23 Nov 2011 04:08:39 +0000 (15:08 +1100)] 
Fix and clean up 'PData' and 'Wrap' usage of the vectoriser

7 years agoDon't warn about not vectorised type synonyms
Manuel M T Chakravarty [Mon, 21 Nov 2011 13:05:05 +0000 (00:05 +1100)] 
Don't warn about not vectorised type synonyms

7 years agoFix compilation error in unreg mode
David Terei [Wed, 23 Nov 2011 01:39:20 +0000 (17:39 -0800)] 
Fix compilation error in unreg mode

7 years agoAdd '-dno-llvm-mangler' flag for debugging purposes
David Terei [Tue, 22 Nov 2011 20:30:52 +0000 (12:30 -0800)] 
Add '-dno-llvm-mangler' flag for debugging purposes

7 years agoClean up LLVM Mangler.
David Terei [Tue, 22 Nov 2011 20:37:03 +0000 (12:37 -0800)] 
Clean up LLVM Mangler.

7 years agoShow LLVM mangler and code gen passes at v2
David Terei [Tue, 22 Nov 2011 20:30:32 +0000 (12:30 -0800)] 
Show LLVM mangler and code gen passes at v2

7 years agoFormatting fix.
David Terei [Tue, 22 Nov 2011 20:23:43 +0000 (12:23 -0800)] 
Formatting fix.

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Tue, 22 Nov 2011 20:55:38 +0000 (20:55 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoFix comments.
Michal Terepeta [Mon, 21 Nov 2011 20:36:17 +0000 (21:36 +0100)] 
Fix comments.

7 years agoDrop ".exe" exetention from eventlog file name
Duncan Coutts [Mon, 21 Nov 2011 11:32:15 +0000 (11:32 +0000)] 
Drop ".exe" exetention from eventlog file name

Fixes ticket #5472

7 years agoTabs -> Spaces
David Terei [Tue, 22 Nov 2011 20:06:37 +0000 (12:06 -0800)] 
Tabs -> Spaces

7 years agoFormatting fix
David Terei [Tue, 22 Nov 2011 20:06:20 +0000 (12:06 -0800)] 
Formatting fix

7 years agoExplicitly handle unsupported Cmm prim ops.
David Terei [Tue, 22 Nov 2011 20:05:52 +0000 (12:05 -0800)] 
Explicitly handle unsupported Cmm prim ops.

7 years agoFormatting fixes
David Terei [Tue, 22 Nov 2011 19:27:25 +0000 (11:27 -0800)] 
Formatting fixes

7 years agoSpecify unsupported ops, don't just use a catch all
David Terei [Tue, 22 Nov 2011 19:24:16 +0000 (11:24 -0800)] 
Specify unsupported ops, don't just use a catch all

Better to specifically list the unsupported cases in code
than to have a catch all that panics. The later method hides
problems when new constructors are added such as the recent
additions to the supported Cmm prim ops that weren't ported
to the C backend since no one noticed.

7 years agoRemove registerised code for dead architectures: mips, ia64, alpha,
David Terei [Mon, 21 Nov 2011 20:05:18 +0000 (12:05 -0800)] 
Remove registerised code for dead architectures: mips, ia64, alpha,
hppa1, m68k

7 years agoFix missing primop in PprC
David Terei [Sun, 20 Nov 2011 01:38:18 +0000 (17:38 -0800)] 
Fix missing primop in PprC

7 years agoFormatting of PprC
David Terei [Sun, 20 Nov 2011 01:38:04 +0000 (17:38 -0800)] 
Formatting of PprC

7 years agoTabs -> Spaces
David Terei [Sat, 19 Nov 2011 19:36:21 +0000 (11:36 -0800)] 
Tabs -> Spaces

7 years agoTabs -> Spaces
David Terei [Sat, 19 Nov 2011 06:41:16 +0000 (22:41 -0800)] 
Tabs -> Spaces

7 years agoTabs -> Spaces
David Terei [Sat, 19 Nov 2011 04:09:52 +0000 (20:09 -0800)] 
Tabs -> Spaces

7 years agoRemove some old comments about the mangler
David Terei [Sat, 19 Nov 2011 03:47:24 +0000 (19:47 -0800)] 
Remove some old comments about the mangler

7 years agoFix warnings in ByteCodeItbls
David Terei [Sat, 19 Nov 2011 00:39:24 +0000 (16:39 -0800)] 
Fix warnings in ByteCodeItbls

7 years agoTabs -> Spaces + cleaning
David Terei [Fri, 18 Nov 2011 23:44:14 +0000 (15:44 -0800)] 
Tabs -> Spaces + cleaning

7 years agoEnable '-split-objs' with llvm backend
David Terei [Fri, 18 Nov 2011 22:42:47 +0000 (14:42 -0800)] 
Enable '-split-objs' with llvm backend

7 years agoBetter document the driver pipeline.
David Terei [Fri, 18 Nov 2011 22:31:00 +0000 (14:31 -0800)] 
Better document the driver pipeline.

7 years agoTweaks to safe haskell documentation.
David Terei [Tue, 22 Nov 2011 17:59:47 +0000 (09:59 -0800)] 
Tweaks to safe haskell documentation.

7 years agouType_defer: only call mkErrInfo if -ddump-tc-trace is on (#5631)
Simon Marlow [Tue, 22 Nov 2011 14:09:05 +0000 (14:09 +0000)] 
uType_defer: only call mkErrInfo if -ddump-tc-trace is on (#5631)

Profiling shows we're wasting a lot of time calling mkErrInfo and
tidying the context, work that is wasted if we're not tracing.

There is more to this compilation performance regression than this,
but this is one bug.

7 years agomerge
Simon Marlow [Tue, 22 Nov 2011 11:26:28 +0000 (11:26 +0000)] 
merge

7 years agofix warning
Simon Marlow [Mon, 21 Nov 2011 16:01:34 +0000 (16:01 +0000)] 
fix warning

7 years agoDo not wrap Coercions with ticks (fixes GADT3(profasm))
Simon Marlow [Mon, 21 Nov 2011 14:52:06 +0000 (14:52 +0000)] 
Do not wrap Coercions with ticks (fixes GADT3(profasm))

7 years agoDon't add the -x flag to ld when joining object files
Simon Marlow [Mon, 21 Nov 2011 13:27:15 +0000 (13:27 +0000)] 
Don't add the -x flag to ld when joining object files

7 years agoMerge /Users/benl/devel/ghc/ghc-head-devel
Ben Lippmeier [Tue, 22 Nov 2011 07:33:07 +0000 (18:33 +1100)] 
Merge /Users/benl/devel/ghc/ghc-head-devel

7 years agoUpdate Safe Haskell documentation for new design in 7.4
David Terei [Tue, 22 Nov 2011 07:26:44 +0000 (23:26 -0800)] 
Update Safe Haskell documentation for new design in 7.4

7 years agovectoriser: fix pvoids problem when vectorising enumerations
Ben Lippmeier [Tue, 22 Nov 2011 07:16:39 +0000 (18:16 +1100)] 
vectoriser: fix pvoids problem when vectorising enumerations

Also give a civilised error message when the data type to vectorised contains no data.

7 years agoAdd doc for -msse4.2 flag.
David Terei [Tue, 22 Nov 2011 00:07:56 +0000 (16:07 -0800)] 
Add doc for -msse4.2 flag.

7 years agoImprove documentation on backends
David Terei [Mon, 21 Nov 2011 23:57:42 +0000 (15:57 -0800)] 
Improve documentation on backends

7 years agoTurn on LLVM backend if 'keep-llvm-files' flag specified.
David Terei [Mon, 21 Nov 2011 22:34:04 +0000 (14:34 -0800)] 
Turn on LLVM backend if 'keep-llvm-files' flag specified.

7 years agoImprove code generator documentation.
David Terei [Mon, 21 Nov 2011 19:39:09 +0000 (11:39 -0800)] 
Improve code generator documentation.

7 years agoReplace EkCtxt by an SDoc
Jose Pedro Magalhaes [Mon, 21 Nov 2011 11:18:16 +0000 (11:18 +0000)] 
Replace EkCtxt by an SDoc

We were never really manipulating the EkCtxt after we had built it,
so it's simpler to just pass the final SDoc.

7 years agoRename ? to OpenKind and ?? to ArgKind
Jose Pedro Magalhaes [Mon, 21 Nov 2011 10:47:44 +0000 (10:47 +0000)] 
Rename ? to OpenKind and ?? to ArgKind

The previous names were not informative at all, and now we have
named kinds like Constraint and datatype promotion to kind, so
we might as well name these too.

I tried to update some comments to the new names, but certainly
many references to the old names remain.

7 years agoFix bug in the handling of TSOs in the compacting GC (#5644)
Simon Marlow [Fri, 18 Nov 2011 17:05:44 +0000 (17:05 +0000)] 
Fix bug in the handling of TSOs in the compacting GC (#5644)

7 years agoFix #5636: Use clang as assembler on OSX when LLVM >= 3.0
David Terei [Mon, 21 Nov 2011 11:01:32 +0000 (03:01 -0800)] 
Fix #5636: Use clang as assembler on OSX when LLVM >= 3.0

LLVM doesn't support the OS X system assembler anymore so we must use
their assembler through clang. Also improved error messages when various
LLVM tools can't be run.

7 years agoSimplify a regexp and improve a couple of comments
Ian Lynagh [Sun, 20 Nov 2011 18:23:37 +0000 (18:23 +0000)] 
Simplify a regexp and improve a couple of comments

7 years agoAdd branch command to sync-all
Max Bolingbroke [Sat, 19 Nov 2011 11:27:38 +0000 (11:27 +0000)] 
Add branch command to sync-all

7 years agoImprove the way we call "rm" in the build system; fixes trac #4916
Ian Lynagh [Sat, 19 Nov 2011 01:29:05 +0000 (01:29 +0000)] 
Improve the way we call "rm" in the build system; fixes trac #4916

We avoid calling "rm -rf" with no file arguments; this fixes cleaning
on Solaris, where that fails.

We also check for suspicious arguments: anything containing "..",
starting "/", or containing a "*" (you need to call $(wildcard ...)
yourself now if you really want globbing). This should make things
a little safer.

7 years agoRemove a redundant tabs warning kludge
Ian Lynagh [Fri, 18 Nov 2011 22:22:44 +0000 (22:22 +0000)] 
Remove a redundant tabs warning kludge

The tabs have already disappeared

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Fri, 18 Nov 2011 19:07:33 +0000 (19:07 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoUpdate for a mutable localeEncoding
Max Bolingbroke [Fri, 18 Nov 2011 17:49:04 +0000 (17:49 +0000)] 
Update for a mutable localeEncoding

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Fri, 18 Nov 2011 16:42:11 +0000 (16:42 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agofix new warnings with gcc 4.6
Simon Marlow [Fri, 18 Nov 2011 14:59:49 +0000 (14:59 +0000)] 
fix new warnings with gcc 4.6

7 years agohscParse: do not record a dependency on non-existent source files
Simon Marlow [Fri, 18 Nov 2011 14:59:37 +0000 (14:59 +0000)] 
hscParse: do not record a dependency on non-existent source files

7 years agoCreate the directory for dump files to be put in
Ian Lynagh [Fri, 18 Nov 2011 13:48:33 +0000 (13:48 +0000)] 
Create the directory for dump files to be put in

Now that we don't necessarily put them in the same place as the source,
the directory may not exist.

7 years agoAdd -dumpdir flag; fixes trac #5198
Ian Lynagh [Fri, 18 Nov 2011 02:06:57 +0000 (02:06 +0000)] 
Add -dumpdir flag; fixes trac #5198

-ddump-* files are put in the given directory.

-outputdir also sets the dumpdir.

7 years agoTrack #included files for recompilation checking (#4900, #3589)
Simon Marlow [Fri, 18 Nov 2011 12:46:01 +0000 (12:46 +0000)] 
Track #included files for recompilation checking (#4900, #3589)

This was pretty straightforward: collect the filenames in the lexer,
and add them in to the tcg_dependent_files list that the typechecker
collects.

Note that we still don't get #included files in the ghc -M output.
Since we don't normally lex the whole file in ghc -M, this same
mechanism can't be used directly.

7 years agoThe "Linking" message should go through compilationProgressMessage
Simon Marlow [Fri, 18 Nov 2011 12:42:32 +0000 (12:42 +0000)] 
The "Linking" message should go through compilationProgressMessage

Currently it is appearing on stderr, whereas the rest of the messages
from --make go to stdout, this change fixes that.

7 years agoTweak to pretty printing for UsageFile
Simon Marlow [Fri, 18 Nov 2011 12:41:41 +0000 (12:41 +0000)] 
Tweak to pretty printing for UsageFile

7 years agoFix the vectorisation of workers of data constructors
Manuel M T Chakravarty [Fri, 18 Nov 2011 04:05:01 +0000 (15:05 +1100)] 
Fix the vectorisation of workers of data constructors

7 years agoBetter documentation for stack alignment design
David Terei [Thu, 17 Nov 2011 23:38:02 +0000 (15:38 -0800)] 
Better documentation for stack alignment design

7 years agoTabs -> Spaces + formatting fixes
David Terei [Thu, 17 Nov 2011 23:35:33 +0000 (15:35 -0800)] 
Tabs -> Spaces + formatting fixes

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 17 Nov 2011 17:45:22 +0000 (17:45 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoFix panic (missing keepWanteds) in simplifyApprox
Dimitrios Vytiniotis [Thu, 17 Nov 2011 16:39:54 +0000 (16:39 +0000)] 
Fix panic (missing keepWanteds) in simplifyApprox

7 years agoGhcProfiled: don't automatically add -auto-all
Simon Marlow [Thu, 17 Nov 2011 11:59:10 +0000 (11:59 +0000)] 
GhcProfiled: don't automatically add -auto-all

7 years agoAdd some missing top-level SCCs
Simon Marlow [Thu, 17 Nov 2011 11:58:39 +0000 (11:58 +0000)] 
Add some missing top-level SCCs

7 years agoAdd a getStablePtr for flushStdHandles_closure
Simon Marlow [Thu, 17 Nov 2011 13:17:53 +0000 (13:17 +0000)] 
Add a getStablePtr for flushStdHandles_closure

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 17 Nov 2011 16:02:23 +0000 (16:02 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoMake DsMeta work right on tuples (cf Trac #5597)
Simon Peyton Jones [Thu, 17 Nov 2011 13:14:14 +0000 (13:14 +0000)] 
Make DsMeta work right on tuples (cf Trac #5597)

7 years agoRemove a quadratic complexity blow-up in coercionKind
Simon Peyton Jones [Thu, 17 Nov 2011 13:13:15 +0000 (13:13 +0000)] 
Remove a quadratic complexity blow-up in coercionKind
thereby fixing Trac #5631.

See Note [Nested InstCos] in Coercion

7 years agoWarning police
Manuel M T Chakravarty [Thu, 17 Nov 2011 12:14:11 +0000 (23:14 +1100)] 
Warning police

7 years agoSpecial case dictionary abstraction and application during vectorisation
Manuel M T Chakravarty [Thu, 17 Nov 2011 11:33:49 +0000 (22:33 +1100)] 
Special case dictionary abstraction and application during vectorisation

7 years agoTabs -> spaces & other white space
Manuel M T Chakravarty [Tue, 15 Nov 2011 08:32:31 +0000 (19:32 +1100)] 
Tabs -> spaces & other white space

7 years agoFix #4211: No need to fixup stack using mangler on OSX
David Terei [Wed, 16 Nov 2011 03:21:34 +0000 (19:21 -0800)] 
Fix #4211: No need to fixup stack using mangler on OSX

We now manage the stack correctly on both x86 and i386, keeping
the stack align at (16n bytes - word size) on function entry
and at (16n bytes) on function calls. This gives us compatability
with LLVM and GCC.

7 years agoRemoving the default grouping clause from the SQL-like comprehension notation ;
George Giorgidze [Wed, 2 Nov 2011 22:43:36 +0000 (23:43 +0100)] 
Removing the default grouping clause from the SQL-like comprehension notation ;

7 years agoMerge /Users/benl/devel/ghc/ghc-head-devel
Ben Lippmeier [Thu, 17 Nov 2011 02:31:37 +0000 (13:31 +1100)] 
Merge /Users/benl/devel/ghc/ghc-head-devel

7 years agovectoriser: Use Sels2 type for vector of selectors in PDatas Sum2 instance
Ben Lippmeier [Thu, 17 Nov 2011 02:30:58 +0000 (13:30 +1100)] 
vectoriser: Use Sels2 type for vector of selectors in PDatas Sum2 instance

7 years agovectoriser: mkCast args the other way around, and fix warning
Ben Lippmeier [Thu, 17 Nov 2011 02:30:02 +0000 (13:30 +1100)] 
vectoriser: mkCast args the other way around, and fix warning

7 years agovectoriser: follow constraint solver changes in vectoriser
Ben Lippmeier [Thu, 17 Nov 2011 01:35:35 +0000 (12:35 +1100)] 
vectoriser: follow constraint solver changes in vectoriser

7 years agoMerge /Users/benl/devel/ghc/ghc-head-devel
Ben Lippmeier [Thu, 17 Nov 2011 01:34:57 +0000 (12:34 +1100)] 
Merge /Users/benl/devel/ghc/ghc-head-devel

Conflicts:
compiler/vectorise/Vectorise/Type/PRepr.hs

7 years agoRemove executable mode from some files
David Terei [Wed, 16 Nov 2011 18:17:23 +0000 (10:17 -0800)] 
Remove executable mode from some files

7 years agoTabs -> Spaces + formatting fixes
David Terei [Wed, 16 Nov 2011 21:37:34 +0000 (13:37 -0800)] 
Tabs -> Spaces + formatting fixes

7 years agoAdd Safe Haskell '-fwarn-safe', '-fwarn-unsafe', '-fno-safe-infer' flags
David Terei [Wed, 16 Nov 2011 21:22:27 +0000 (13:22 -0800)] 
Add Safe Haskell '-fwarn-safe', '-fwarn-unsafe', '-fno-safe-infer' flags