ghc-hetmet.git
16 years agoThis goes with the patch for #1839, #1463
Simon Marlow [Tue, 22 Jan 2008 16:18:11 +0000 (16:18 +0000)]
This goes with the patch for #1839, #1463

16 years agouse pathSeparator instead of '/'
Simon Marlow [Tue, 22 Jan 2008 14:09:57 +0000 (14:09 +0000)]
use pathSeparator instead of '/'

16 years agocleanup only
Simon Marlow [Tue, 22 Jan 2008 13:20:47 +0000 (13:20 +0000)]
cleanup only

16 years agoFIX #1839, #1463, by supporting ghc-pkg bulk queries with substring matching
claus.reinke@talk21.com [Mon, 21 Jan 2008 16:17:44 +0000 (16:17 +0000)]
FIX #1839, #1463, by supporting ghc-pkg bulk queries with substring matching

   - #1839 asks for a ghc-pkg dump feature, #1463 for the ability
     to query the same fields in several packages at once.

   - this patch enables substring matching for packages in 'list',
     'describe', and 'field', and for modules in find-module. it
     also allows for comma-separated multiple fields in 'field'.
     substring matching can optionally ignore cases to avoid the
     rather unpredictable capitalisation of packages.

   - the patch is not quite as full-featured as the one attached
     to #1839, but avoids the additional dependency on regexps.
     open ended substrings are indicated by '*' (only the three
     forms prefix*, *suffix, *infix* are supported)

   - on windows, the use of '*' for package/module name globbing
     leads to conflicts with filename globbing: by default, windows
     programs are self-globbing, and bash adds another level of
     globbing on top of that. it seems impossible to escape '*'
     from both levels of globbing, so we disable default globbing
     for ghc-pkg and ghc-pkg-inplace. users of bash will still
     have filename globbing available, users of cmd won't.

   - if it is considered necessary to reenable filename globbing
     for cmd users, it should be done selectively, only for
     filename parameters. to this end, the patch includes a
     glob.hs program which simply echoes its parameters after
     filename globbing. see the commented out glob command in
     Main.hs for usage or testing.

   - this covers both tickets, and permits for the most common
     query patterns (finding all packages contributing to the
     System. hierarchy, finding all regex or string packages,
     listing all package maintainers or haddock directories,
     ..), which not only i have wanted to have for a long time.

     examples (the quotes are needed to escape shell-based
     filename globbing and should be omitted in cmd.exe):

       ghc-pkg list '*regex*' --ignore-case
       ghc-pkg list '*string*' --ignore-case
       ghc-pkg list '*gl*' --ignore-case
       ghc-pkg find-module 'Data.*'
       ghc-pkg find-module '*Monad*'
       ghc-pkg field '*' name,maintainer
       ghc-pkg field '*' haddock-html
       ghc-pkg describe '*'

16 years agoWibble to the OccurAnal fix for RULEs and loop-breakers
simonpj@microsoft.com [Mon, 21 Jan 2008 16:55:29 +0000 (16:55 +0000)]
Wibble to the OccurAnal fix for RULEs and loop-breakers

16 years agoFIX #2049, another problem with the module context on :reload
Simon Marlow [Mon, 21 Jan 2008 14:59:35 +0000 (14:59 +0000)]
FIX #2049, another problem with the module context on :reload
The previous attempt to fix this (#1873, #1360) left a problem that
occurred when the first :load of the program failed (#2049).

Now I've implemented a different strategy: between :loads, we remember
all the :module commands, and just replay them after a :reload.  This
is in addition to remembering all the package modules added with
:module, which is orthogonal.

This approach is simpler than the previous one, and seems to do the
right thing in all the cases I could think of.  Let's hope this is the
last bug in this series...

16 years agoIncrease the bar for bootstrapping GHC to 6.4 (HEAD only)
Simon Marlow [Mon, 21 Jan 2008 11:18:35 +0000 (11:18 +0000)]
Increase the bar for bootstrapping GHC to 6.4 (HEAD only)
 - remove $(ghc_ge_601), $(ghc_ge_602), $(ghc_ge_603)
 - configure now checks the GHC version number
 - there are probably various cleanups that we can now do in compat/
   and compiler/, but I haven't done those yet.

16 years agoDo not worker/wrapper INLINE things, even if they are in a recursive group
simonpj@microsoft.com [Mon, 21 Jan 2008 13:59:09 +0000 (13:59 +0000)]
Do not worker/wrapper INLINE things, even if they are in a recursive group

This patch stops the worker/wrapper transform working on an INLINE thing,
even if it's in a recursive group.  It might not be the loop breaker.  Indeed
a recursive group might have no loop breaker, if the only recursion is
through rules.

Again, this change was provoked by one of Roman's NDP libraries.
Specifically the Rec { splitD, splitJoinD } group in
Data.Array.Parallel.Unlifted.Distributed.Arrays

Simon

16 years agoMake the loop-breaking algorithm a bit more liberal, where RULES are involved
simonpj@microsoft.com [Mon, 21 Jan 2008 13:56:54 +0000 (13:56 +0000)]
Make the loop-breaking algorithm a bit more liberal, where RULES are involved

This is another gloss on the now-quite-subtle and heavily-documented algorithm
for choosing loop breakers.

This fix, provoked by Roman's NDP library, makes sure that when we are choosing
a loop breaker we only take into account variables free on the *rhs* of a rule
not the *lhs*.

Most of the new lines are comments!

16 years agoFix Trac #2055
simonpj@microsoft.com [Mon, 21 Jan 2008 12:42:44 +0000 (12:42 +0000)]
Fix Trac #2055

Sorry, this was my fault, a consequence of the quasi-quoting patch.

I've added rn062 as a test.

16 years agoFix exception message with ghc -e
Ian Lynagh [Mon, 21 Jan 2008 10:41:42 +0000 (10:41 +0000)]
Fix exception message with ghc -e
When running with ghc -e, exceptions should claim to be from the program
that we are running, not ghc.

16 years agoFix warnings in main/CmdLineParser
Ian Lynagh [Mon, 21 Jan 2008 10:31:58 +0000 (10:31 +0000)]
Fix warnings in main/CmdLineParser

16 years agoNormalise FilePaths before printing them
Ian Lynagh [Sun, 20 Jan 2008 19:30:02 +0000 (19:30 +0000)]
Normalise FilePaths before printing them

16 years agoTweak runghc
Ian Lynagh [Sun, 20 Jan 2008 18:46:39 +0000 (18:46 +0000)]
Tweak runghc

16 years agoFix catching exit exceptions in ghc -e
Ian Lynagh [Sun, 20 Jan 2008 17:02:36 +0000 (17:02 +0000)]
Fix catching exit exceptions in ghc -e

16 years agoTypo in phase-control documentation
simonpj@microsoft.com [Mon, 21 Jan 2008 11:36:20 +0000 (11:36 +0000)]
Typo in phase-control documentation

16 years agoFix warnings in main/Main
Ian Lynagh [Sat, 19 Jan 2008 23:59:14 +0000 (23:59 +0000)]
Fix warnings in main/Main

16 years agoSupport multiple -e flags
Ian Lynagh [Sat, 19 Jan 2008 22:30:36 +0000 (22:30 +0000)]
Support multiple -e flags

16 years agoFix ghc -e :main (it was enqueuing the main function, but not running it)
Ian Lynagh [Sat, 19 Jan 2008 22:00:44 +0000 (22:00 +0000)]
Fix ghc -e :main (it was enqueuing the main function, but not running it)

16 years agoFix whitespace
Ian Lynagh [Sat, 19 Jan 2008 21:28:30 +0000 (21:28 +0000)]
Fix whitespace

16 years agoFix giving an error if we are given conflicting mode flags
Ian Lynagh [Sat, 19 Jan 2008 21:26:02 +0000 (21:26 +0000)]
Fix giving an error if we are given conflicting mode flags

16 years agoAdd :run and tweak :main
Ian Lynagh [Sat, 19 Jan 2008 16:49:23 +0000 (16:49 +0000)]
Add :run and tweak :main
You can now give :main a Haskell [String] as an argument, e.g.
:main ["foo", "bar"]
and :run is a variant that takes the name of the function to run.
Also, :main now obeys the -main-is flag.

16 years agoMake MacFrameworks a subdirectory of distrib, since it isn't used in the normal build...
judah.jacobson@gmail.com [Mon, 17 Dec 2007 23:57:35 +0000 (23:57 +0000)]
Make MacFrameworks a subdirectory of distrib, since it isn't used in the normal building process.

16 years agoAdd scripts for building GMP.framework and GNUreadline.framework (OS X).
judah.jacobson@gmail.com [Tue, 27 Nov 2007 07:29:51 +0000 (07:29 +0000)]
Add scripts for building GMP.framework and GNUreadline.framework (OS X).

16 years agoUse -framework-path flags during the cc phase. Fixes trac #1975.
judah.jacobson@gmail.com [Wed, 12 Dec 2007 20:12:45 +0000 (20:12 +0000)]
Use -framework-path flags during the cc phase.  Fixes trac #1975.

16 years agoFIX #1821 (Parser or lexer mess-up)
df@dfranke.us [Mon, 10 Dec 2007 23:06:49 +0000 (23:06 +0000)]
FIX #1821 (Parser or lexer mess-up)

16 years agoImprove the error when :list can't find any code to show
Ian Lynagh [Fri, 18 Jan 2008 22:56:55 +0000 (22:56 +0000)]
Improve the error when :list can't find any code to show

16 years agoFix imports when !DEBUG
Ian Lynagh [Fri, 18 Jan 2008 18:01:26 +0000 (18:01 +0000)]
Fix imports when !DEBUG

16 years agoTweak the splitter
Ian Lynagh [Wed, 16 Jan 2008 19:56:12 +0000 (19:56 +0000)]
Tweak the splitter
We were generating a label ".LnLC7", which the splitter was confusing
with a literal constant (LC). The end result was the assembler tripping
up on ".Ln.text".

16 years agoWibble to SetLevels.abstractVars
simonpj@microsoft.com [Fri, 18 Jan 2008 17:17:54 +0000 (17:17 +0000)]
Wibble to SetLevels.abstractVars

I've gotten this wrong more than once.  Hopefully this has it nailed.
The issue is that in float-out we must abstract over the correct
variables.

16 years agoAdd quasi-quotation, courtesy of Geoffrey Mainland
simonpj@microsoft.com [Fri, 18 Jan 2008 14:55:03 +0000 (14:55 +0000)]
Add quasi-quotation, courtesy of Geoffrey Mainland

This patch adds quasi-quotation, as described in
  "Nice to be Quoted: Quasiquoting for Haskell"
(Geoffrey Mainland, Haskell Workshop 2007)
Implemented by Geoffrey and polished by Simon.

Overview
~~~~~~~~
The syntax for quasiquotation is very similar to the existing
Template haskell syntax:
[$q| stuff |]
where 'q' is the "quoter".  This syntax differs from the paper, by using
a '$' rather than ':', to avoid clashing with parallel array comprehensions.

The "quoter" is a value of type Language.Haskell.TH.Quote.QuasiQuoter, which
contains two functions for quoting expressions and patterns, respectively.

     quote = Language.Haskell.TH.Quote.QuasiQuoter quoteExp quotePat

     quoteExp :: String -> Language.Haskell.TH.ExpQ
     quotePat :: String -> Language.Haskell.TH.PatQ

TEXT is passed unmodified to the quoter. The context of the
quasiquotation statement determines which of the two quoters is
called: if the quasiquotation occurs in an expression context,
quoteExp is called, and if it occurs in a pattern context, quotePat
is called.

The result of running the quoter on its arguments is spliced into
the program using Template Haskell's existing mechanisms for
splicing in code. Note that although Template Haskell does not
support pattern brackets, with this patch binding occurrences of
variables in patterns are supported. Quoters must also obey the same
stage restrictions as Template Haskell; in particular, in this
example quote may not be defined in the module where it is used as a
quasiquoter, but must be imported from another module.

Points to notice
~~~~~~~~~~~~~~~~
* The whole thing is enabled with the flag -XQuasiQuotes

* There is an accompanying patch to the template-haskell library. This
  involves one interface change:
currentModule :: Q String
  is replaced by
location :: Q Loc
  where Loc is a data type defined in TH.Syntax thus:
      data Loc
        = Loc { loc_filename :: String
      , loc_package  :: String
      , loc_module   :: String
      , loc_start    :: CharPos
      , loc_end      :: CharPos }

      type CharPos = (Int, Int) -- Line and character position

  So you get a lot more info from 'location' than from 'currentModule'.
  The location you get is the location of the splice.

  This works in Template Haskell too of course, and lets a TH program
  generate much better error messages.

* There's also a new module in the template-haskell package called
  Language.Haskell.TH.Quote, which contains support code for the
  quasi-quoting feature.

* Quasi-quote splices are run *in the renamer* because they can build
  *patterns* and hence the renamer needs to see the output of running the
  splice.  This involved a bit of rejigging in the renamer, especially
  concerning the reporting of duplicate or shadowed names.

  (In fact I found and removed a few calls to checkDupNames in RnSource
  that are redundant, becuase top-level duplicate decls are handled in
  RnNames.)

16 years agolots of portability changes (#1405)
Isaac Dupree [Thu, 17 Jan 2008 01:13:12 +0000 (01:13 +0000)]
lots of portability changes (#1405)

re-recording to avoid new conflicts was too hard, so I just put it
all in one big patch :-(  (besides, some of the changes depended on
each other.)  Here are what the component patches were:

Fri Dec 28 11:02:55 EST 2007  Isaac Dupree <id@isaac.cedarswampstudios.org>
  * document BreakArray better

Fri Dec 28 11:39:22 EST 2007  Isaac Dupree <id@isaac.cedarswampstudios.org>
  * properly ifdef BreakArray for GHCI

Fri Jan  4 13:50:41 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
  * change ifs on __GLASGOW_HASKELL__ to account for... (#1405)
  for it not being defined. I assume it being undefined implies
  a compiler with relatively modern libraries but without most
  unportable glasgow extensions.

Fri Jan  4 14:21:21 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
  * MyEither-->EitherString to allow Haskell98 instance

Fri Jan  4 16:13:29 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
  * re-portabilize Pretty, and corresponding changes

Fri Jan  4 17:19:55 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
  * Augment FastTypes to be much more complete

Fri Jan  4 20:14:19 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
  * use FastFunctions, cleanup FastString slightly

Fri Jan  4 21:00:22 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
  * Massive de-"#", mostly Int# --> FastInt (#1405)

Fri Jan  4 21:02:49 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
  * miscellaneous unnecessary-extension-removal

Sat Jan  5 19:30:13 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
  * add FastFunctions

16 years agoAdd missing extendSubst
simonpj@microsoft.com [Thu, 17 Jan 2008 18:02:27 +0000 (18:02 +0000)]
Add missing extendSubst

Oops -- missed this from previous commit; sorry

16 years agoAdd -fspec-inline-join-points to SpecConstr
simonpj@microsoft.com [Thu, 17 Jan 2008 15:03:25 +0000 (15:03 +0000)]
Add -fspec-inline-join-points to SpecConstr

This patch addresses a problem that Roman found in SpecConstr.  Consider:

foo :: Maybe Int -> Maybe Int -> Int
foo a b = let j b = foo a b
           in
           case b of
             Nothing -> ...
             Just n  -> case a of
                          Just m  -> ... j (Just (n+1)) ...
                          Nothing -> ... j (Just (n-1)) ...

We want to make specialised versions for 'foo' for the patterns
Nothing  (Just v)
(Just a) (Just b)

Two problems, caused by the join point j.  First, j does not
scrutinise b, so j won't be specialised f for the (Just v) pattern.
Second, j is defined where the free var 'a' is not evaluated.

Both are solved by brutally inlining j at its call sites.  This risks
major code bloat, but it's relatively quick to implement.  The flag
-fspec-inline-join-points
causes brutal inlining for a
non-recursive binding
of a function
whose RHS contains calls
of a recursive function

The (experimental) flag is static for now, and I have not even
documented it properly.

16 years agoFix references to Filepath
Clemens Fruhwirth [Thu, 17 Jan 2008 13:41:39 +0000 (13:41 +0000)]
Fix references to Filepath

16 years agoFix egregious error in earlier "Record evaluated-ness" patch
simonpj@microsoft.com [Thu, 17 Jan 2008 13:40:57 +0000 (13:40 +0000)]
Fix egregious error in earlier "Record evaluated-ness" patch

16 years agoEliminate warnings with -DDEBUG
simonpj@microsoft.com [Thu, 17 Jan 2008 12:49:21 +0000 (12:49 +0000)]
Eliminate warnings with -DDEBUG

16 years agoRecord evaluated-ness information correctly for strict constructors
simonpj@microsoft.com [Thu, 17 Jan 2008 10:52:56 +0000 (10:52 +0000)]
Record evaluated-ness information correctly for strict constructors

The add_evals code in Simplify.simplAlt had bit-rotted.  Example:

  data T a = T !a
  data U a = U !a

  foo :: T a -> U a
  foo (T x) = U x

Here we should not evaluate x before building the U result, because
the x argument of T is already evaluated.

Thanks to Roman for finding this.

16 years agoIn float-out, make sure we abstract over the type variables in the kind of a coercion
simonpj@microsoft.com [Wed, 16 Jan 2008 15:39:08 +0000 (15:39 +0000)]
In float-out, make sure we abstract over the type variables in the kind of a coercion

I can't remember where this bug showed up, but we were abstracting over a
coercion variable (co :: a ~ T), without also abstracting over 'a'.

The fix is simple.

16 years agoFix broken debug warning
simonpj@microsoft.com [Wed, 16 Jan 2008 15:18:18 +0000 (15:18 +0000)]
Fix broken debug warning

16 years agoComplain sensibly if you try to use scoped type variables in Template Haskell
simonpj@microsoft.com [Wed, 16 Jan 2008 15:16:12 +0000 (15:16 +0000)]
Complain sensibly if you try to use scoped type variables in Template Haskell

This fixes Trac #2024; worth merging onto 6.8 branch.

16 years agoComments only
simonpj@microsoft.com [Wed, 16 Jan 2008 15:05:54 +0000 (15:05 +0000)]
Comments only

16 years agoExtra instance for Outputable on 5-tuples
simonpj@microsoft.com [Wed, 16 Jan 2008 15:05:25 +0000 (15:05 +0000)]
Extra instance for Outputable on 5-tuples

16 years agoFix the -frule-check pass
simonpj@microsoft.com [Wed, 16 Jan 2008 14:11:56 +0000 (14:11 +0000)]
Fix the -frule-check pass

Rules for imported things are now kept in the global rule base, not
attached to the global Id.  The rule-check pass hadn't kept up.

This should fix it.

16 years agoAdd dyn-wrapper.c used as cross-plattform launch wrapper for executables using dynami...
Clemens Fruhwirth [Wed, 16 Jan 2008 22:06:03 +0000 (22:06 +0000)]
Add dyn-wrapper.c used as cross-plattform launch wrapper for executables using dynamic libraries in non-standard places

16 years agoUse runPhase_MoveBinary also for generating a dynamic library wrapper
Clemens Fruhwirth [Wed, 16 Jan 2008 22:04:20 +0000 (22:04 +0000)]
Use runPhase_MoveBinary also for generating a dynamic library wrapper

16 years agoRemove -fhardwire-lib-paths in favour of -dynload sysdep
Clemens Fruhwirth [Thu, 10 Jan 2008 12:17:36 +0000 (12:17 +0000)]
Remove -fhardwire-lib-paths in favour of -dynload sysdep

16 years agoghc-inplace defaults to -fhardwire-lib-paths. Change that to -dynload wrapped
Clemens Fruhwirth [Thu, 10 Jan 2008 09:08:39 +0000 (09:08 +0000)]
ghc-inplace defaults to -fhardwire-lib-paths. Change that to -dynload wrapped

16 years agoAdd -dynload flag as dynamic flag.
Clemens Fruhwirth [Wed, 16 Jan 2008 20:57:10 +0000 (20:57 +0000)]
Add -dynload flag as dynamic flag.

16 years agoAdd a missing import
Ian Lynagh [Wed, 16 Jan 2008 17:41:49 +0000 (17:41 +0000)]
Add a missing import

16 years agoFix Makefile generatin on Windows
Ian Lynagh [Wed, 16 Jan 2008 16:27:52 +0000 (16:27 +0000)]
Fix Makefile generatin on Windows

16 years agoFix slash direction on Windows with the new filePath code
Ian Lynagh [Wed, 16 Jan 2008 15:43:17 +0000 (15:43 +0000)]
Fix slash direction on Windows with the new filePath code

16 years agoFix typo
Ian Lynagh [Wed, 16 Jan 2008 01:19:53 +0000 (01:19 +0000)]
Fix typo

16 years agoThe Core type-matcher should look through PredTypes
simonpj@microsoft.com [Wed, 16 Jan 2008 14:59:39 +0000 (14:59 +0000)]
The Core type-matcher should look through PredTypes

The core type-matcher Unify.match was previouly using tcView to expand
types, because it must treat newtypes as distinct from their representation.
But that meant that it also treated the PredType {C Int} as distinct from
its representation type (:TC Int).  And that in turn was causing a rule
not to fire, because the argument types didn't match up.

For this to happen we need to get a situation where we have

  a = :DC blah blah -- Dictionary
  ....(f a).....

Now a has type (:TC Int), bu the RULE for f expects an argument
of type {C Int}.  Roman found that just this was happening.

16 years agoA bottoming function should have infinite arity
simonpj@microsoft.com [Wed, 16 Jan 2008 14:57:22 +0000 (14:57 +0000)]
A bottoming function should have infinite arity

I can't think how this one escaped for so long, but
(error "foo")
should have arityType ABot, just as 'error' itself does.

This improves eta expansion.  I spotted it when looking at the function

  Data.Array.Parallel.Arr.BBArr.writeMBB

in the ndp package.

16 years agoAdd Main.dyn_o deployed into the RTS library dir to linking (see DLLNOTES for rational)
Clemens Fruhwirth [Thu, 10 Jan 2008 09:12:17 +0000 (09:12 +0000)]
Add Main.dyn_o deployed into the RTS library dir to linking (see DLLNOTES for rational)

16 years agoRefactor cross-plattform process spawning from ghc-inplace into shell-tools.c
Clemens Fruhwirth [Thu, 10 Jan 2008 09:07:21 +0000 (09:07 +0000)]
Refactor cross-plattform process spawning from ghc-inplace into shell-tools.c

16 years agoMore verbose error reporting in mk/target.mk
Clemens Fruhwirth [Mon, 31 Dec 2007 17:07:15 +0000 (17:07 +0000)]
More verbose error reporting in mk/target.mk

16 years agoFix generating dependencies for different ways now we use FilePath
Ian Lynagh [Tue, 15 Jan 2008 20:47:16 +0000 (20:47 +0000)]
Fix generating dependencies for different ways now we use FilePath
We were making filenames like
dist/build/GHC/Base.p_.o
rather than
dist/build/GHC/Base.p_o

16 years agoFix utils/Util for debug build
mainland@eecs.harvard.edu [Mon, 14 Jan 2008 19:05:30 +0000 (19:05 +0000)]
Fix utils/Util for debug build

16 years agoGive an error if view pattern syntax is used in an expression; fixes #2033
Ian Lynagh [Mon, 14 Jan 2008 11:50:31 +0000 (11:50 +0000)]
Give an error if view pattern syntax is used in an expression; fixes #2033

16 years agoFIX BUILD (Solaris): include fcntl.h for file operations
Roman Leshchinskiy [Tue, 15 Jan 2008 05:18:44 +0000 (05:18 +0000)]
FIX BUILD (Solaris): include fcntl.h for file operations

16 years agoFix warning when USE_READLINE is unset
Manuel M T Chakravarty [Tue, 15 Jan 2008 01:50:14 +0000 (01:50 +0000)]
Fix warning when USE_READLINE is unset

16 years agoRemove an extra ) that was breaking the build on Windows
Ian Lynagh [Mon, 14 Jan 2008 10:39:53 +0000 (10:39 +0000)]
Remove an extra ) that was breaking the build on Windows

16 years agoFix warnings in utils/ListSetOps
Ian Lynagh [Sun, 13 Jan 2008 15:00:17 +0000 (15:00 +0000)]
Fix warnings in utils/ListSetOps

16 years agoFix warnings in utils/Panic
Ian Lynagh [Sun, 13 Jan 2008 14:29:39 +0000 (14:29 +0000)]
Fix warnings in utils/Panic

16 years agoFix warnings in utils/UniqSet
Ian Lynagh [Sun, 13 Jan 2008 14:26:04 +0000 (14:26 +0000)]
Fix warnings in utils/UniqSet

16 years agoFix warnings in utils/Maybes
Ian Lynagh [Sun, 13 Jan 2008 14:23:47 +0000 (14:23 +0000)]
Fix warnings in utils/Maybes

16 years agoFix warnings in utils/BufWrite
Ian Lynagh [Sun, 13 Jan 2008 14:16:30 +0000 (14:16 +0000)]
Fix warnings in utils/BufWrite

16 years agoFix warnings in utils/FastTypes
Ian Lynagh [Sun, 13 Jan 2008 14:16:12 +0000 (14:16 +0000)]
Fix warnings in utils/FastTypes
Split off a FastBool module, to avoid a circular import with Panic

16 years agoFix warnings in utils/OrdList
Ian Lynagh [Sun, 13 Jan 2008 13:20:42 +0000 (13:20 +0000)]
Fix warnings in utils/OrdList

16 years agoFix warnings in utils/FastMutInt
Ian Lynagh [Sun, 13 Jan 2008 13:18:30 +0000 (13:18 +0000)]
Fix warnings in utils/FastMutInt

16 years agoFix warnings in utils/State
Ian Lynagh [Sun, 13 Jan 2008 13:16:58 +0000 (13:16 +0000)]
Fix warnings in utils/State

16 years agoOnly initialise readline if we are connected to a terminal
Ian Lynagh [Sun, 13 Jan 2008 12:41:07 +0000 (12:41 +0000)]
Only initialise readline if we are connected to a terminal
Patch from Bertram Felgenhauer <int-e@gmx.de>

16 years agoFix warnings in utils/Util
Ian Lynagh [Sun, 13 Jan 2008 00:58:32 +0000 (00:58 +0000)]
Fix warnings in utils/Util

16 years agoFix warnings in utils/Bag.lhs
Ian Lynagh [Sun, 13 Jan 2008 00:20:37 +0000 (00:20 +0000)]
Fix warnings in utils/Bag.lhs

16 years agoAdd GMP_INCLUDE_DIRS in a couple of places
Ian Lynagh [Sat, 12 Jan 2008 23:42:15 +0000 (23:42 +0000)]
Add GMP_INCLUDE_DIRS in a couple of places
Fixes the build on OpenBSD (trac #2009). Based on a patch from kili.

16 years agoTweak whitespace in HsExpr
Ian Lynagh [Sat, 12 Jan 2008 18:57:53 +0000 (18:57 +0000)]
Tweak whitespace in HsExpr

16 years agoFix warnings in HsExpr
Ian Lynagh [Sat, 12 Jan 2008 18:14:44 +0000 (18:14 +0000)]
Fix warnings in HsExpr

16 years agoFilePath fixes
Ian Lynagh [Sat, 12 Jan 2008 17:28:37 +0000 (17:28 +0000)]
FilePath fixes

16 years agodon't initialize readline needlessly
Ian Lynagh [Sat, 12 Jan 2008 15:54:13 +0000 (15:54 +0000)]
don't initialize readline needlessly
Readline.initialize spills some escape sequences to stdout for some terminal
types, potentially spoiling  ghc -e  output. So don't initialize readline
unless we're working interactively on a terminal.
Patch from Bertram Felgenhauer <int-e@gmx.de>

16 years agoFix whitespace
Ian Lynagh [Sat, 12 Jan 2008 15:52:14 +0000 (15:52 +0000)]
Fix whitespace

16 years agoUse System.FilePath
Ian Lynagh [Sat, 12 Jan 2008 15:44:59 +0000 (15:44 +0000)]
Use System.FilePath

16 years agoFix filename completion by adding trailing spaces/slashes manually.
judah.jacobson@gmail.com [Thu, 10 Jan 2008 22:19:28 +0000 (22:19 +0000)]
Fix filename completion by adding trailing spaces/slashes manually.

16 years agoUse command-dependent word break characters for tab completion in ghci. Fixes bug...
judah.jacobson@gmail.com [Wed, 9 Jan 2008 00:36:06 +0000 (00:36 +0000)]
Use command-dependent word break characters for tab completion in ghci.  Fixes bug #998.

16 years agoFix 2030: make -XScopedTypeVariables imply -XRelaxedPolyRec
simonpj@microsoft.com [Thu, 10 Jan 2008 11:31:33 +0000 (11:31 +0000)]
Fix 2030: make -XScopedTypeVariables imply -XRelaxedPolyRec

The type checker doesn't support lexically scoped type variables
unless we are using the RelaxedPolyRec option.  Reasons: see
Note [Scoped tyvars] in TcBinds.

So I've changed DynFlags to add this implication, improved the
documentation, and simplified the code in TcBinds somewhat.
(It's longer but only because of comments!)

16 years agoMore refactoring in getCoreToDo
Roman Leshchinskiy [Wed, 9 Jan 2008 02:37:47 +0000 (02:37 +0000)]
More refactoring in getCoreToDo

16 years agoDocument -fsimplifier-phases
Roman Leshchinskiy [Wed, 9 Jan 2008 02:28:22 +0000 (02:28 +0000)]
Document -fsimplifier-phases

16 years agoAdd -fsimplifier-phases option
Roman Leshchinskiy [Wed, 9 Jan 2008 02:24:49 +0000 (02:24 +0000)]
Add -fsimplifier-phases option

It controls the number of simplifier phases run during optimisation. These are
numbered from n to 1 (by default, n=2). Phase 0 is always run regardless of
this flag. The flag is ignored with -O0 since (practically) no optimisation is
performed in that case.

16 years agoRefactor getCoreToDo slightly
Roman Leshchinskiy [Wed, 9 Jan 2008 01:43:59 +0000 (01:43 +0000)]
Refactor getCoreToDo slightly

16 years agoFix Trac #2018: float-out was ignoring the kind of a coercion variable
simonpj@microsoft.com [Mon, 7 Jan 2008 14:26:01 +0000 (14:26 +0000)]
Fix Trac #2018: float-out was ignoring the kind of a coercion variable

The float-out transformation must handle the case where a coercion
variable is free, which in turn mentions type variables in its kind.
Just like a term variable really.

I did a bit of refactoring at the same time.

Test is tc241

MERGE to stable branch

16 years agoMake the treatment of equalities more uniform
simonpj@microsoft.com [Mon, 7 Jan 2008 14:23:06 +0000 (14:23 +0000)]
Make the treatment of equalities more uniform

This patch (which is part of the fix for Trac #2018) makes coercion variables
be handled more uniformly.  Generally, they are treated like dictionaries
in the type checker, not like type variables, but in a couple of places we
were treating them like type variables.  Also when zonking we should use
zonkDictBndr not zonkIdBndr.

16 years agoFix Trac #2017
simonpj@microsoft.com [Mon, 7 Jan 2008 12:58:19 +0000 (12:58 +0000)]
Fix Trac #2017

16 years agoAdd -XImpredicativeTypes, and tighten up type-validity checking (cf Trac 2019)
simonpj@microsoft.com [Mon, 7 Jan 2008 11:54:51 +0000 (11:54 +0000)]
Add -XImpredicativeTypes, and tighten up type-validity checking (cf Trac 2019)

Somehow we didn't have a separate flag for impredicativity; now we do.

Furthermore, Trac #2019 showed up a missing test for monotypes in data
constructor return types.  And I realised that we were even allowing
things like
Num (forall a. a) => ...
which we definitely should not.

This patch insists on monotypes in several places where we were (wrongly)
too liberal before.

Could be merged to 6.8 but no big deal.

16 years agopass -no-user-package-conf to ghc-inplace
Simon Marlow [Fri, 4 Jan 2008 16:28:40 +0000 (16:28 +0000)]
pass -no-user-package-conf to ghc-inplace

16 years agoFix build: Recent instance shuffling left us with overlapping instances
Ian Lynagh [Sun, 6 Jan 2008 22:15:47 +0000 (22:15 +0000)]
Fix build: Recent instance shuffling left us with overlapping instances

16 years agoAdd instructions for building docs to README
Ian Lynagh [Sun, 6 Jan 2008 21:57:23 +0000 (21:57 +0000)]
Add instructions for building docs to README

16 years agoA little refactoring of GenIfaceEq to make the Outputable instance into H98
simonpj@microsoft.com [Fri, 4 Jan 2008 10:54:50 +0000 (10:54 +0000)]
A little refactoring of GenIfaceEq to make the Outputable instance into H98

16 years agoMake the instance of DebugNodes more H98-like
simonpj@microsoft.com [Fri, 4 Jan 2008 10:54:09 +0000 (10:54 +0000)]
Make the instance of DebugNodes more H98-like

16 years agochange CmmActual, CmmFormal to use a data CmmHinted rather than tuple (#1405)
Isaac Dupree [Fri, 4 Jan 2008 10:53:39 +0000 (10:53 +0000)]
change CmmActual, CmmFormal to use a data CmmHinted rather than tuple (#1405)
This allows the instance of UserOfLocalRegs to be within Haskell98, and IMHO
 makes the code a little cleaner generally.
This is one small (though tedious) step towards making GHC's code more
 portable...