1. 21 Dec, 2005 1 commit
  2. 24 Sep, 2005 1 commit
  3. 26 Jul, 2005 1 commit
  4. 15 Jun, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-06-15 13:50:14 by simonmar] · 48f77ccc
      simonmar authored
      Undo accidental commit
      48f77ccc
    • simonmar's avatar
      [project @ 2005-06-15 12:03:19 by simonmar] · e6de0678
      simonmar authored
      Re-implement GHCi's :info and :browse commands in terms of TyThings
      rather than IfaceSyn.
      
      The GHC API now exposes its internal types for Haskell entities:
      TyCons, Classes, DataCons, Ids and Instances (collectively known as
      TyThings), so we can inspect these directly to pretty-print
      information about an entity.  Previously the internal representations
      were converted to IfaceSyn for passing to InteractiveUI, but we can
      now remove that code.
      
      Some of the new code comes via Visual Haskell, but I've changed it
      around a lot to fix various dark corners and properly print things
      like GADTs.
      
      The pretty-printing interfaces for TyThings are exposed by a new
      module PprTyThing, which is implemented purely in terms of the GHC API
      (and is probably a good source of sample code).  Visual Haskell should
      be able to use the functions exported by this module directly.
      
      Lots of new goodies are exported by the GHC module, mainly for
      inspecting TyThings.
      e6de0678
  5. 19 May, 2005 1 commit
    • simonpj's avatar
      [project @ 2005-05-19 07:58:35 by simonpj] · f7ccc078
      simonpj authored
      Catch an exception in Template Haskell code
      
      		Merge to STABLE
      
      If the code run by a Template Haskell splice fails with, say,
      a pattern-match failure, we should not report it as a GHC panic.
      It's a bug in the user's program.
      
      This commit fixes up the exception handling to do the right thing.
      
      Fixes SourceForge item #1201666
      
      TH_fail tests it.
      f7ccc078
  6. 11 Apr, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-04-11 13:51:45 by simonmar] · 5a10dc1b
      simonmar authored
      Fix register allocation bug: at a branch destination we weren't
      setting the free register set correctly.  This may have resulted in
      poor code in some cases; worst case it causes a Prelude.head: empty list.
      5a10dc1b
  7. 18 Mar, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-03-18 13:53:34 by simonmar] · 9b73f1ba
      simonmar authored
      Undo rev. 1.6, these changes shouldn't have been in this tree
      9b73f1ba
    • simonmar's avatar
      [project @ 2005-03-18 13:37:27 by simonmar] · d1c1b7d0
      simonmar authored
      Flags cleanup.
      
      Basically the purpose of this commit is to move more of the compiler's
      global state into DynFlags, which is moving in the direction we need
      to go for the GHC API which can have multiple active sessions
      supported by a single GHC instance.
      
      Before:
      
      $ grep 'global_var' */*hs | wc -l
           78
      
      After:
      
      $ grep 'global_var' */*hs | wc -l
           27
      
      Well, it's an improvement.  Most of what's left won't really affect
      our ability to host multiple sessions.
      
      Lots of static flags have become dynamic flags (yay!).  Notably lots
      of flags that we used to think of as "driver" flags, like -I and -L,
      are now dynamic.  The most notable static flags left behind are the
      "way" flags, eg. -prof.  It would be nice to fix this, but it isn't
      urgent.
      
      On the way, lots of cleanup has happened.  Everything related to
      static and dynamic flags lives in StaticFlags and DynFlags
      respectively, and they share a common command-line parser library in
      CmdLineParser.  The flags related to modes (--makde, --interactive
      etc.) are now private to the front end: in fact private to Main
      itself, for now.
      d1c1b7d0
  8. 28 Jan, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-01-28 12:55:17 by simonmar] · 153b9cb9
      simonmar authored
      Rationalise the BUILD,HOST,TARGET defines.
      
      Recall that:
      
        - build is the platform we're building on
        - host is the platform we're running on
        - target is the platform we're generating code for
      
      The change is that now we take these definitions as applying from the
      point of view of the particular source code being built, rather than
      the point of view of the whole build tree.
      
      For example, in RTS and library code, we were previously testing the
      TARGET platform.  But under the new rule, the platform on which this
      code is going to run is the HOST platform.  TARGET only makes sense in
      the compiler sources.
      
      In practical terms, this means that the values of BUILD, HOST & TARGET
      may vary depending on which part of the build tree we are in.
      
      Actual changes:
      
       - new file: includes/ghcplatform.h contains platform defines for
         the RTS and library code.
      
       - new file: includes/ghcautoconf.h contains the autoconf settings
         only (HAVE_BLAH).  This is so that we can get hold of these
         settings independently of the platform defines when necessary
         (eg. in GHC).
      
       - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h.
      
       - MachRegs.h, which is included into both the compiler and the RTS,
         now has to cope with the fact that it might need to test either
         _TARGET_ or _HOST_ depending on the context.
      
       - the compiler's Makefile now generates
           stage{1,2,3}/ghc_boot_platform.h
         which contains platform defines for the compiler.  These differ
         depending on the stage, of course: in stage2, the HOST is the
         TARGET of stage1.  This was wrong before.
      
       - The compiler doesn't get platform info from Config.hs any more.
         Previously it did (sometimes), but unless we want to generate
         a new Config.hs for each stage we can't do this.
      
       - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically
         in CPP'd Haskell source.
      
       - ghcplatform.h defines *_TARGET_* for backwards compatibility
         (ghcplatform.h is included by ghcconfig.h, which is included by
         config.h, so code which still #includes config.h will get the TARGET
         settings as before).
      
       - The Users's Guide is updated to mention *_HOST_* rather than
         *_TARGET_*.
      
       - coding-style.html in the commentary now contains a section on
         platform defines.  There are further doc updates to come.
      
      Thanks to Wolfgang Thaller for pointing me in the right direction.
      153b9cb9
  9. 17 Jan, 2005 1 commit
  10. 13 Jan, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-01-13 12:44:08 by simonmar] · f25cb619
      simonmar authored
      Fix bug(s) in the register allocator: if a virtual register is both in
      memory and in a register (perhaps because it was recently loaded from
      a spill slot), and the current instruction writes it, we're supposed
      to invalidate the memory slot.  That wasn't happening properly.
      
      This fixes two problems noticed when using -prof -fasm: 10queens in the
      testsuite gives the wrong answer, and nofib/spectral/hartel/ida fails
      with a 'head []' message.  Interesting bug to track down!
      f25cb619
  11. 13 Aug, 2004 1 commit