ghc-hetmet.git
15 years agoComments only
simonpj@microsoft.com [Tue, 22 Apr 2008 11:52:21 +0000 (11:52 +0000)]
Comments only

15 years agoFix a long-standing bug in FloatOut
simonpj@microsoft.com [Tue, 22 Apr 2008 11:50:03 +0000 (11:50 +0000)]
Fix a long-standing bug in FloatOut

We really should not float anything out of an _inline_me_ Note,
for reasons described in this new comment:
-- Do no floating at all inside INLINE.
-- The SetLevels pass did not clone the bindings, so it's
-- unsafe to do any floating, even if we dump the results
-- inside the Note (which is what we used to do).

I'm about to get rid of these _inline_me_ Notes, but it's
better to fix it anyway.  I found this bug when implementing System IF.

15 years agoRemove static flag opt_RuntimeTypes (has not been used in years)
simonpj@microsoft.com [Tue, 22 Apr 2008 11:48:48 +0000 (11:48 +0000)]
Remove static flag opt_RuntimeTypes (has not been used in years)

15 years agoRefactor the TyVarTy case of 'match'. No change in behaviour.
simonpj@microsoft.com [Tue, 22 Apr 2008 11:30:14 +0000 (11:30 +0000)]
Refactor the TyVarTy case of 'match'.  No change in behaviour.

15 years agoAdd Note [Generating the in-scope set for a substitution]
simonpj@microsoft.com [Tue, 22 Apr 2008 11:29:25 +0000 (11:29 +0000)]
Add Note [Generating the in-scope set for a substitution]

15 years agoRename WpCo to WpCast
simonpj@microsoft.com [Tue, 22 Apr 2008 11:28:04 +0000 (11:28 +0000)]
Rename WpCo to WpCast

16 years agoFix #2044 (:printing impredicatively typed things)
pepe [Mon, 21 Apr 2008 17:13:22 +0000 (17:13 +0000)]
Fix #2044 (:printing impredicatively typed things)

Switching to boxyUnify should be enough to fix this.

16 years agoImprove External Core syntax for newtypes
Tim Chevalier [Tue, 22 Apr 2008 04:52:44 +0000 (04:52 +0000)]
Improve External Core syntax for newtypes

I was confused by the newtype eta-contraction trick before.
Newtype declarations are much less redundant now.

16 years agoUpdate External Core docs
Tim Chevalier [Tue, 22 Apr 2008 04:43:42 +0000 (04:43 +0000)]
Update External Core docs

Update documentation to reflect GHC HEAD.

16 years agoExternal Core typechecker - improve handling of coercions
Tim Chevalier [Tue, 22 Apr 2008 01:56:22 +0000 (01:56 +0000)]
External Core typechecker - improve handling of coercions

Reorganized coercion-related code in the typechecker (this was
brought about by typechecking the Core versions of the optimized GHC
libraries.) A few miscellaneous changes (fixed a bug in Prep involving
eta-expanding partial applications that had additional type
arguments.)

16 years agoNaming changes in External Core
Tim Chevalier [Tue, 22 Apr 2008 01:27:34 +0000 (01:27 +0000)]
Naming changes in External Core

Two changes:
- Top-level bindings in a given module are now printed as a
  single %rec group. I found that in External Core generated from
  optimized code, nonrec bindings weren't being printed in
  dependency order. Rather than fixing that, I decided to not
  even pretend to preserve dependency order (since there's
  recursion between modules anyway.)

- Internal names are now printed with their uniques attached
  (otherwise, GHC was printing out code with shadowed bindings,
  and this isn't supposed to happen in External Core.)

16 years agoAdd clarifying comments about unsafeCoerce
simonpj@microsoft.com [Mon, 21 Apr 2008 15:21:30 +0000 (15:21 +0000)]
Add clarifying comments about unsafeCoerce

16 years agoMake the integer library to use more configurable
Ian Lynagh [Sun, 20 Apr 2008 19:58:56 +0000 (19:58 +0000)]
Make the integer library to use more configurable
Now you just set INTEGER_LIBRARY=integer-foo in build.mk

16 years agoRemove some duplicate extern decls
Ian Lynagh [Wed, 16 Apr 2008 16:23:30 +0000 (16:23 +0000)]
Remove some duplicate extern decls

16 years agoAdd some more generic (en|de)code(Double|Float) code
Ian Lynagh [Thu, 17 Apr 2008 17:19:43 +0000 (17:19 +0000)]
Add some more generic (en|de)code(Double|Float) code

16 years agoUpdates to handle Ordering moving from base to ghc-prim
Ian Lynagh [Sat, 12 Apr 2008 10:06:57 +0000 (10:06 +0000)]
Updates to handle Ordering moving from base to ghc-prim

16 years agoFix lndir
Ian Lynagh [Tue, 8 Apr 2008 19:34:36 +0000 (19:34 +0000)]
Fix lndir
It would copy when it should symlink, and vice-versa.

16 years agoImprove External Core syntax
Tim Chevalier [Wed, 16 Apr 2008 00:03:47 +0000 (00:03 +0000)]
Improve External Core syntax

Got rid of the silly '^' characters before qualified names (plus:
reverts to the original syntax; minus: makes the parser a little
hairier.)

Also, added warning in the typechecker for coercion kind mismatches
rather than considering that a type error. (see the added comment in
Check.hs for details.)

16 years agoFIX BUILD (Windows): Copy the ln trick used by the GMP build
Simon Marlow [Mon, 14 Apr 2008 17:32:25 +0000 (17:32 +0000)]
FIX BUILD (Windows): Copy the ln trick used by the GMP build

16 years agoRevive the static argument transformation
simonpj@microsoft.com [Fri, 11 Apr 2008 16:21:37 +0000 (16:21 +0000)]
Revive the static argument transformation

This patch revives the Static Argument Transformation, thanks to
Max Bolingbroke.  It is enabled with
-fstatic-argument-transformation
or -O2

Headline nofib results

                  Size    Allocs   Runtime
Min             +0.0%    -13.7%    -21.4%
Max             +0.1%     +0.0%     +5.4%
Geometric Mean  +0.0%     -0.2%     -6.9%

16 years agoTransfer strictness and arity info when abstracting over type variables
simonpj@microsoft.com [Fri, 11 Apr 2008 14:24:18 +0000 (14:24 +0000)]
Transfer strictness and arity info when abstracting over type variables

See Note [transferPolyIdInfo] in Id.lhs, and test
eyeball/demand-on-polymorphic-floatouts.hs

Max Bolingbroke discovered that we were gratuitiously losing strictness
info.  This simple patch fixes it.  But see the above note for things
that are still discarded: worker info and rules.

16 years agoRevive External Core typechecker
Tim Chevalier [Mon, 14 Apr 2008 02:46:48 +0000 (02:46 +0000)]
Revive External Core typechecker

The typechecker works again! Yay!

Details upon request.

16 years agoEta-expand newtype coercions in External Core
Tim Chevalier [Mon, 14 Apr 2008 03:16:54 +0000 (03:16 +0000)]
Eta-expand newtype coercions in External Core

Typechecking External Core is easier if we eta-expand axioms
in newtype declarations. For a fuller explanation, see:
http://www.haskell.org/pipermail/cvs-ghc/2008-April/041948.html

16 years agoExtra info in genprimopcode --make-ext-core-source
Tim Chevalier [Mon, 14 Apr 2008 02:54:07 +0000 (02:54 +0000)]
Extra info in genprimopcode --make-ext-core-source

The ext-core typechecker needs to know what types are
valid for various kinds of literals, so I changed
genprimopcode to dump out that information as well
with --make-ext-core-source.

16 years agoFixing HPCTIXDIR problem with mkdir usage on Windows
andy@galois.com [Fri, 11 Apr 2008 22:05:10 +0000 (22:05 +0000)]
Fixing HPCTIXDIR problem with mkdir usage on Windows

16 years agoUpdate .darcs-boring with utils/ext-core stuff
Tim Chevalier [Fri, 11 Apr 2008 18:57:34 +0000 (18:57 +0000)]
Update .darcs-boring with utils/ext-core stuff

16 years agoFIX #2197: an update frame might point to an IND_OLDGEN
Simon Marlow [Fri, 11 Apr 2008 17:34:04 +0000 (17:34 +0000)]
FIX #2197: an update frame might point to an IND_OLDGEN

16 years agoRejig error reporting in the unifier slightly
simonpj@microsoft.com [Fri, 11 Apr 2008 13:23:50 +0000 (13:23 +0000)]
Rejig error reporting in the unifier slightly

16 years agoImprove error message layout slightly
simonpj@microsoft.com [Thu, 10 Apr 2008 11:31:05 +0000 (11:31 +0000)]
Improve error message layout slightly

16 years agoTwo improvements to boxy matching
simonpj@microsoft.com [Thu, 10 Apr 2008 11:28:12 +0000 (11:28 +0000)]
Two improvements to boxy matching

I can't quite remember what provoked these two changes, but they are in my
tree.
One improves boxy_match (which failed unnecessarily)
One fixes boxy_lub (which was assymetrical)

16 years agoFix Trac #2206: ensure the return type is rigid in a GADT match
simonpj@microsoft.com [Thu, 10 Apr 2008 11:15:14 +0000 (11:15 +0000)]
Fix Trac #2206: ensure the return type is rigid in a GADT match

16 years agoFix Trac #2205, which I introduced recently
simonpj@microsoft.com [Thu, 10 Apr 2008 09:43:36 +0000 (09:43 +0000)]
Fix Trac #2205, which I introduced recently

16 years agoEnsure that arity is accurate in back end
simonpj@microsoft.com [Thu, 10 Apr 2008 08:49:30 +0000 (08:49 +0000)]
Ensure that arity is accurate in back end

See Note [exprArity invariant] in CoreUtils.  In code generated by Happy
I was seeing this after TidyPgm and CorePrep

f :: Any
f {arity 1} = id `cast` unsafe-co

So f claimed to have arity 1 (because exprArity looked inside), but
did not have any top-level lambdas (because its type is Any).

This triggered a slightly-obscure ASSERT failure in CoreToStg

This patch
- makes exprArity trim the arity if the type is not a function
- adds a stronger ASSERT in TidyPgm

It's not the only way to solve this problem (see Note [exprArity invariant])
but it's enough for now.

16 years agoMake the arity and strictness agree, for wired-in bottoming Ids
simonpj@microsoft.com [Thu, 10 Apr 2008 08:26:19 +0000 (08:26 +0000)]
Make the arity and strictness agree, for wired-in bottoming Ids

16 years agoFix bug in vectorisation of case expressions
Roman Leshchinskiy [Fri, 11 Apr 2008 04:53:07 +0000 (04:53 +0000)]
Fix bug in vectorisation of case expressions

16 years agoExtend genprimopcode to print primop types for ext-core
Tim Chevalier [Thu, 10 Apr 2008 18:58:10 +0000 (18:58 +0000)]
Extend genprimopcode to print primop types for ext-core

I added a new flag, --make-ext-core-source, to genprimopcode. It prints out the
type information for primops that the External Core typechecker needs. This
replaces the old mechanism where the ext-core tools had a hard-wired Prims
module that could get out of sync with the old primops.txt. Now, that won't happen.

16 years agoadd pointers to the wiki for the rules about C prototypes
Simon Marlow [Wed, 9 Apr 2008 20:41:43 +0000 (20:41 +0000)]
add pointers to the wiki for the rules about C prototypes

16 years agoavoid warnings from ffi.h when UseLibFFIForAdjustors=YES
Simon Marlow [Wed, 9 Apr 2008 20:40:48 +0000 (20:40 +0000)]
avoid warnings from ffi.h when UseLibFFIForAdjustors=YES

16 years agoFIX BUILD (bootstrap with -fvia-C): prototype fixes
Simon Marlow [Wed, 9 Apr 2008 20:37:24 +0000 (20:37 +0000)]
FIX BUILD (bootstrap with -fvia-C): prototype fixes

16 years agoAnother round of External Core fixes
Tim Chevalier [Thu, 10 Apr 2008 04:37:27 +0000 (04:37 +0000)]
Another round of External Core fixes

With this patch, GHC should now be printing External Core in a format
that a stand-alone program can parse and typecheck. Major bug fixes:

- The printer now handles qualified/unqualified declarations correctly
   (particularly data constructor declarations)
- It prints newtype declarations with enough information to
  typecheck code that uses the induced coercions (this required a
syntax change)
- It expands type synonyms correctly

Documentation and external tool patches will follow.

16 years agoAdding environment variable HPCTIXDIR, a directory to place tix results.
andy@galois.com [Tue, 8 Apr 2008 23:24:50 +0000 (23:24 +0000)]
Adding environment variable HPCTIXDIR, a directory to place tix results.

16 years agoFixing hpc combine and hpc map to use the correct help message
andy@galois.com [Tue, 8 Apr 2008 23:20:32 +0000 (23:20 +0000)]
Fixing hpc combine and hpc map to use the correct help message

16 years agoImport libffi-3.0.4, and use it to provide FFI support in GHCi
Simon Marlow [Tue, 8 Apr 2008 18:34:34 +0000 (18:34 +0000)]
Import libffi-3.0.4, and use it to provide FFI support in GHCi

This replaces the hand-rolled architecture-specific FFI support in
GHCi with the standard libffi as used in GCJ, Python and other
projects.  I've bundled the complete libffi-3.0.4 tarball in the
source tree in the same way as we do for GMP, the difference being
that we always build and install our own libffi regardless of whether
there's one on the system (it's small, and we don't want
dependency/versioning headaches).

In particular this means that unregisterised builds will now have a
fully working GHCi including FFI out of the box, provided libffi
supports the platform.

There is also code in the RTS to use libffi in place of
rts/Adjustor.c, but it is currently not enabled if we already have
support in Adjustor.c for the current platform.  We need to assess the
performance impact before using libffi here too (in GHCi we don't care
too much about performance).

16 years agoFIX BUILD on non-x86: add missing prototypes
Simon Marlow [Mon, 7 Apr 2008 21:37:48 +0000 (21:37 +0000)]
FIX BUILD on non-x86: add missing prototypes

16 years agoupdate a comment
Simon Marlow [Mon, 7 Apr 2008 21:24:37 +0000 (21:24 +0000)]
update a comment

16 years agoremove dead code
Simon Marlow [Thu, 3 Apr 2008 22:34:22 +0000 (22:34 +0000)]
remove dead code

16 years agoReplace one occurance of CVS with darcs in HACKING
Samuel Bronson [Mon, 7 Apr 2008 22:20:06 +0000 (22:20 +0000)]
Replace one occurance of CVS with darcs in HACKING

16 years agoRemove GADT refinements, part 5
Manuel M T Chakravarty [Mon, 7 Apr 2008 07:07:28 +0000 (07:07 +0000)]
Remove GADT refinements, part 5
- TcGadt RIP
- The non-side effecting unification code is now in types/Unify.lhs
  along with the refinement code needed for GADT record selectors.

16 years agoRemove GADT refinements, part 4
Manuel M T Chakravarty [Mon, 3 Mar 2008 06:33:47 +0000 (06:33 +0000)]
Remove GADT refinements, part 4
- MkId.mkRecordSelId only used a special case of refineGadt, which doesn't
  need full unification.  That special case is now implemented as
  TcGadt.matchRefine and TcGadt.refineGadt can finally go.

16 years agoImprove error message for malformed LANGUAGE pragma
Tim Chevalier [Sun, 6 Apr 2008 20:23:33 +0000 (20:23 +0000)]
Improve error message for malformed LANGUAGE pragma

I made the error (which previously said "cannot parse LANGUAGE
pragma") slightly more helpful by reminding the user that pragmas
should be comma-separated.

16 years agoImprove error message for non-matching file name
Tim Chevalier [Sun, 6 Apr 2008 19:38:21 +0000 (19:38 +0000)]
Improve error message for non-matching file name

I changed the "File name does not match module name" error message so
that it prints out both the declared module name and the expected
module name (before, it was only printing the declared module name.)

16 years agoVirtualize the cwd in GHCi
Pepe Iborra [Sat, 5 Apr 2008 14:51:36 +0000 (14:51 +0000)]
Virtualize the cwd in GHCi

This fixes the issue where :list would stop working if the
program being debugged side-effected the working directory,
and should prevent other similar issues

16 years agoFix rendering of references in :print under -fprint-evld-with-show flag
Pepe Iborra [Wed, 19 Dec 2007 17:44:31 +0000 (17:44 +0000)]
Fix rendering of references in :print under -fprint-evld-with-show flag

16 years agoFix Trac #2188: scoping in TH declarations quotes
simonpj@microsoft.com [Fri, 4 Apr 2008 20:55:56 +0000 (20:55 +0000)]
Fix Trac #2188: scoping in TH declarations quotes

This patch fixes a rather tiresome issue, namely the fact that
a TH declaration quote *shadows* bindings in outer scopes:

  f g = [d| f :: Int
            f = g
       g :: Int
            g = 4 |]

Here, the outer bindings for 'f' (top-level) and 'g' (local)
are shadowed, and the inner bindings for f,g should not be
reported as duplicates.  (Remember they are top-level bindings.)

The actual bug was that we'd forgotten to delete 'g' from the
LocalRdrEnv, so the type sig for 'g' was binding to the outer
'g' not the inner one.

16 years agoFix simplifier thrashing
simonpj@microsoft.com [Thu, 3 Apr 2008 22:38:19 +0000 (22:38 +0000)]
Fix simplifier thrashing

Another example of the simplifier thrashing, getting nowhere.
See SimplUtils, Note [Unsaturated functions]

There's a test at eyeball/inline4.hs

16 years agoFix Trac #2179: error message for main
simonpj@microsoft.com [Thu, 3 Apr 2008 17:37:46 +0000 (17:37 +0000)]
Fix Trac #2179: error message for main

A short-cut to generate the (runMainIO main) wrapper turned out
to make a bad error message.  This should fix it.

16 years agoFix Trac #2136: reporting of unused variables
simonpj@microsoft.com [Thu, 3 Apr 2008 11:02:50 +0000 (11:02 +0000)]
Fix Trac #2136: reporting of unused variables

There's a bit of a hack RnBinds.rnValBindsAndThen, documented
in Note [Unused binding hack].  But the hack was over brutal
before, and produced unnecssarily bad (absence of) warnings.
This patch does a bit of refactoring; and fixes the bug in
rnValBindsAndThen.

16 years agoFix Trac #2137: report correct location for shadowed binding
simonpj@microsoft.com [Wed, 2 Apr 2008 15:34:10 +0000 (15:34 +0000)]
Fix Trac #2137: report correct location for shadowed binding

The error message generation for a shadowed binding was
plain wrong, at least where the shadowed binding isn't
top-level.  Just a typo really -- the fix is trivial.

16 years agoFix Trac #2141: invalid record update
simonpj@microsoft.com [Wed, 2 Apr 2008 13:20:57 +0000 (13:20 +0000)]
Fix Trac #2141: invalid record update

See Note [Record field lookup] in TcEnv.  The fix here
is quite straightforward.

16 years agoDo not #include external header files when compiling via C
Simon Marlow [Wed, 2 Apr 2008 05:14:12 +0000 (05:14 +0000)]
Do not #include external header files when compiling via C

This has several advantages:

 - -fvia-C is consistent with -fasm with respect to FFI declarations:
   both bind to the ABI, not the API.

 - foreign calls can now be inlined freely across module boundaries, since
   a header file is not required when compiling the call.

 - bootstrapping via C will be more reliable, because this difference
   in behavour between the two backends has been removed.

There is one disadvantage:

 - we get no checking by the C compiler that the FFI declaration
   is correct.

So now, the c-includes field in a .cabal file is always ignored by
GHC, as are header files specified in an FFI declaration.  This was
previously the case only for -fasm compilations, now it is also the
case for -fvia-C too.

16 years agoDerive a valid Ix instance for data Foo = Foo Int Int
Ian Lynagh [Sun, 30 Mar 2008 18:28:13 +0000 (18:28 +0000)]
Derive a valid Ix instance for data Foo = Foo Int Int
The old one didn't satisfy the axioms. See trac #2158 for details.

16 years agoRevive External Core parser
Tim Chevalier [Sat, 29 Mar 2008 22:39:48 +0000 (22:39 +0000)]
Revive External Core parser

Huzzah, the External Core parser will now parse External Core generated by
the HEAD.

Most notably, I rewrote the parser in Parsec, but the old Happy version
remains in the repository.

I checked all the nofib benchmarks and most of the ghc-prim, base and integer
libraries to make sure they parsed; one known bug:
  - Strings like "\x0aE", in which a hex escape code is followed by a
    letter that could be a hex digit, aren't handled properly. I'm
    investigating whether this is a bug in Parsec or expected behavior.

The checker and interpreter still don't work, but should compile.

Please mess around with the parser, report bugs, improve my code, etc.,
if you're so inclined.

16 years agoFix big character literal printing in External Core
Tim Chevalier [Sat, 29 Mar 2008 22:11:09 +0000 (22:11 +0000)]
Fix big character literal printing in External Core

Characters bigger than '\xff' should be represented as int
literals in External Core. (This was originally fixed five years ago
and broken again four and a half years ago...)

16 years agoExternal Core: don't print superfluous parens in case types
Tim Chevalier [Sat, 29 Mar 2008 19:46:29 +0000 (19:46 +0000)]
External Core: don't print superfluous parens in case types

The External Core printer was parenthesizing the scrutinee type in case expressions. Since this type is required to be atomic, the parens aren't necessary.

16 years agoDon't import FastString in HsVersions.h
Ian Lynagh [Sat, 29 Mar 2008 18:50:43 +0000 (18:50 +0000)]
Don't import FastString in HsVersions.h
Modules that need it import it themselves instead.

16 years agoDEBUG removal
Ian Lynagh [Sat, 29 Mar 2008 17:11:35 +0000 (17:11 +0000)]
DEBUG removal

16 years agoDEBUG removal
Ian Lynagh [Sat, 29 Mar 2008 17:10:13 +0000 (17:10 +0000)]
DEBUG removal

16 years agoDEBUG removal
Ian Lynagh [Sat, 29 Mar 2008 17:09:35 +0000 (17:09 +0000)]
DEBUG removal

16 years agoDEBUG removal
Ian Lynagh [Sat, 29 Mar 2008 17:03:41 +0000 (17:03 +0000)]
DEBUG removal

16 years agoDEBUG removal
Ian Lynagh [Sat, 29 Mar 2008 17:02:27 +0000 (17:02 +0000)]
DEBUG removal

16 years agoDEBUG removal
Ian Lynagh [Sat, 29 Mar 2008 16:54:12 +0000 (16:54 +0000)]
DEBUG removal

16 years agoFix typo; spotted by Bdh in #ghc
Ian Lynagh [Sat, 29 Mar 2008 16:53:03 +0000 (16:53 +0000)]
Fix typo; spotted by Bdh in #ghc

16 years agoDEBUG removal
Ian Lynagh [Sat, 29 Mar 2008 16:48:49 +0000 (16:48 +0000)]
DEBUG removal

16 years agoDEBUG removal
Ian Lynagh [Sat, 29 Mar 2008 16:44:20 +0000 (16:44 +0000)]
DEBUG removal

16 years agoRemove a DEBUG use
Ian Lynagh [Sat, 29 Mar 2008 16:42:09 +0000 (16:42 +0000)]
Remove a DEBUG use

16 years agoRemove a DEBUG
Ian Lynagh [Sat, 29 Mar 2008 16:39:36 +0000 (16:39 +0000)]
Remove a DEBUG

16 years agoRemove more #ifdef DEBUGs
Ian Lynagh [Sat, 29 Mar 2008 14:57:16 +0000 (14:57 +0000)]
Remove more #ifdef DEBUGs

16 years agoRemove an #ifdef DEBUG
Ian Lynagh [Sat, 29 Mar 2008 14:55:08 +0000 (14:55 +0000)]
Remove an #ifdef DEBUG

16 years agoRemove an #ifdef DEBUG
Ian Lynagh [Sat, 29 Mar 2008 14:52:44 +0000 (14:52 +0000)]
Remove an #ifdef DEBUG

16 years agoRemove an #ifdef DEBUG
Ian Lynagh [Sat, 29 Mar 2008 14:48:44 +0000 (14:48 +0000)]
Remove an #ifdef DEBUG

16 years agoRemove a #ifdef DEBUG
Ian Lynagh [Sat, 29 Mar 2008 14:46:58 +0000 (14:46 +0000)]
Remove a #ifdef DEBUG

16 years agoRemove an #ifdef DEBUG
Ian Lynagh [Sat, 29 Mar 2008 14:45:44 +0000 (14:45 +0000)]
Remove an #ifdef DEBUG

16 years agoRemove some redundant code
Ian Lynagh [Sat, 29 Mar 2008 14:42:26 +0000 (14:42 +0000)]
Remove some redundant code

16 years agoprelude/PrimOp is now mostly warning-free
Ian Lynagh [Sat, 29 Mar 2008 14:39:14 +0000 (14:39 +0000)]
prelude/PrimOp is now mostly warning-free
commutableOp seems to be unused, so we're no 100% there yet.

16 years agoFix warnings from primops.txt.pp
Ian Lynagh [Sat, 29 Mar 2008 14:26:37 +0000 (14:26 +0000)]
Fix warnings from primops.txt.pp

16 years agoUse _ rather than "other" in generated code
Ian Lynagh [Sat, 29 Mar 2008 14:25:08 +0000 (14:25 +0000)]
Use _ rather than "other" in generated code

16 years agoFix some warnings
Ian Lynagh [Sat, 29 Mar 2008 14:22:19 +0000 (14:22 +0000)]
Fix some warnings

16 years agoRemove some redundant imports
Ian Lynagh [Sat, 29 Mar 2008 14:18:09 +0000 (14:18 +0000)]
Remove some redundant imports

16 years agoRemove an #ifdef DEBUG
Ian Lynagh [Sat, 29 Mar 2008 14:17:33 +0000 (14:17 +0000)]
Remove an #ifdef DEBUG

16 years agoRemove an #ifdef DEBUG
Ian Lynagh [Sat, 29 Mar 2008 14:16:29 +0000 (14:16 +0000)]
Remove an #ifdef DEBUG

16 years agoRemove some unnecessary imports
Ian Lynagh [Sat, 29 Mar 2008 14:11:45 +0000 (14:11 +0000)]
Remove some unnecessary imports

16 years agoRemove an unnecessary #ifdef DEBUG
Ian Lynagh [Sat, 29 Mar 2008 14:10:47 +0000 (14:10 +0000)]
Remove an unnecessary #ifdef DEBUG

16 years agoAnother debugIsOn use
Ian Lynagh [Sat, 29 Mar 2008 14:01:26 +0000 (14:01 +0000)]
Another debugIsOn use

16 years agoConvert some DEBUG uses to debugIsOn
Ian Lynagh [Sat, 29 Mar 2008 13:59:50 +0000 (13:59 +0000)]
Convert some DEBUG uses to debugIsOn

16 years agoPut debugIsOn in Util, rather than rely on it being CPPed in
Ian Lynagh [Sat, 29 Mar 2008 13:57:55 +0000 (13:57 +0000)]
Put debugIsOn in Util, rather than rely on it being CPPed in

16 years agoExternal Core: print function types correctly, improve newtype pretty-printing
Tim Chevalier [Fri, 28 Mar 2008 22:26:30 +0000 (22:26 +0000)]
External Core: print function types correctly, improve newtype pretty-printing

- In a previous patch I broke the printing of fully-applied arrow
types (e.g., "a -> b" was "(ghczmprim:GHCziPrim a b)") by z-encoding
package names and not updating the primitive module name as defined in
External Core accordingly. Fixed. (Mega sigh...)

- Make newtype decls print slightly more readably.

16 years agoPrint out rational literals correctly in External Core
Tim Chevalier [Fri, 28 Mar 2008 21:19:19 +0000 (21:19 +0000)]
Print out rational literals correctly in External Core

The External Core printer was printing out rational literals of the
form:
2.0e-2
when the External Core grammar doesn't allow this. (This
bug has apparently been there since the beginning...)

It's now printing rationals in the same form that (show (r::Rational))
does. This requires a parser change as well (soon to come.)

16 years agoChange syntax for qualified names in External Core
Tim Chevalier [Thu, 27 Mar 2008 18:54:36 +0000 (18:54 +0000)]
Change syntax for qualified names in External Core

Two changes that make the ext-core code uglier but the parser easier:

- Prefix qualified names with "^" so that we can more easily
distinguish a qualified name:
   ^a:Foo.Bar.quux
from an unqualified name:
   a

- z-encode package names ("ghc-prim" was the culprit.)

16 years agoMake use of the SDoc type synonym
Ian Lynagh [Wed, 26 Mar 2008 17:53:06 +0000 (17:53 +0000)]
Make use of the SDoc type synonym

16 years agoFix warnings in rename/RnTypes
Ian Lynagh [Wed, 26 Mar 2008 17:46:57 +0000 (17:46 +0000)]
Fix warnings in rename/RnTypes