ghc.git
7 years agoRevert "Remove ArchUnknown"
Ian Lynagh [Wed, 19 Oct 2011 00:58:17 +0000 (01:58 +0100)] 
Revert "Remove ArchUnknown"

This reverts commit 2dea11a442e1d14d86fa661804de06a721943bf0.

On second thoughts, this does make sense, for unregisterised via-C
arches at least.

7 years agoRemove ArchUnknown
Ian Lynagh [Tue, 18 Oct 2011 18:01:27 +0000 (19:01 +0100)] 
Remove ArchUnknown

It doesn't make sense. If platformArch is ArchUnknown then we don't know
the answer to any questions about the arch. So now if we don't recognise
the arch we just fail, and the new arch will need to be added to the
datatype.

7 years agoRemove OSUnknown
Ian Lynagh [Tue, 18 Oct 2011 17:41:29 +0000 (18:41 +0100)] 
Remove OSUnknown

It doesn't make sense. If platformOS is OSUnknown then we don't know the
answer to any questions about the OS. So now if we don't recognise the
OS we just fail, and the new OS will need to be added to the datatype.

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Tue, 18 Oct 2011 16:18:32 +0000 (17:18 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoMove freeStablePtr() into the exported API (Lennart wants it)
Simon Marlow [Tue, 18 Oct 2011 15:22:49 +0000 (16:22 +0100)] 
Move freeStablePtr() into the exported API (Lennart wants it)

7 years agofix the object suffix when using TH with profiling (#5554)
Simon Marlow [Tue, 18 Oct 2011 12:23:29 +0000 (13:23 +0100)] 
fix the object suffix when using TH with profiling (#5554)

7 years agofix value of this_mod passed to tcRnImports (#5545)
Simon Marlow [Tue, 18 Oct 2011 10:31:53 +0000 (11:31 +0100)] 
fix value of this_mod passed to tcRnImports (#5545)

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Tue, 18 Oct 2011 11:26:57 +0000 (12:26 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoGet Windows building dynlibs again
Ian Lynagh [Tue, 18 Oct 2011 11:07:29 +0000 (12:07 +0100)] 
Get Windows building dynlibs again

7 years agoAdd -fpackage-trust flag to Safe Haskell.
David Terei [Tue, 18 Oct 2011 03:38:37 +0000 (20:38 -0700)] 
Add -fpackage-trust flag to Safe Haskell.

7 years agoremove some old files
David Terei [Mon, 17 Oct 2011 21:50:09 +0000 (14:50 -0700)] 
remove some old files

7 years agoFix safe haskell warnings to include src locations
David Terei [Mon, 17 Oct 2011 20:49:48 +0000 (13:49 -0700)] 
Fix safe haskell warnings to include src locations

7 years agoFormatting wibbles.
David Terei [Fri, 7 Oct 2011 01:34:52 +0000 (18:34 -0700)] 
Formatting wibbles.

7 years agoRemove cruft code from old Safe Haskell implementation method
David Terei [Fri, 7 Oct 2011 01:33:01 +0000 (18:33 -0700)] 
Remove cruft code from old Safe Haskell implementation method

7 years agofix warning
Simon Marlow [Mon, 17 Oct 2011 12:25:18 +0000 (13:25 +0100)] 
fix warning

7 years agomake CAFs atomic, to fix #5558
Simon Marlow [Mon, 17 Oct 2011 12:16:02 +0000 (13:16 +0100)] 
make CAFs atomic, to fix #5558

See Note [atomic CAFs] in rts/sm/Storage.c

7 years agoWhitespace only in simplCore/SimplCore.lhs.
Michal Terepeta [Sun, 9 Oct 2011 11:11:54 +0000 (13:11 +0200)] 
Whitespace only in simplCore/SimplCore.lhs.

7 years agobuild registerised on ARM platform by default
Karel Gardas [Wed, 12 Oct 2011 16:28:29 +0000 (18:28 +0200)] 
build registerised on ARM platform by default

7 years agoPass Platform to pprExpr1
Ben Gamari [Wed, 12 Oct 2011 13:24:13 +0000 (09:24 -0400)] 
Pass Platform to pprExpr1

Fixes build error:

compiler/cmm/PprC.hs:961:33:
    Couldn't match expected type `Platform'
           against inferred type `CmmExpr'
    In the first argument of `pprExpr1', namely `expr'
    In the second argument of `(<+>)', namely `pprExpr1 expr'
    In the first argument of `parens', namely
        `(cast <+> pprExpr1 expr)'

8 years agoOn non-Windows, go back to using the libffi dynlib for the dyn way
Ian Lynagh [Sun, 16 Oct 2011 20:37:16 +0000 (21:37 +0100)] 
On non-Windows, go back to using the libffi dynlib for the dyn way

8 years agoRemove CPP from llvmGen/LlvmCodeGen/CodeGen.hs
Ian Lynagh [Sat, 15 Oct 2011 09:41:47 +0000 (10:41 +0100)] 
Remove CPP from llvmGen/LlvmCodeGen/CodeGen.hs

8 years agoRemove a little more CPP
Ian Lynagh [Fri, 14 Oct 2011 23:50:25 +0000 (00:50 +0100)] 
Remove a little more CPP

8 years agoRemove some CPP from nativeGen/SPARC/Ppr.hs
Ian Lynagh [Fri, 14 Oct 2011 23:27:33 +0000 (00:27 +0100)] 
Remove some CPP from nativeGen/SPARC/Ppr.hs

8 years agode-CPP codeGen/CgCon.lhs
Ian Lynagh [Fri, 14 Oct 2011 22:24:48 +0000 (23:24 +0100)] 
de-CPP codeGen/CgCon.lhs

8 years agoWhitespace only in codeGen/CgCon.lhs
Ian Lynagh [Fri, 14 Oct 2011 22:07:32 +0000 (23:07 +0100)] 
Whitespace only in codeGen/CgCon.lhs

8 years agoTweak a comment
Ian Lynagh [Fri, 14 Oct 2011 22:04:14 +0000 (23:04 +0100)] 
Tweak a comment

8 years agoMerge branch 'master' of dippy:c:/msys/1.0/home/ian/ghc/.
Ian Lynagh [Fri, 14 Oct 2011 20:29:09 +0000 (21:29 +0100)] 
Merge branch 'master' of dippy:c:/msys/1.0/home/ian/ghc/.

8 years agoTemporary hack to get Windows to validate again
Ian Lynagh [Fri, 14 Oct 2011 20:27:57 +0000 (21:27 +0100)] 
Temporary hack to get Windows to validate again

For now, turn off dynlibs when validating

8 years agoRemove CPP from codeGen/StgCmmCon.hs
Ian Lynagh [Fri, 14 Oct 2011 19:47:22 +0000 (20:47 +0100)] 
Remove CPP from codeGen/StgCmmCon.hs

8 years agoWhitespace only in codeGen/StgCmmCon.hs
Ian Lynagh [Fri, 14 Oct 2011 19:38:38 +0000 (20:38 +0100)] 
Whitespace only in codeGen/StgCmmCon.hs

8 years agoRemove some CPP
Ian Lynagh [Fri, 14 Oct 2011 19:36:30 +0000 (20:36 +0100)] 
Remove some CPP

8 years agoRemove some CPP
Ian Lynagh [Fri, 14 Oct 2011 19:25:49 +0000 (20:25 +0100)] 
Remove some CPP

8 years agoFix some warnings
Ian Lynagh [Fri, 14 Oct 2011 19:16:32 +0000 (20:16 +0100)] 
Fix some warnings

8 years agoMerge branch 'master' of dippy:c:/msys/1.0/home/ian/ghc/.
Ian Lynagh [Fri, 14 Oct 2011 15:25:31 +0000 (16:25 +0100)] 
Merge branch 'master' of dippy:c:/msys/1.0/home/ian/ghc/.

8 years agoFix libffi build on Windows
Ian Lynagh [Fri, 14 Oct 2011 15:11:10 +0000 (16:11 +0100)] 
Fix libffi build on Windows

8 years agoDon't hide the binary package
Ian Lynagh [Fri, 14 Oct 2011 14:17:06 +0000 (15:17 +0100)] 
Don't hide the binary package

Cabal will use it regardless, and if people are going to use binary then
it's a lot better if they use the one that we ship, rather than
installing a second version.

8 years agoFix ffi build on amd64/Linux, and simplify a little more
Ian Lynagh [Fri, 14 Oct 2011 12:45:35 +0000 (13:45 +0100)] 
Fix ffi build on amd64/Linux, and simplify a little more

8 years agoMerge branch 'master' of mac:ghc/git/val32/.
Ian Lynagh [Fri, 14 Oct 2011 02:11:51 +0000 (03:11 +0100)] 
Merge branch 'master' of mac:ghc/git/val32/.

8 years agoSimplify the libffi build
Ian Lynagh [Fri, 14 Oct 2011 01:43:50 +0000 (02:43 +0100)] 
Simplify the libffi build

We now put the libffi objects into the RTS library, rather than trying
to mangle libffi into being a ghc package itself. It would be nicer to
 make it a separate library (but not a ghc package), but for now
 hopefully this will get the build going through on Windows again.

8 years agoInclude -optc options in mkExtraCObj (#5528)
Simon Marlow [Mon, 10 Oct 2011 14:56:50 +0000 (15:56 +0100)] 
Include -optc options in mkExtraCObj (#5528)

8 years agoFollow the removal of the Show superclass of Num
Ian Lynagh [Thu, 15 Sep 2011 19:44:28 +0000 (20:44 +0100)] 
Follow the removal of the Show superclass of Num

8 years agoIncrease max simplifier tick count magic number (Trac #5539)
Simon Peyton Jones [Wed, 12 Oct 2011 10:50:55 +0000 (11:50 +0100)] 
Increase max simplifier tick count magic number (Trac #5539)

8 years agoDos to Unix file encoding
Simon Peyton Jones [Wed, 12 Oct 2011 10:50:04 +0000 (11:50 +0100)] 
Dos to Unix file encoding

8 years agoAlways define rtsOptsEnabled in the "extra object" when linking
Ian Lynagh [Tue, 11 Oct 2011 20:49:35 +0000 (21:49 +0100)] 
Always define rtsOptsEnabled in the "extra object" when linking

Now that we always link in an extra object, we may as well always
define rtsOptsEnabled in it, rather than having a default value in
rts/hooks/RtsOptsEnabled.c.

8 years agofix panic in string-gap lexing (#5425)
Simon Marlow [Mon, 10 Oct 2011 09:40:00 +0000 (10:40 +0100)] 
fix panic in string-gap lexing (#5425)

8 years agocomment
Simon Marlow [Mon, 10 Oct 2011 09:45:02 +0000 (10:45 +0100)] 
comment

8 years agodocument the -H option
Simon Marlow [Fri, 7 Oct 2011 13:47:51 +0000 (14:47 +0100)] 
document the -H option

8 years agoFully implement for VECTORISE type pragmas (non-SCALAR).
Manuel M T Chakravarty [Mon, 10 Oct 2011 01:01:51 +0000 (12:01 +1100)] 
Fully implement for VECTORISE type pragmas (non-SCALAR).

8 years agoMerge branch 'fix#5464'
Jose Pedro Magalhaes [Fri, 7 Oct 2011 07:02:26 +0000 (08:02 +0100)] 
Merge branch 'fix#5464'

8 years agoMerge branch 'master' of mac:ghc/git/val32/.
Ian Lynagh [Thu, 6 Oct 2011 19:43:36 +0000 (20:43 +0100)] 
Merge branch 'master' of mac:ghc/git/val32/.

8 years agoUse -no_compact_unwind on OS X x86 (as well as x86_64)
Ian Lynagh [Thu, 6 Oct 2011 19:37:30 +0000 (20:37 +0100)] 
Use -no_compact_unwind on OS X x86 (as well as x86_64)

Without it we get warnings like:
    ld: warning: could not create compact unwind for .LFB3: non-standard register 5 being saved in prolog

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Thu, 6 Oct 2011 19:03:11 +0000 (20:03 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoMerge branch 'master' of mac:ghc/git/val32/.
Ian Lynagh [Thu, 6 Oct 2011 18:55:46 +0000 (19:55 +0100)] 
Merge branch 'master' of mac:ghc/git/val32/.

8 years agoSilence "text reloc" warnings on OS X / x86
Ian Lynagh [Thu, 6 Oct 2011 18:40:51 +0000 (19:40 +0100)] 
Silence "text reloc" warnings on OS X / x86

ld gives loads of warnings like:
    ld: warning: text reloc in _base_GHCziArr_unsafeArray_info to _base_GHCziArr_unsafeArray_closure
when linking any program. We're not sure whether this is something we
ought to fix, but for now we use the -Wl,-read_only_relocs,suppress flag
to silence them.

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Thu, 6 Oct 2011 16:10:12 +0000 (17:10 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoFurther refining the generation of Generic instances.
Jose Pedro Magalhaes [Thu, 6 Oct 2011 15:47:44 +0000 (16:47 +0100)] 
Further refining the generation of Generic instances.

8 years agoBuild fixes for OS X amd64 following libffi update
Ian Lynagh [Thu, 6 Oct 2011 15:27:37 +0000 (16:27 +0100)] 
Build fixes for OS X amd64 following libffi update

8 years agoAllow foreign import declarations to the entered interactively in GHCi.
Simon Marlow [Thu, 22 Sep 2011 00:33:59 +0000 (01:33 +0100)] 
Allow foreign import declarations to the entered interactively in GHCi.

8 years agoDocumentation for type/class declarations in GHCi (#4929)
Simon Marlow [Thu, 6 Oct 2011 11:29:55 +0000 (12:29 +0100)] 
Documentation for type/class declarations in GHCi (#4929)

8 years agoUse a custom dead-code analyser instead of calling the occurrence analyser.
Simon Marlow [Thu, 6 Oct 2011 10:57:52 +0000 (11:57 +0100)] 
Use a custom dead-code analyser instead of calling the occurrence analyser.

In CorePrep we used to call the occurrence analyser to drop dead code
(see Note [Dead code in CorePrep]), but the occurrence analyser
sometimes introduces new let bindings for case binders.  This was
leading to the bug in #5433: the let binding introduced was for an
unlifted value, and the code generator is not expecting to see let
bindings of unlifted values (CorePrep is supposed to eliminate them).
We don't want this let binding anyway, so instead of using the
occurrence analyser here we have a simple custom dead-code analyser.

8 years agoWibbles from Simon and Pedro
Simon Peyton Jones [Thu, 6 Oct 2011 10:48:07 +0000 (11:48 +0100)] 
Wibbles from Simon and Pedro

8 years agoFollow libffi update
Ian Lynagh [Wed, 5 Oct 2011 23:17:50 +0000 (00:17 +0100)] 
Follow libffi update

8 years agoFix dynCompileExpr
Ian Lynagh [Wed, 5 Oct 2011 18:17:47 +0000 (19:17 +0100)] 
Fix dynCompileExpr

It broke during the ic_exports tidyup
(e.g. commit 5cd39aa33f970ff42e22b1c9c73502e4229dc488).

8 years agoSome more refactoring.
Jose Pedro Magalhaes [Wed, 5 Oct 2011 08:25:50 +0000 (09:25 +0100)] 
Some more refactoring.

8 years agoBuild system commentary
Simon Marlow [Mon, 3 Oct 2011 15:45:05 +0000 (16:45 +0100)] 
Build system commentary

Add documentation describing all the variables that contain options
for Haskell compilations, what they mean and where they are (or can
be) defined.

In due course we should expand this to cover all the build system
variables, and move it to the wiki, but this is a start.

8 years agoworkaround for #5485: use -fno-full-laziness with 7.2.1
Simon Marlow [Mon, 3 Oct 2011 15:44:47 +0000 (16:44 +0100)] 
workaround for #5485: use -fno-full-laziness with 7.2.1

8 years agofix Note cross-ref
Simon Marlow [Mon, 3 Oct 2011 15:38:03 +0000 (16:38 +0100)] 
fix Note cross-ref

8 years agoUpdate the "Known bugs and infelicities" section of the manual
Ian Lynagh [Tue, 4 Oct 2011 23:50:42 +0000 (00:50 +0100)] 
Update the "Known bugs and infelicities" section of the manual

8 years agoFixed typo
Daniel Fischer [Tue, 4 Oct 2011 15:40:48 +0000 (17:40 +0200)] 
Fixed typo

8 years agoMerge branch 'master' into fix#5464
Jose Pedro Magalhaes [Tue, 4 Oct 2011 14:26:50 +0000 (15:26 +0100)] 
Merge branch 'master' into fix#5464

8 years agoRefactor the implementation.
Jose Pedro Magalhaes [Tue, 4 Oct 2011 13:43:42 +0000 (14:43 +0100)] 
Refactor the implementation.

8 years agoRemove unnecessary references to -fglagow-exts
Simon Peyton Jones [Tue, 4 Oct 2011 10:47:44 +0000 (11:47 +0100)] 
Remove unnecessary references to -fglagow-exts
replacing them by the appropriate flag.

Suggested by Trac #5526.

8 years agoChange error message slightly
Simon Peyton Jones [Tue, 4 Oct 2011 08:26:11 +0000 (09:26 +0100)] 
Change error message slightly
in response to Neil's suggestion on Trac #4877

8 years agoComments and refactoring (probably breaks the branch)
Simon Peyton Jones [Mon, 3 Oct 2011 15:51:12 +0000 (16:51 +0100)] 
Comments and refactoring (probably breaks the branch)

8 years agoFollow changes to HValue/Any handling
Ian Lynagh [Mon, 3 Oct 2011 12:22:52 +0000 (13:22 +0100)] 
Follow changes to HValue/Any handling

Also removed the type argument to Any in primops.txt.pp. I don't
see why we need it, and it now breaks haddocking GHC.Prim.

8 years agoComment out commutableOp; we don't use it at the moment
Ian Lynagh [Mon, 3 Oct 2011 10:07:54 +0000 (11:07 +0100)] 
Comment out commutableOp; we don't use it at the moment

8 years agoHandle HValues slightly nicer
Ian Lynagh [Mon, 3 Oct 2011 10:03:36 +0000 (11:03 +0100)] 
Handle HValues slightly nicer

We now have addrToAny# rather than addrToHValue#, and both addrToAny#
and mkApUpd0# return "Any" rather than "a". This makes it a little
easier to see what's going on, and fixes a warning in ByteCodeLink.

8 years agoFix typo
Ian Lynagh [Mon, 3 Oct 2011 09:43:14 +0000 (10:43 +0100)] 
Fix typo

8 years agoFix validate with old bootstrapping compilers
Ian Lynagh [Sun, 2 Oct 2011 19:19:47 +0000 (20:19 +0100)] 
Fix validate with old bootstrapping compilers

They weren't smart enough to see our GADT pattern matches are complete,
so gave a warning.

8 years agoFix warnings in prelude/ForeignCall.lhs
Ian Lynagh [Sun, 2 Oct 2011 19:06:52 +0000 (20:06 +0100)] 
Fix warnings in prelude/ForeignCall.lhs

8 years agoFix the Binary CCallConv instance
Ian Lynagh [Sun, 2 Oct 2011 19:01:57 +0000 (20:01 +0100)] 
Fix the Binary CCallConv instance

The CmmCallConv constructor was missing.

8 years agoWhitespace only in prelude/ForeignCall.lhs
Ian Lynagh [Sun, 2 Oct 2011 18:59:41 +0000 (19:59 +0100)] 
Whitespace only in prelude/ForeignCall.lhs

8 years agoReplace a -w flag with the more specific -fno-warn-deprecations
Ian Lynagh [Sun, 2 Oct 2011 18:54:14 +0000 (19:54 +0100)] 
Replace a -w flag with the more specific -fno-warn-deprecations

8 years agoRemove a debugging -w flag
Ian Lynagh [Sun, 2 Oct 2011 18:52:50 +0000 (19:52 +0100)] 
Remove a debugging -w flag

8 years agoFix warnings in cmm/CLabel.hs
Ian Lynagh [Sun, 2 Oct 2011 18:50:56 +0000 (19:50 +0100)] 
Fix warnings in cmm/CLabel.hs

8 years agoWhitespace only in cmm/CLabel.hs
Ian Lynagh [Sun, 2 Oct 2011 18:30:44 +0000 (19:30 +0100)] 
Whitespace only in cmm/CLabel.hs

8 years agoRemove remaining CPP from cmm/CLabel.hs
Ian Lynagh [Sun, 2 Oct 2011 18:26:32 +0000 (19:26 +0100)] 
Remove remaining CPP from cmm/CLabel.hs

8 years agoFix build on OX X amd64
Ian Lynagh [Sun, 2 Oct 2011 16:28:50 +0000 (17:28 +0100)] 
Fix build on OX X amd64

8 years agoMore CPP removal: pprDynamicLinkerAsmLabel in CLabel
Ian Lynagh [Sun, 2 Oct 2011 00:31:05 +0000 (01:31 +0100)] 
More CPP removal: pprDynamicLinkerAsmLabel in CLabel

And some knock-on changes

8 years agoSome CPP removal
Ian Lynagh [Sun, 2 Oct 2011 00:03:23 +0000 (01:03 +0100)] 
Some CPP removal

8 years agoFix bindist finding gcc on OS X; fixes trac #5397
Ian Lynagh [Sat, 1 Oct 2011 20:00:27 +0000 (21:00 +0100)] 
Fix bindist finding gcc on OS X; fixes trac #5397

$TargetOS_CPP wasn't getting defined in a bindist, which meant the
code to use gcc-4.2 instead of gcc on OS X wasn't working. Now fixed,
by moving some of configure.ac's code into the shared aclocal.m4.

8 years agoHandle newtypes and type functions correctly in FFI types; fixes #3008
Ian Lynagh [Fri, 30 Sep 2011 20:57:53 +0000 (21:57 +0100)] 
Handle newtypes and type functions correctly in FFI types; fixes #3008

You can now use type functions in FFI types.

Newtypes are now only looked through if the constructor is in scope.

8 years agowhitespace only in prelude/PrimOp.lhs
Ian Lynagh [Thu, 29 Sep 2011 23:32:47 +0000 (00:32 +0100)] 
whitespace only in prelude/PrimOp.lhs

8 years agoWhitespace only in TcRnMonad.lhs
Ian Lynagh [Wed, 28 Sep 2011 19:45:24 +0000 (20:45 +0100)] 
Whitespace only in TcRnMonad.lhs

8 years agoFix parenthesisation in conversion from TH.Exp to HsExpr.HsExpr
Simon Peyton Jones [Thu, 29 Sep 2011 15:57:16 +0000 (16:57 +0100)] 
Fix parenthesisation in conversion from TH.Exp to HsExpr.HsExpr

We need to generate enough parens so that -ddump-splices is
correct Haskell.  There is certainly further to go.

8 years agoTidy up the shape-checking for instance types
Simon Peyton Jones [Thu, 29 Sep 2011 15:47:57 +0000 (16:47 +0100)] 
Tidy up the shape-checking for instance types
(in instance and standalone deriving decls)

Fixes Trac #5513.

8 years agoGive a better error message for unterminated quasiquotations (fixes #5204).
Geoffrey Mainland [Thu, 29 Sep 2011 11:31:49 +0000 (12:31 +0100)] 
Give a better error message for unterminated quasiquotations (fixes #5204).

8 years agoEliminate alleged optimisation that means we bogusly did NoGen
Simon Peyton Jones [Thu, 29 Sep 2011 15:06:17 +0000 (16:06 +0100)] 
Eliminate alleged optimisation that means we bogusly did NoGen

Fixes Trac #5514.  The fix is simply to delete some code.

8 years agoA tiny bit more debug info
Simon Peyton Jones [Thu, 29 Sep 2011 15:05:31 +0000 (16:05 +0100)] 
A tiny bit more debug info

8 years agoFix scoping for RHS of associated type decls (fixes Trac #5515)
Simon Peyton Jones [Thu, 29 Sep 2011 15:05:16 +0000 (16:05 +0100)] 
Fix scoping for RHS of associated type decls (fixes Trac #5515)

We should not allow things like

class C a b where
  type F a :: *

instance C (p,q) r where
  type F (p,q) = r   -- No! fvs(rhs) should be a subset
                     --     of fvs(lhs)