ghc.git
6 years agoSimplify ghc-cabal
Ian Lynagh [Tue, 14 May 2013 00:08:48 +0000 (01:08 +0100)] 
Simplify ghc-cabal

It now consistently takes directory and distDirectory as its first 2
arguments. Also, it only supports configuring 1 package at a time now
(we weren't using the ability to configure more than one at once).

6 years agoMake the current module available to labelDynamic
Ian Lynagh [Mon, 13 May 2013 19:45:11 +0000 (20:45 +0100)] 
Make the current module available to labelDynamic

It doesn't actually use it yet

6 years agoUse NatM_State record fields, rather than matching/constructing the whole type
Ian Lynagh [Mon, 13 May 2013 18:53:04 +0000 (19:53 +0100)] 
Use NatM_State record fields, rather than matching/constructing the whole type

6 years agoRefactor cmmMakeDynamicReference
Ian Lynagh [Mon, 13 May 2013 18:36:49 +0000 (19:36 +0100)] 
Refactor cmmMakeDynamicReference

It now has its own class, and the addImport function is defined in that
class, rather than needing to be passed as an argument.

6 years agoRemove redundant cmmMakeDynamicReference' wrapper
Ian Lynagh [Mon, 13 May 2013 18:12:03 +0000 (19:12 +0100)] 
Remove redundant cmmMakeDynamicReference' wrapper

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Sun, 12 May 2013 19:32:49 +0000 (20:32 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoMerge win:/cygdrive/c/ghc/git/dt
Ian Lynagh [Sun, 12 May 2013 19:31:45 +0000 (20:31 +0100)] 
Merge win:/cygdrive/c/ghc/git/dt

6 years agoMore work towards dynamic programs on Windows
Ian Lynagh [Sun, 12 May 2013 00:44:02 +0000 (01:44 +0100)] 
More work towards dynamic programs on Windows

Dynamic GHC is now working in-place, but pathologically slow due
to the DLL split.

(GHC assumes that all intra-package calls are in the same DLL, but that
isn't true when we split the GHC package into 2 DLLs. That means that
GHC's startup time is around 22 seconds, as it is doing run-time
linking).

Also, ghci isn't actually working yet:

$ inplace/bin/ghc-stage2 --interactive
GHCi, version 7.7.20130512: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... <command line>: can't load .so/.DLL for:
HSghc-prim-0.3.1.0.dll (addDLL: could not load DLL)
ghc-stage2.exe: HSghc-prim-0.3.1.0: The specified module could not be
found.

6 years agoRemove obsolete documentation.
Austin Seipp [Sun, 12 May 2013 16:22:36 +0000 (11:22 -0500)] 
Remove obsolete documentation.

Type variables can no longer be unqualified operators.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoWe actually need to use -threaded/-debug when linking /all/ DLLs
Ian Lynagh [Sun, 12 May 2013 15:25:08 +0000 (16:25 +0100)] 
We actually need to use -threaded/-debug when linking /all/ DLLs

Not just base, integer-gmp and ghc-prim.

6 years agoModernise some code
Ian Lynagh [Sun, 12 May 2013 14:01:13 +0000 (15:01 +0100)] 
Modernise some code

Use do notation rather than thenM in typecheck/TcHsSyn.lhs

6 years agoRemove a "returnM = return" wrapper in typecheck/TcHsSyn.lhs
Ian Lynagh [Sun, 12 May 2013 13:33:50 +0000 (14:33 +0100)] 
Remove a "returnM = return" wrapper in typecheck/TcHsSyn.lhs

6 years agoRemove a "mappM = mapM" wrapper in typecheck/TcHsSyn.lhs
Ian Lynagh [Sun, 12 May 2013 13:30:46 +0000 (14:30 +0100)] 
Remove a "mappM = mapM" wrapper in typecheck/TcHsSyn.lhs

6 years agoWhitespace only in typecheck/TcHsSyn.lhs
Ian Lynagh [Sun, 12 May 2013 13:28:53 +0000 (14:28 +0100)] 
Whitespace only in typecheck/TcHsSyn.lhs

6 years agoRemove an old commented out import
Ian Lynagh [Sun, 12 May 2013 13:22:12 +0000 (14:22 +0100)] 
Remove an old commented out import

6 years agoModernise code in rename/RnEnv.lhs
Ian Lynagh [Sun, 12 May 2013 13:19:06 +0000 (14:19 +0100)] 
Modernise code in rename/RnEnv.lhs

Removed a definition of thenM, and used do notation instead

6 years agoSome build system tweaks
Ian Lynagh [Fri, 10 May 2013 21:49:15 +0000 (22:49 +0100)] 
Some build system tweaks

6 years agoFix an all-target call in the build system
Ian Lynagh [Fri, 10 May 2013 20:58:31 +0000 (21:58 +0100)] 
Fix an all-target call in the build system

6 years agoMake sure the RTS is built, even when no programs are being built with stage1
Ian Lynagh [Fri, 10 May 2013 20:53:22 +0000 (21:53 +0100)] 
Make sure the RTS is built, even when no programs are being built with stage1

Part of #7841

6 years agoRemove a redundant wrapper function
Ian Lynagh [Fri, 10 May 2013 15:30:27 +0000 (16:30 +0100)] 
Remove a redundant wrapper function

6 years agoMake -fno-flat-cache use a dynamic, rather than static, flag
Ian Lynagh [Fri, 10 May 2013 15:24:59 +0000 (16:24 +0100)] 
Make -fno-flat-cache use a dynamic, rather than static, flag

6 years agorts_checkSchedStatus: exit the thread, not the process, when Interrupted
Simon Marlow [Wed, 6 Mar 2013 10:28:59 +0000 (10:28 +0000)] 
rts_checkSchedStatus: exit the thread, not the process, when Interrupted

This means that when the process is shutting down, if we have calls to
foreign exports in progress, they get forcibly terminated as before,
but now they only shut down the calling thread rather than the whole
process (with -threaded).

This came up in a discussion started by Akio Takano on ghc-users.

6 years agoGenerate dependencies for .cmm files properly
Ian Lynagh [Thu, 9 May 2013 19:44:08 +0000 (20:44 +0100)] 
Generate dependencies for .cmm files properly

6 years agoFix the name of libffi
Ian Lynagh [Thu, 9 May 2013 14:52:30 +0000 (15:52 +0100)] 
Fix the name of libffi

On Windows, we need to keep the DLL called libffi-6.dll (rather than
libffi.dll) or Windows can't find it.

6 years agoFix dynamically linked GHC on Windows
Ian Lynagh [Thu, 9 May 2013 14:28:51 +0000 (15:28 +0100)] 
Fix dynamically linked GHC on Windows

This is a rather ugly hack to fix dynamically linked GHC on Windows.

If GHC is linked with -threaded, then it links against libHSrts_thr.
But if base is linked against libHSrts, then both end up getting
loaded, and things go wrong. We therefore link the libraries that
link against the RTS with the same RTS flags that we link GHC with.

6 years agoTreat foreign imported things in CMM as being in this package
Ian Lynagh [Thu, 9 May 2013 14:15:54 +0000 (15:15 +0100)] 
Treat foreign imported things in CMM as being in this package

They used to be treated as being in an exnternal package, which went
wrong on Windows (it tried to call them via an imp wrapper, rather
than calling them directly).

6 years agoUpdate the name cache when creating new names via DeriveGeneric
Patrick Palka [Mon, 6 May 2013 02:41:27 +0000 (22:41 -0400)] 
Update the name cache when creating new names via DeriveGeneric

New external top-level names were being created but the name cache
wasn't being populated, leading to #7878.

Signed-off-by: Jose Pedro Magalhaes <jpm@cs.ox.ac.uk>
6 years agoAllow deriving Typeable for more tycons
Jose Pedro Magalhaes [Tue, 7 May 2013 08:16:29 +0000 (09:16 +0100)] 
Allow deriving Typeable for more tycons

6 years agoReorganize mk/build.mk.sample a little.
Austin Seipp [Sat, 4 May 2013 22:19:21 +0000 (17:19 -0500)] 
Reorganize mk/build.mk.sample a little.

People are probably more likely to notice some useful variables
if they're located closer to the top (like V=0 and stage=2.)

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFix/update SayAnnNames plugin example code.
Erik de Castro Lopo [Sat, 4 May 2013 18:34:38 +0000 (04:34 +1000)] 
Fix/update SayAnnNames plugin example code.

6 years agoDo not duplicate work in SpecConstr (fix Trac #7865)
Simon Peyton Jones [Fri, 3 May 2013 11:00:19 +0000 (12:00 +0100)] 
Do not duplicate work in SpecConstr (fix Trac #7865)

This is a bad bug, if a rare one.
See Note [Work-free values only in environment].

Thanks to Amos Robinson for finding it.

6 years agoImprove error message for existential newtypes
Simon Peyton Jones [Fri, 3 May 2013 09:06:19 +0000 (10:06 +0100)] 
Improve error message for existential newtypes

6 years agoIn doTopReactDict, try lookup even if fundeps work
Simon Peyton Jones [Fri, 3 May 2013 06:42:57 +0000 (07:42 +0100)] 
In doTopReactDict, try lookup even if fundeps work

Previously we looked for fundeps, and if any fired we
didn't try to solve the constraint.  But that's wrong
(see Note [Weird fundeps]).  Now I solve first and only
if that fails try fundeps.  Code is neater too.

Fixes Trac #7875

6 years agoFix kind quantification (again)
Simon Peyton Jones [Thu, 2 May 2013 16:28:20 +0000 (17:28 +0100)] 
Fix kind quantification (again)

We simply weren't quantifying kind variables at the points we
were claiming.  In paritcular, in
     forall (a:k). blah
we quantify the 'k' around the 'forall a', provided k isn't
already in scope

6 years agoEliminate (given) flatten-skolems in favour of user type variables
Simon Peyton Jones [Thu, 2 May 2013 16:14:23 +0000 (17:14 +0100)] 
Eliminate (given) flatten-skolems in favour of user type variables

See Note [Eliminate flat-skols].  IT wasn't exactly wrong before
the the error messages are deeply strange.

6 years agoMake isPredTy not use typeKind
Simon Peyton Jones [Thu, 2 May 2013 16:07:51 +0000 (17:07 +0100)] 
Make isPredTy not use typeKind

The pretty-printer uses isPredTy to decide whether to use "=>" or "->",
and typeKind crashes on ill-kinded types. But it's really unhelpful for
the pretty-printer to crash on an ill-kinded type, because then you can't
see it!

6 years agoImprove documentation of kind polymorphism
Simon Peyton Jones [Thu, 2 May 2013 16:06:13 +0000 (17:06 +0100)] 
Improve documentation of kind polymorphism

6 years agoDon't suppress foralls in the RHS of a type synonym definition!
Simon Peyton Jones [Thu, 2 May 2013 16:05:53 +0000 (17:05 +0100)] 
Don't suppress foralls in the RHS of a type synonym definition!

Fixes Trac #7872

6 years agoextended ticky to also track "let"s that are not conventional closures
Nicolas Frisby [Wed, 1 May 2013 13:45:52 +0000 (08:45 -0500)] 
extended ticky to also track "let"s that are not conventional closures

This includes selector, ap, and constructor thunks. They are still
guarded by the -ticky-dyn-thk flag.

(This is 024df664b600a with a small bug fix.)

6 years agoEnable -funbox-small-strict-fields by default
Johan Tibell [Fri, 26 Apr 2013 18:14:01 +0000 (11:14 -0700)] 
Enable -funbox-small-strict-fields by default

The flag shows no real impact on nofib benchmarks and GHC itself,
which is expected given the small number of strict but not already
unpacked fields in the source of these programs. However, the flag
allows us to omit most of the UNPACK pragmas that are so common in
source code today.

6 years agoFix comment to placate Haddock
Simon Peyton Jones [Tue, 30 Apr 2013 08:50:40 +0000 (09:50 +0100)] 
Fix comment to placate Haddock

6 years agoExend the "Too few args" message for naked Ids (Trac #7851)
Simon Peyton Jones [Mon, 29 Apr 2013 16:31:21 +0000 (17:31 +0100)] 
Exend the "Too few args" message for naked Ids (Trac #7851)

Previously, for
  f :: [Bool]
  f = map not

we'd get a helpful message
    Probable cause: ‛map’ is applied to too few arguments

but not for
  f :: [Bool]
  f = map

which seems a bit stupid.

6 years agoSuppress a misleading error message (Trac #7869)
Simon Peyton Jones [Mon, 29 Apr 2013 16:28:20 +0000 (17:28 +0100)] 
Suppress a misleading error message (Trac #7869)

We were saying
     The function `f' is applied to one argument,
     but its type `[a] -> b' has only one
which is obviously bogus.

This fix suppresses the explanation in cases where it may not
be the *right* explanation.

6 years agoTighten up on the kind checking for foralls
Simon Peyton Jones [Mon, 29 Apr 2013 16:26:17 +0000 (17:26 +0100)] 
Tighten up on the kind checking for foralls

In particular,
   (forall a. Num a => ...)
always has kind *, becuase the "=>" really is a function.

It turned out that this was at the bottom of the crash in Trac #7778,
which is now fixed

6 years agoFix build on OS X
Ian Lynagh [Mon, 29 Apr 2013 23:42:31 +0000 (00:42 +0100)] 
Fix build on OS X

sed on OS X doesn't handle \+

6 years agoFix build
Ian Lynagh [Sun, 28 Apr 2013 21:15:44 +0000 (22:15 +0100)] 
Fix build

6 years agoAdd -L flags to libs.depend (fixes #7465)
Ian Lynagh [Sun, 28 Apr 2013 21:04:04 +0000 (22:04 +0100)] 
Add -L flags to libs.depend (fixes #7465)

Based on a patch from Peter Trommler

6 years agoTidy up some build system code
Ian Lynagh [Sun, 28 Apr 2013 21:02:11 +0000 (22:02 +0100)] 
Tidy up some build system code

6 years agoSmall refactoring in ghc-pkg
Ian Lynagh [Sun, 28 Apr 2013 20:59:28 +0000 (21:59 +0100)] 
Small refactoring in ghc-pkg

6 years agoUpdate Cabal
Ian Lynagh [Sun, 28 Apr 2013 20:58:16 +0000 (21:58 +0100)] 
Update Cabal

6 years agoRemove some old "backwards compatibility" code
Ian Lynagh [Sun, 28 Apr 2013 20:57:03 +0000 (21:57 +0100)] 
Remove some old "backwards compatibility" code

It was marked as "backwards compatibility" in 2006, so I think
can be removed now. It allowed using old field names when looking
at fields with ghc-pkg.

6 years agoMake "ghc-pkg field pkg field --simple-output" do something useful
Ian Lynagh [Sun, 28 Apr 2013 20:50:47 +0000 (21:50 +0100)] 
Make "ghc-pkg field pkg field --simple-output" do something useful

It used to just ignore the --simple-output flag

6 years agoRecord libffi directory in rts package conf; trac #7465
Ian Lynagh [Sun, 28 Apr 2013 16:46:16 +0000 (17:46 +0100)] 
Record libffi directory in rts package conf; trac #7465

Patch from Peter Trommler

6 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Sat, 27 Apr 2013 23:49:30 +0000 (00:49 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

6 years agoFix build on Windows
Ian Lynagh [Sat, 27 Apr 2013 23:15:55 +0000 (00:15 +0100)] 
Fix build on Windows

6 years agoFix linking with binutils 2.22 or later on FreeBSD 9.1, where one should
Gabor Pali [Sat, 27 Apr 2013 21:17:01 +0000 (23:17 +0200)] 
Fix linking with binutils 2.22 or later on FreeBSD 9.1, where one should
explicitly link against any dependent library

6 years agoSet DYNAMIC_GHC_PROGRAMS=NO for FreeBSD because $ORIGIN is not resolved
Gabor Pali [Sat, 27 Apr 2013 21:13:12 +0000 (23:13 +0200)] 
Set DYNAMIC_GHC_PROGRAMS=NO for FreeBSD because $ORIGIN is not resolved
properly (see #7819)

6 years agoDon't use getPackageLinkOpts on iOS; fixes #7720.
Ian Lynagh [Sat, 27 Apr 2013 11:45:04 +0000 (12:45 +0100)] 
Don't use getPackageLinkOpts on iOS; fixes #7720.

On iOS, binaries are really static libraries, so we don't want to use
flags like -lm when linking them.

6 years agoFix mismatched visibility of assembler impls of StgRun
Ian Lynagh [Sat, 27 Apr 2013 00:18:01 +0000 (01:18 +0100)] 
Fix mismatched visibility of assembler impls of StgRun

Based on a patch from PHO, in trac #7813.

We were previously declaring StgRun as a private symbol (in
rts/StgRun.h), but were actually defining it as a public one (in
rts/StgCRun.c). This caused a linkage problem with old binutils. See:
http://www.haskell.org/pipermail/ghc-devs/2013-April/000932.html

6 years agoHandle sign bit when generating veneer for ARM Thumb branch relocation
Colin Watson [Mon, 8 Apr 2013 23:02:27 +0000 (00:02 +0100)] 
Handle sign bit when generating veneer for ARM Thumb branch relocation

6 years agoUse -rpath flags on all Elf OSes, not just Linux
Ian Lynagh [Fri, 26 Apr 2013 23:28:31 +0000 (00:28 +0100)] 
Use -rpath flags on all Elf OSes, not just Linux

Patch from pgj; part of #7819.

6 years agoWhen linking with $ORIGIN rpaths, use the "-z origin" linker flag too
Ian Lynagh [Fri, 26 Apr 2013 23:26:06 +0000 (00:26 +0100)] 
When linking with $ORIGIN rpaths, use the "-z origin" linker flag too

On FreeBSD, one needs use "-z origin" in order to enable resolution
of $ORIGIN in RPATH. Part of #7819.

6 years agoUpdate Cabal
Ian Lynagh [Fri, 26 Apr 2013 22:30:27 +0000 (23:30 +0100)] 
Update Cabal

6 years agoRemove extCoreName from DynFlags
Ian Lynagh [Fri, 26 Apr 2013 21:18:45 +0000 (22:18 +0100)] 
Remove extCoreName from DynFlags

We now just pass the filename as an argument

6 years agoWhitespace only in MkExternalCore
Ian Lynagh [Fri, 26 Apr 2013 20:16:11 +0000 (21:16 +0100)] 
Whitespace only in MkExternalCore

6 years agoRemove DynFlags's hscOutName field
Ian Lynagh [Fri, 26 Apr 2013 20:09:46 +0000 (21:09 +0100)] 
Remove DynFlags's hscOutName field

We now just pass the output filename as an argument instead

6 years ago"ghc --info" now claims has "Support dynamic-too" as "YES"
Ian Lynagh [Fri, 26 Apr 2013 18:42:06 +0000 (19:42 +0100)] 
"ghc --info" now claims has "Support dynamic-too" as "YES"

6 years agoFix "-dynamic-too --make"; fixes #7864
Ian Lynagh [Fri, 26 Apr 2013 18:40:36 +0000 (19:40 +0100)] 
Fix "-dynamic-too --make"; fixes #7864

6 years agoWe need to setModLocation in the HscOut phase, not the Hsc phase
Ian Lynagh [Fri, 26 Apr 2013 18:11:43 +0000 (19:11 +0100)] 
We need to setModLocation in the HscOut phase, not the Hsc phase

The output location needs to be different for the vanilla and dynamic
ways when doing -dynamic-too. Fixes dynamicToo003.

6 years agoUpdate Cabal
Ian Lynagh [Fri, 26 Apr 2013 01:07:33 +0000 (02:07 +0100)] 
Update Cabal

6 years agoMark -dynamic-too as unsupported for now
Ian Lynagh [Fri, 26 Apr 2013 00:17:29 +0000 (01:17 +0100)] 
Mark -dynamic-too as unsupported for now

It doesn't work with --make yet. Trac #7864 filed.

6 years agoUpdate the isStaticFlag predicate
Ian Lynagh [Thu, 25 Apr 2013 20:31:34 +0000 (21:31 +0100)] 
Update the isStaticFlag predicate

-fspec-inline-join-points was removed in Jan 2010:
99f41975ae61fc919638aa389199b32742332eff

-fno-hi-version-check was removed in Nov 2003:
98744cef7b82e7eefbb1c6f1d8b9e28c415939c4

-dno-black-holing was removed in Aug 2011:
1c2f89535394958f75cfb15c8c5e0433a20953ed

-fruntime-types was removed in Apr 2008:
8d6bc9bf51829ea04da5f599b84114ef220f0a19

-fhardwire-lib-paths was removed in Jan 2008:
1b98179e0faf8c1ddf79c12827b24d4b7979b83e

6 years agoRemove some old commented-out code in StaticFlags
Ian Lynagh [Thu, 25 Apr 2013 20:27:30 +0000 (21:27 +0100)] 
Remove some old commented-out code in StaticFlags

6 years agoUpdate Cabal
Ian Lynagh [Thu, 25 Apr 2013 20:26:21 +0000 (21:26 +0100)] 
Update Cabal

6 years agoWhitespace only in StaticFlags
Ian Lynagh [Thu, 25 Apr 2013 20:26:07 +0000 (21:26 +0100)] 
Whitespace only in StaticFlags

6 years agoAdd a "Support dynamic-too" field to the --info output
Ian Lynagh [Thu, 25 Apr 2013 19:28:28 +0000 (20:28 +0100)] 
Add a "Support dynamic-too" field to the --info output

This is always "YES".

6 years agoFix the inplace name of ghc-cabal
Ian Lynagh [Thu, 25 Apr 2013 17:54:32 +0000 (18:54 +0100)] 
Fix the inplace name of ghc-cabal

We had inplace/bin/ghc-cabalghc-cabal

6 years agoFixed moer tyops
Gabor Greif [Tue, 23 Apr 2013 09:24:12 +0000 (11:24 +0200)] 
Fixed moer tyops

6 years agoUpdated documentation; changed "group" to "branched" in type families
Richard Eisenberg [Thu, 25 Apr 2013 01:28:43 +0000 (21:28 -0400)] 
Updated documentation; changed "group" to "branched" in type families

6 years agoUpdate Makefile in docs/core-spec not to use latexmk
Richard Eisenberg [Wed, 24 Apr 2013 13:23:58 +0000 (09:23 -0400)] 
Update Makefile in docs/core-spec not to use latexmk

6 years agoAllow deriving Generic for polykinded phantom types
Jose Pedro Magalhaes [Wed, 24 Apr 2013 12:03:55 +0000 (13:03 +0100)] 
Allow deriving Generic for polykinded phantom types

6 years agoIn CMM, only allow foreign calls to labels, not arbitrary expressions
Ian Lynagh [Tue, 23 Apr 2013 19:53:06 +0000 (20:53 +0100)] 
In CMM, only allow foreign calls to labels, not arbitrary expressions

I'm not sure if we want to make this change permanently, but for now it
fixes the unreg build.

I've also removed some redundant special-case code that generated
prototypes for foreign functions. The standard pprTempAndExternDecls
now generates them.

6 years agoSmall refactoring in StgCmmExtCode
Ian Lynagh [Mon, 22 Apr 2013 19:07:28 +0000 (20:07 +0100)] 
Small refactoring in StgCmmExtCode

6 years agoDon't duplicate decls unnecessarily in the environment
Ian Lynagh [Mon, 22 Apr 2013 18:48:06 +0000 (19:48 +0100)] 
Don't duplicate decls unnecessarily in the environment

In loopDecls, as far as I can see the globalDecls will always
already be in the environment, so don't add them again.

6 years agoMake CmmParse abstract
Ian Lynagh [Mon, 22 Apr 2013 17:40:20 +0000 (18:40 +0100)] 
Make CmmParse abstract

6 years agoComments and debug messages only
Simon Peyton Jones [Tue, 23 Apr 2013 08:12:14 +0000 (09:12 +0100)] 
Comments and debug messages only

6 years agoComment typo
Simon Peyton Jones [Mon, 22 Apr 2013 12:47:46 +0000 (13:47 +0100)] 
Comment typo

6 years agoTypo in debug print message
Simon Peyton Jones [Mon, 22 Apr 2013 12:35:37 +0000 (13:35 +0100)] 
Typo in debug print message

6 years agoTypos in comments
Simon Peyton Jones [Mon, 22 Apr 2013 12:35:07 +0000 (13:35 +0100)] 
Typos in comments

6 years agoMore accurate cost attribution for stacks. Fixes #7818.
Edward Z. Yang [Sun, 7 Apr 2013 23:31:44 +0000 (16:31 -0700)] 
More accurate cost attribution for stacks.  Fixes #7818.

Previously, stacks were always attributed to CCCS_SYSTEM.  Now, we
attribute them to the CCS when the stack was allocated.  If a stack
grows, new stack chunks inherit the CCS of the old stack.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoFurther wibbbling to type error message reporting
Simon Peyton Jones [Mon, 22 Apr 2013 11:53:53 +0000 (12:53 +0100)] 
Further wibbbling to type error message reporting

* We now never report derived-constraint type errors, even
  in the "insolubles".  See Note [Insoluble derived constraints]
  in TcRnTypes.

* The cec_suppress mechanism in TcErrors is refactored a bit so that:
   - We suppress *all* errors in unreachable code (they can be jolly
     confusing)
   - We no longer suppress *all* non-insoluble errors if there are *any
     insolubles anywhere.  Instead we are a bit more refined.
  See Note [Suppressing error messages] in TcErrors

6 years agoNever unify a SigTyVar with a non-tyvar type (fixes Trac #7786)
Simon Peyton Jones [Mon, 22 Apr 2013 11:50:24 +0000 (12:50 +0100)] 
Never unify a SigTyVar with a non-tyvar type (fixes Trac #7786)

This unwanted unification was happening in the zonking phase
which un-flattens type-function applications (TcMType.zonkFlats,
try_zonk_fun_eq).  The main unifier is careful to make the check,
but I'd forgotten it here.  That in turn led to a very confusing
error message.

6 years agoWhen zonking, get rid of empty implications
Simon Peyton Jones [Sat, 6 Apr 2013 20:27:11 +0000 (21:27 +0100)] 
When zonking, get rid of empty implications

Zonking can make implications empty becuase it gets rid
of type-function flattening equalities

6 years agoComments only
Simon Peyton Jones [Sat, 6 Apr 2013 20:24:37 +0000 (21:24 +0100)] 
Comments only

6 years agoTiny wibble to trace message
Simon Peyton Jones [Fri, 5 Apr 2013 23:07:10 +0000 (00:07 +0100)] 
Tiny wibble to trace message

6 years agoAdd comments to describe AbsBinds
Simon Peyton Jones [Fri, 5 Apr 2013 23:05:40 +0000 (00:05 +0100)] 
Add comments to describe AbsBinds

6 years agoAdd stg_sel_n_noupd_info symbols to Linker.c
Simon Peyton Jones [Tue, 19 Mar 2013 15:55:31 +0000 (15:55 +0000)] 
Add stg_sel_n_noupd_info symbols to Linker.c

6 years agoUpdate error message text; spotted bu Sergei Trofimovich
Ian Lynagh [Sun, 21 Apr 2013 21:36:54 +0000 (22:36 +0100)] 
Update error message text; spotted bu Sergei Trofimovich

6 years agopass the correct -Dxxx_HOST_ARCH and -Dxxx_HOST_OS to hsc2hs; Fixes #7761.
Ian Lynagh [Sun, 21 Apr 2013 17:19:14 +0000 (18:19 +0100)] 
pass the correct -Dxxx_HOST_ARCH and -Dxxx_HOST_OS to hsc2hs; Fixes #7761.

Patch from Stephen Blackheath.

6 years agoUse a pthread-based implementation of Itimer.c on iOS
Ian Lynagh [Sun, 21 Apr 2013 16:54:57 +0000 (17:54 +0100)] 
Use a pthread-based implementation of Itimer.c on iOS

Patch from Stephen Blackheath.

timer_create doesn't exist and setitimer doesn't fire on iOS, so we're
using a pthreads-based implementation. It may be to do with
interference with the signals of the debugger. Revisit. See #7723.