ghc-hetmet.git
15 years agoBetter documentation for -XLiberalTypeSynonyms, and steal forall keyword
simonpj@microsoft.com [Wed, 27 Aug 2008 15:19:26 +0000 (15:19 +0000)]
Better documentation for -XLiberalTypeSynonyms, and steal forall keyword

In my travels through the front end I discoverd that -XLiberalTypeSynonyms is
rather thinly described.  Furthermore, it alleges that you can write a
forall on the RHS of a type synonym decl, so that means it should enable
the forall keyword.

15 years agore-fix of #1205, fix #2542
Simon Marlow [Wed, 27 Aug 2008 10:24:14 +0000 (10:24 +0000)]
re-fix of #1205, fix #2542
New form of :load in GHCi:

> :load *A

forces A to be loaded as byte-code.  See the manual for details.  The
previous behaviour for specifying filenames vs. module names on the
command line and in :load has been restored.

The Target datatype has a new Bool field, which is True if the target
is allowed to be loaded from compiled code, or False otherwise, so
this functionality is available via the GHC API.  guessTarget
understands the *-prefix form for specifying targets.

15 years agoImprove documentation of MagicHash and primitive types generally (Trac #2547)
simonpj@microsoft.com [Wed, 27 Aug 2008 09:05:44 +0000 (09:05 +0000)]
Improve documentation of MagicHash and primitive types generally (Trac #2547)

15 years agoGive locations of flag warnings/errors
Ian Lynagh [Tue, 26 Aug 2008 18:56:41 +0000 (18:56 +0000)]
Give locations of flag warnings/errors

15 years agoRemove a now-redundant comment
Ian Lynagh [Tue, 26 Aug 2008 18:26:29 +0000 (18:26 +0000)]
Remove a now-redundant comment

15 years agoSeparate the static flag parser from the static global variables
Ian Lynagh [Tue, 26 Aug 2008 15:56:12 +0000 (15:56 +0000)]
Separate the static flag parser from the static global variables
This allows us to avoid a module import loop:
CmdLineParser -> SrcLoc -> Outputable -> StaticFlags -> CmdLineParser

15 years agoMove pprFastFilePath from SrcLoc to Outputable
Ian Lynagh [Tue, 26 Aug 2008 14:44:52 +0000 (14:44 +0000)]
Move pprFastFilePath from SrcLoc to Outputable

15 years agoFix flaggery for RULES (cf Trac #2497)
simonpj@microsoft.com [Tue, 26 Aug 2008 12:21:21 +0000 (12:21 +0000)]
Fix flaggery for RULES (cf Trac #2497)

This patch executes the plan described in the discussion in Trac #2497.
Specficially:

    * Inside a RULE, switch on the forall-as-keyword in the lexer,
      unconditionally. (Actually this is done by an earlier patch.)

    * Merge the -XScopedTypeVariables and -XPatternSignatures flags,
      and deprecate the latter. Distinguishing them isn't senseless,
      but it's jolly confusing.

    * Inside a RULE, switch on -XScopedTypeVariables unconditionally.

    * Change -frewrite-rules to -fenable-rewrite-rules; deprecate the former.
      Internally the DynFlag is now Opt_EnableRewriteRules.

There's a test in typecheck/should_compile/T2497.hs

15 years agoalways treat 'forall' and '.' as reserved keywords inside RULES pragmas
Simon Marlow [Wed, 20 Aug 2008 13:29:11 +0000 (13:29 +0000)]
always treat 'forall' and '.' as reserved keywords inside RULES pragmas

15 years agoFix a nasty float-in bug
simonpj@microsoft.com [Fri, 22 Aug 2008 13:34:27 +0000 (13:34 +0000)]
Fix a nasty float-in bug

This is a long-standing bug in FloatIn, which I somehow managed to
tickle (it's actually surprisingly hard to provoke which is why
it has not shown up before).

The problem was that we had a specialisation like this:

  let
f_spec = ...
  in let
{-# RULE f Int = f_spec #-}
f = ...
  in
<body>

The 'f_spec' binding was being floated inside the binding for 'f',
which makes the RULE invalid becuase 'f_spec' isn't in scope.

We just need to add the free variables of the RULE in the right
places...

15 years agoMake rule printing wobble less
simonpj@microsoft.com [Thu, 21 Aug 2008 12:31:00 +0000 (12:31 +0000)]
Make rule printing wobble less

a) When generating specialisations, include the types in the name
   of the rule, to avoid having rules with duplicate names.
   (The rule name is used to put rules in canonical order for
   fingerprinting.)

b) In Specialise and SpecConstr use a new function Rules.pprRulesForUser
   to print rules in canonical order.  This reduces unnecessary wobbling
   in test output, notably in T2486

15 years agosyb is now in its own package
Ian Lynagh [Mon, 25 Aug 2008 21:41:24 +0000 (21:41 +0000)]
syb is now in its own package

15 years agoFix "runghc foo" where the program is foo.hs or foo.lhs
Ian Lynagh [Mon, 25 Aug 2008 19:43:52 +0000 (19:43 +0000)]
Fix "runghc foo" where the program is foo.hs or foo.lhs

15 years agoWhen making bindists, check that we know where we are
Ian Lynagh [Mon, 25 Aug 2008 19:09:12 +0000 (19:09 +0000)]
When making bindists, check that we know where we are

15 years agoFix the ghci script; fixes trac #2485
Ian Lynagh [Mon, 25 Aug 2008 18:32:47 +0000 (18:32 +0000)]
Fix the ghci script; fixes trac #2485

15 years agoUpdate .darcs-boring for the new libraries, plus some other odds and ends
Ian Lynagh [Mon, 25 Aug 2008 15:42:49 +0000 (15:42 +0000)]
Update .darcs-boring for the new libraries, plus some other odds and ends

15 years agoRead the packages file in strictly in darcs-all and push-all
Ian Lynagh [Mon, 25 Aug 2008 14:59:08 +0000 (14:59 +0000)]
Read the packages file in strictly in darcs-all and push-all
This fixes a problem where darcs tries to update it while perl has it
open. On Windows this fails. Spotted by Claus Reinke.

15 years agoRemove the InstallShield directory; it is no longer used
Ian Lynagh [Mon, 25 Aug 2008 14:33:56 +0000 (14:33 +0000)]
Remove the InstallShield directory; it is no longer used

15 years agoRemove the now-unused WindowsInstaller directory
Ian Lynagh [Mon, 25 Aug 2008 14:32:14 +0000 (14:32 +0000)]
Remove the now-unused WindowsInstaller directory

15 years agoSet datadir=libdir; fixes trac #2541
Ian Lynagh [Mon, 25 Aug 2008 14:16:53 +0000 (14:16 +0000)]
Set datadir=libdir; fixes trac #2541
GHC needs package.conf and things like unlit to be in the same place

15 years agoGet everything building with base 4 in the HEAD
Ian Lynagh [Mon, 25 Aug 2008 12:09:07 +0000 (12:09 +0000)]
Get everything building with base 4 in the HEAD
Some things were using the base3 compat library.

15 years agoChange references to the old BIN_DIST_TARBALL to the new BIN_DIST_TAR_BZ2
Ian Lynagh [Sun, 24 Aug 2008 23:38:21 +0000 (23:38 +0000)]
Change references to the old BIN_DIST_TARBALL to the new BIN_DIST_TAR_BZ2

15 years agoFix the "have we got all the bootlibs" check
Ian Lynagh [Sun, 24 Aug 2008 17:51:06 +0000 (17:51 +0000)]
Fix the "have we got all the bootlibs" check
The packages file has an extra component (for "darcs" or "git") so we need
to take that into account when grepping.

15 years agoconcurrent, unique, timeout have now been split off from base
Ian Lynagh [Sun, 24 Aug 2008 13:50:52 +0000 (13:50 +0000)]
concurrent, unique, timeout have now been split off from base

15 years agoActually tar up Windows bindists
Ian Lynagh [Sun, 24 Aug 2008 13:50:32 +0000 (13:50 +0000)]
Actually tar up Windows bindists

15 years agogetopt is now split off from base
Ian Lynagh [Sun, 24 Aug 2008 02:01:56 +0000 (02:01 +0000)]
getopt is now split off from base

15 years agost is now split off from base
Ian Lynagh [Sat, 23 Aug 2008 22:29:41 +0000 (22:29 +0000)]
st is now split off from base

15 years agoIgnore install-docs in compiler/Makefile and ghc/Makefile
Ian Lynagh [Thu, 21 Aug 2008 23:13:49 +0000 (23:13 +0000)]
Ignore install-docs in compiler/Makefile and ghc/Makefile

15 years agoFix making bindists
Ian Lynagh [Thu, 21 Aug 2008 22:35:37 +0000 (22:35 +0000)]
Fix making bindists
We were looking for executable things, but not requiring that they were
files. So we were adding lots of directories (and thus their contents)
to the bindists, massively inflating their size.

15 years agomk/cabal.mk now turns on -Wall
Ian Lynagh [Thu, 21 Aug 2008 17:31:02 +0000 (17:31 +0000)]
mk/cabal.mk now turns on -Wall

15 years agoFix warnings in runghc
Ian Lynagh [Thu, 21 Aug 2008 17:30:51 +0000 (17:30 +0000)]
Fix warnings in runghc

15 years agoMake some utils -Wall clean
Ian Lynagh [Thu, 21 Aug 2008 15:39:14 +0000 (15:39 +0000)]
Make some utils -Wall clean

15 years agounix is now warning-free
Ian Lynagh [Thu, 21 Aug 2008 12:01:28 +0000 (12:01 +0000)]
unix is now warning-free

15 years agoFix references to exceptions from the RTS
Ian Lynagh [Thu, 21 Aug 2008 11:06:20 +0000 (11:06 +0000)]
Fix references to exceptions from the RTS
We now need to make sure that they have been toException'd.
Also, the RTS doesn't know about the Deadlock exception any more.

15 years agoIt doesn't look like HSprel.def is used any more
Ian Lynagh [Thu, 21 Aug 2008 10:59:14 +0000 (10:59 +0000)]
It doesn't look like HSprel.def is used any more

15 years agobase (and base3-compat) is no warning-free
Ian Lynagh [Thu, 21 Aug 2008 00:16:08 +0000 (00:16 +0000)]
base (and base3-compat) is no warning-free

15 years agoDon't put symlinks in bindists, but the files they point at instead
Ian Lynagh [Wed, 20 Aug 2008 13:41:41 +0000 (13:41 +0000)]
Don't put symlinks in bindists, but the files they point at instead

15 years agoFix making it possible to build without the NCG
Ian Lynagh [Mon, 18 Aug 2008 20:28:45 +0000 (20:28 +0000)]
Fix making it possible to build without the NCG
If
    GhcWithNativeCodeGen = NO
then we don't build the NCG modules, and we define OMIT_NATIVE_CODEGEN

15 years agoComment fix
Ian Lynagh [Sun, 17 Aug 2008 21:08:51 +0000 (21:08 +0000)]
Comment fix

15 years agoRemove GHC_TOP; we don't actually use it
Ian Lynagh [Sun, 17 Aug 2008 21:02:26 +0000 (21:02 +0000)]
Remove GHC_TOP; we don't actually use it

15 years agoWe need to give make some more clues
Ian Lynagh [Sun, 17 Aug 2008 14:00:05 +0000 (14:00 +0000)]
We need to give make some more clues
Otherwise it can't work out how to make in ghc/ any more.

15 years agoChange how we know whether or not we are validating
Ian Lynagh [Sun, 17 Aug 2008 12:33:11 +0000 (12:33 +0000)]
Change how we know whether or not we are validating
We now set Validating=YES in mk/are-validating.mk rather than on the
commandline. This means that if you build a tree with validate then
just running make in it will use the validate flags.
"make distclean" removes mk/are-validating.mk, putting us back in
standard build mode.

15 years agoDon't clean the multi-stage stuff unless CLEAN_ALL_STAGES is YES
Ian Lynagh [Sun, 17 Aug 2008 12:10:00 +0000 (12:10 +0000)]
Don't clean the multi-stage stuff unless CLEAN_ALL_STAGES is YES

15 years agoWhen making in compiler/, automatically make in ghc/ when we are done
Ian Lynagh [Sun, 17 Aug 2008 11:42:02 +0000 (11:42 +0000)]
When making in compiler/, automatically make in ghc/ when we are done

15 years agoDon't do the stage1 re-linking hack if we have GHC >= 6.9
Ian Lynagh [Sun, 17 Aug 2008 11:41:32 +0000 (11:41 +0000)]
Don't do the stage1 re-linking hack if we have GHC >= 6.9

15 years agoAvoid scary "Package contains no library to register" message in installPackage
Ian Lynagh [Sun, 17 Aug 2008 11:31:28 +0000 (11:31 +0000)]
Avoid scary "Package contains no library to register" message in installPackage
We only call register if we actually have a library to be registered

15 years agoDon't use the cc-options from packages when compiling .hc files
Simon Marlow [Thu, 21 Aug 2008 15:55:49 +0000 (15:55 +0000)]
Don't use the cc-options from packages when compiling .hc files
Now that we don't include any header files in .hc apart from our own,
the cc-options from packages are at best superfluous, so don't pass
them.

We still pass them to .c compilations, although I've just made changes
to Cabal so that cc-options from a .cabal file are not copied into the
InstalledPackageInfo.  Most uses of cc-options in Cabal are clearly
intended to be local to the package, but they were being propagated
everywhere, almost certainly unintentionally.

The way is left open for Cabal to allow packages to specify cc-options
that get propagated in the future, if we find a use case for this.

15 years agoImprove error message when 'forall' is not a keyword
simonpj@microsoft.com [Thu, 21 Aug 2008 12:35:02 +0000 (12:35 +0000)]
Improve error message when 'forall' is not a keyword

15 years agomove directory after Win32/unix
Simon Marlow [Thu, 21 Aug 2008 10:04:36 +0000 (10:04 +0000)]
move directory after Win32/unix

15 years agoFix Haddock comments in TcGenDeriv
simonpj@microsoft.com [Thu, 21 Aug 2008 07:49:24 +0000 (07:49 +0000)]
Fix Haddock comments in TcGenDeriv

15 years agoFix compacting GC on 64-bit machines
Simon Marlow [Wed, 20 Aug 2008 12:54:46 +0000 (12:54 +0000)]
Fix compacting GC on 64-bit machines
Some old experimental change leaked in with the parallel GC patches,
it seems

15 years agoFix Trac #2456: eliminate duplicate bindings when deriving
simonpj@microsoft.com [Wed, 20 Aug 2008 12:07:51 +0000 (12:07 +0000)]
Fix Trac #2456: eliminate duplicate bindings when deriving

Condsider deriving two overlapping Data declarations for the same type
deriving instance Data (T A)
deriving instance Data (T B)

We were getting duplicate bindings for the data-con and tycon auxiliary
bindings for T.  This patch fixes the problem by doing these two decls
the same way as we do con2tag etc.

(Why might you want such instances; see Trac #2456.)

15 years agoElaborate for-all message slightly
simonpj@microsoft.com [Wed, 20 Aug 2008 12:07:28 +0000 (12:07 +0000)]
Elaborate for-all message slightly

15 years agoset $(BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS) automatically based on $(HC)
Simon Marlow [Tue, 19 Aug 2008 10:14:37 +0000 (10:14 +0000)]
set $(BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS) automatically based on $(HC)
This fixes nofib

15 years agoFix Trac #2518: add hs-boot files as an infelicty
simonpj@microsoft.com [Tue, 19 Aug 2008 12:30:16 +0000 (12:30 +0000)]
Fix Trac #2518: add hs-boot files as an infelicty

15 years agouse System.FilePath's isSearchPathSeparator instead of our own
Simon Marlow [Mon, 18 Aug 2008 11:35:55 +0000 (11:35 +0000)]
use System.FilePath's isSearchPathSeparator instead of our own

15 years agoFIX #2521: trailing colon in GHC_PACKAGE_PATH
Simon Marlow [Mon, 18 Aug 2008 11:33:45 +0000 (11:33 +0000)]
FIX #2521: trailing colon in GHC_PACKAGE_PATH
This was broken in the System.FilePath switchover, since filepath's
splitSearchPath doesn't do what we want (it ignores empty
components on Windows, and treats them as "." on Unix).  So we use our
own hand-rolled version, just like GHC.

15 years agoTest for and reject duplicate dependencies (#2330)
Simon Marlow [Mon, 18 Aug 2008 11:24:34 +0000 (11:24 +0000)]
Test for and reject duplicate dependencies (#2330)

15 years agoWhen doing :l, abandon all breakpoints before we unload everything
Ian Lynagh [Sat, 16 Aug 2008 15:21:35 +0000 (15:21 +0000)]
When doing :l, abandon all breakpoints before we unload everything
I'm not 100% sure if this is the right fix, but it seems sensible and
stops break008 segfaulting for me on amd64/Linux.

15 years agoComment fixes; trac #2468
Ian Lynagh [Sat, 16 Aug 2008 13:09:10 +0000 (13:09 +0000)]
Comment fixes; trac #2468

15 years agoStop dph/dph-{par,seq} reconfiguring themselves all the time
Ian Lynagh [Thu, 14 Aug 2008 17:30:13 +0000 (17:30 +0000)]
Stop dph/dph-{par,seq} reconfiguring themselves all the time

15 years agoFollow changes in Cabal
Ian Lynagh [Wed, 13 Aug 2008 21:58:44 +0000 (21:58 +0000)]
Follow changes in Cabal

15 years agoWhen distcleaning in utils/, distclean (rather then merely clean) the utils
Ian Lynagh [Fri, 15 Aug 2008 11:49:39 +0000 (11:49 +0000)]
When distcleaning in utils/, distclean (rather then merely clean) the utils

15 years agoOnly clean utils/pwd/pwd when distcleaning, not when cleaning
Ian Lynagh [Tue, 12 Aug 2008 23:25:44 +0000 (23:25 +0000)]
Only clean utils/pwd/pwd when distcleaning, not when cleaning
Otherwise "make clean" in utils leaves us without a pwd, and lots of bad
things happen.

15 years agoIn cabal.mk, clean is no longer identical to distclean
Ian Lynagh [Tue, 12 Aug 2008 23:24:46 +0000 (23:24 +0000)]
In cabal.mk, clean is no longer identical to distclean
distclean will now also remove files listed in EXTRA_DISTCLEAN

15 years agoImprove -fwarn-orphans documentation (thanks to Tim)
simonpj@microsoft.com [Thu, 14 Aug 2008 15:26:48 +0000 (15:26 +0000)]
Improve -fwarn-orphans documentation (thanks to Tim)

15 years agoFix #2441 (unregister/expose/hide packages in non-first package databases)
Simon Marlow [Thu, 14 Aug 2008 12:53:48 +0000 (12:53 +0000)]
Fix #2441 (unregister/expose/hide packages in non-first package databases)

15 years agoadd --no-user-package-conf
Simon Marlow [Thu, 14 Aug 2008 12:53:12 +0000 (12:53 +0000)]
add --no-user-package-conf

15 years agomove INPLACE_DATA_DIR into mk/config.mk and share it
Simon Marlow [Wed, 13 Aug 2008 14:47:07 +0000 (14:47 +0000)]
move INPLACE_DATA_DIR into mk/config.mk and share it

15 years agoFIX #1963: use Cabal's writeFileAtomic to write the new package.conf
Simon Marlow [Wed, 13 Aug 2008 14:37:38 +0000 (14:37 +0000)]
FIX #1963: use Cabal's writeFileAtomic to write the new package.conf
This depends on #2298 also being fixed, which I'll do shortly

15 years agoFIX #2492: ghc-pkg insists on having HOME environment variable set
Simon Marlow [Wed, 13 Aug 2008 14:34:36 +0000 (14:34 +0000)]
FIX #2492: ghc-pkg insists on having HOME environment variable set

15 years agoFIX #2491 (ghc-pkg unregister should complain about breaking dependent packages)
Simon Marlow [Wed, 13 Aug 2008 14:25:55 +0000 (14:25 +0000)]
FIX #2491 (ghc-pkg unregister should complain about breaking dependent packages)

15 years agoput back -fwarn-depcrecations
Simon Marlow [Tue, 12 Aug 2008 14:16:06 +0000 (14:16 +0000)]
put back -fwarn-depcrecations
It was replaced by -fwarn-warnings-deprecations, but I think we want
to keep it for backwards compatibility.  I'm not sure we want to
deprecate it either...

15 years agoadd special globbing file for Windows to ghc-pkg.cabal
dias@eecs.harvard.edu [Wed, 13 Aug 2008 10:53:06 +0000 (10:53 +0000)]
add special globbing file for Windows to ghc-pkg.cabal

15 years agoImprove error message for deprecated flags (Trac #2513)
simonpj@microsoft.com [Wed, 13 Aug 2008 09:45:06 +0000 (09:45 +0000)]
Improve error message for deprecated flags (Trac #2513)

15 years agoImprove docs for orphan decls (thanks Yitzchak Gale)
simonpj@microsoft.com [Wed, 13 Aug 2008 08:28:28 +0000 (08:28 +0000)]
Improve docs for orphan decls (thanks Yitzchak Gale)

15 years agofix cut-and-pasto
Simon Marlow [Mon, 11 Aug 2008 14:41:58 +0000 (14:41 +0000)]
fix cut-and-pasto

15 years agobuild base3-compat
Simon Marlow [Mon, 11 Aug 2008 14:38:31 +0000 (14:38 +0000)]
build base3-compat

15 years agoDon't warn if 'import Prelude' doesn't import anything
Simon Marlow [Tue, 5 Aug 2008 13:37:02 +0000 (13:37 +0000)]
Don't warn if 'import Prelude' doesn't import anything
... even if Prelude doesn't come from the base package (it might come from
a old backwards-compatible version of base, for example).

15 years agoAdd -XPackageImports, new syntax for package-qualified imports
Simon Marlow [Tue, 5 Aug 2008 13:35:44 +0000 (13:35 +0000)]
Add -XPackageImports, new syntax for package-qualified imports

Now you can say

  import "network" Network.Socket

and get Network.Socket from package "network", even if there are
multiple Network.Socket modules in scope from different packages
and/or the current package.

This is not really intended for general use, it's mainly so that we
can build backwards-compatible versions of packages, where we need to
be able to do

module GHC.Base (module New.GHC.Base) where
import "base" GHC.Base as New.GHC.Base

15 years agoSuppress uniques when (and only when) we have -dsuppress-uniques
simonpj@microsoft.com [Tue, 12 Aug 2008 14:40:28 +0000 (14:40 +0000)]
Suppress uniques when (and only when) we have -dsuppress-uniques

15 years agoget exception names from Control.Exception.Base instead of Control.Exception
Ross Paterson [Tue, 12 Aug 2008 12:20:48 +0000 (12:20 +0000)]
get exception names from Control.Exception.Base instead of Control.Exception

15 years agoFix Trac #2490: sections should be parenthesised
simonpj@microsoft.com [Tue, 12 Aug 2008 08:23:32 +0000 (08:23 +0000)]
Fix Trac #2490: sections should be parenthesised

When I added bang patterns I had to slightly generalise where the
parser would recognise sections.  See Note [Parsing sections] in
parser.y.pp.

I forgot to check that ordinary H98 sections obey the original
rules.  This patch adds the check.

15 years agoRefactoring: define TcRnMonad.failWith and use it in the renamer
simonpj@microsoft.com [Tue, 12 Aug 2008 08:22:55 +0000 (08:22 +0000)]
Refactoring: define TcRnMonad.failWith and use it in the renamer

15 years agoLayout only
simonpj@microsoft.com [Tue, 12 Aug 2008 08:18:22 +0000 (08:18 +0000)]
Layout only

15 years agoUse dph-{seq|par} instead of dph_{seq|par}
Roman Leshchinskiy [Tue, 12 Aug 2008 02:19:39 +0000 (02:19 +0000)]
Use dph-{seq|par} instead of dph_{seq|par}

15 years agoSimplify how we build dph
Ian Lynagh [Sat, 9 Aug 2008 20:38:03 +0000 (20:38 +0000)]
Simplify how we build dph

15 years agoGeneralise libraries/Makefile.local
Ian Lynagh [Sat, 9 Aug 2008 16:18:38 +0000 (16:18 +0000)]
Generalise libraries/Makefile.local
It's now possible to build libraries in, e.g.,
    libraries/foo/bar
rather than just
    libraries/foo

15 years agoThe dph packages still contain warnings
Ian Lynagh [Sat, 9 Aug 2008 16:18:15 +0000 (16:18 +0000)]
The dph packages still contain warnings

15 years agoPrint tidy rules in user style, to avoid gratuitous uniques
simonpj@microsoft.com [Mon, 11 Aug 2008 14:42:57 +0000 (14:42 +0000)]
Print tidy rules in user style, to avoid gratuitous uniques

The uniques that come out in dumpStyle make it harder to compare
output in the testsuite.  And the rules are tidied, so uniques
are not necessary.  If you want the uniques, use -dppr-debug.

15 years agoExport Depth (needed for mkUserStyle); collapse identical PrintUnqualified, QueryQual...
simonpj@microsoft.com [Mon, 11 Aug 2008 14:42:08 +0000 (14:42 +0000)]
Export Depth (needed for mkUserStyle); collapse identical PrintUnqualified, QueryQualifies

15 years agoWhen suppressing uniques, don't print the separating underscore
simonpj@microsoft.com [Mon, 11 Aug 2008 14:41:18 +0000 (14:41 +0000)]
When suppressing uniques, don't print the separating underscore

15 years agoMake -dsuppress-uniques apply regardless of -ppr-debug
simonpj@microsoft.com [Mon, 11 Aug 2008 14:40:32 +0000 (14:40 +0000)]
Make -dsuppress-uniques apply regardless of -ppr-debug

15 years agoFix Trac #2367: selectors for GADTs
simonpj@microsoft.com [Mon, 11 Aug 2008 12:35:26 +0000 (12:35 +0000)]
Fix Trac #2367: selectors for GADTs

The generation of record selectors for GADTs and the like was
pretty screwed up.  This patch fixes it.

Note that Unify.refineType is now used only in the generation of
record seletctors -- but it really does seem to be needed there.

Thanks to Max for finding this bug.

15 years agoMostly fix Trac #2431: make empty case acceptable to (most of) GHC
simonpj@microsoft.com [Mon, 11 Aug 2008 12:31:58 +0000 (12:31 +0000)]
Mostly fix Trac #2431: make empty case acceptable to (most of) GHC

See the comments with Trac #2431.  This patch makes an empty HsCase
acceptable to the renamer onwards.  If you want to accept empty case
in Haskell source there's a little more to do: the ticket lists the
remaining tasks.

15 years agoFix Trac #2412: type synonyms and hs-boot recursion
simonpj@microsoft.com [Mon, 11 Aug 2008 12:25:23 +0000 (12:25 +0000)]
Fix Trac #2412: type synonyms and hs-boot recursion

Max Bolingbroke found this awkward bug, which relates to the way in
which hs-boot files are handled.

   --> HEADS UP: interface file format change: recompile everything!

When we import a type synonym, we want to *refrain* from looking at its
RHS until we've "tied the knot" in the module being compiled.  (Reason:
the type synonym might ultimately loop back to the module being compiled.)
To achieve this goal we need to know the *kind* of the synonym without
looking at its RHS.  And to do that we need its kind recorded in the interface
file.

I slightly refactored the way that the IfaceSyn data constructor
fields work, eliminating the previous tricky re-use of the same field
as either a type or a kind.

See Note [Synonym kind loop] in TcIface

15 years agoFix Trac #2506: infix assert
simonpj@microsoft.com [Mon, 11 Aug 2008 10:50:11 +0000 (10:50 +0000)]
Fix Trac #2506: infix assert

15 years agoUse do-notation
simonpj@microsoft.com [Mon, 11 Aug 2008 10:49:49 +0000 (10:49 +0000)]
Use do-notation

15 years agoFix Trac #2494: tcSimplifyRuleLhs
simonpj@microsoft.com [Mon, 11 Aug 2008 10:44:38 +0000 (10:44 +0000)]
Fix Trac #2494: tcSimplifyRuleLhs

tcSimplifyRuleLhs is a cut-down constraint simplifier, intended for
use in RULE left-hand-sides.  But it was written before implication
constraints, and the exmaple of this bug report shows that when higher
rank types are involved we need to be a bit cleverer.

The whole business of simplifying constraints on rule LHSs is a bit
of a hack; but for a good reason.  See the comments with tcSimplifyRuleLhs.
This patch at least cures the crash.

15 years agoMake comparison on equalities work right (ie look at the types)
simonpj@microsoft.com [Mon, 11 Aug 2008 10:40:11 +0000 (10:40 +0000)]
Make comparison on equalities work right (ie look at the types)

This patch makes
(s1~t1) == (s2~t2) iff s1==s2, t1==t2

The comparison and equality instances for Insts are really only
used in making the AvailEnv in TcSimplify, which equalities are
never put into, which is why we've gotten away with this for so long.

But I'm now using 'nub' in the error messages for equalities,
and in any case it makes sense to have the right equality!