1. 04 Nov, 2014 1 commit
  2. 11 Sep, 2013 1 commit
  3. 06 Jul, 2013 1 commit
  4. 24 Dec, 2012 1 commit
  5. 09 Oct, 2012 1 commit
  6. 03 Sep, 2012 1 commit
  7. 13 Jul, 2012 2 commits
  8. 26 Apr, 2012 1 commit
  9. 19 Jan, 2012 1 commit
  10. 04 Nov, 2011 1 commit
  11. 02 Nov, 2011 1 commit
  12. 12 Oct, 2011 2 commits
  13. 23 Sep, 2011 1 commit
    • Simon Peyton Jones's avatar
      Add a transformation limit to the simplifier (Trac #5448) · 24a2353a
      Simon Peyton Jones authored
      This addresses the rare cases where the simplifier diverges
      (see the above ticket).  We were already counting how many simplifier
      steps were taking place, but with no limit.  This patch adds a limit;
      at which point we halt compilation, and print out useful stats. The
      stats show what is begin inlined, and how often, which points you
      directly to the problem.  The limit is set based on the size of the
      program.
      
      Instead of halting compilation, we could instead just inhibit
      inlining, which would let compilation of the module complete. This is
      a bit harder to implement, and it's likely to mean that you unrolled
      the function 1143 times and then ran out of ticks; you probably don't
      want to complete parsing on this highly-unrolled program.
      
      Flags: -dsimpl-tick-factor=N.  Default is 100 (percent).
             A bigger number increases the allowed maximum tick count.
      24a2353a
  14. 16 Nov, 2010 1 commit
    • simonpj@microsoft.com's avatar
      Refactoring of the way that inlinings and rules are activated · c177e43f
      simonpj@microsoft.com authored
      Principally, the SimplifierMode now carries several (currently
      four) flags in *all* phases, not just the "Gentle" phase.
      This makes things simpler and more uniform.
      
      As usual I did more refactoring than I had intended.
      
      This stuff should go into 7.0.2 in due course, once
      we've checked it solves the DPH performance problems.
      c177e43f
  15. 24 Dec, 2009 1 commit
  16. 18 Dec, 2009 1 commit
    • simonpj@microsoft.com's avatar
      Move all the CoreToDo stuff into CoreMonad · 63e3a411
      simonpj@microsoft.com authored
      This patch moves a lot of code around, but has zero functionality change.
      The idea is that the types
      
          CoreToDo
          SimplifierSwitch	
          SimplifierMode
          FloatOutSwitches
      
      and 
      
          the main core-to-core pipeline construction
      
      belong in simplCore/, and *not* in DynFlags.
      63e3a411
  17. 08 Dec, 2009 1 commit
  18. 09 Nov, 2009 1 commit
  19. 29 Oct, 2009 1 commit
  20. 03 Sep, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Improved specialisation of recursive groups · 78260da4
      simonpj@microsoft.com authored
      This patch significantly improves the way in which recursive groups
      are specialised.  This turns out ot be very important when specilising
      the bindings that (now) emerge from instance declarations.
      
      Consider
          let rec { f x = ...g x'...
                  ; g y = ...f y'.... }
          in f 'a'
      Here we specialise 'f' at Char; but that is very likely to lead to 
      a specialisation of 'g' at Char.  We must do the latter, else the
      whole point of specialisation is lost.  This was not happening before.
      
      The whole thing is desribed in 
          Note [Specialising a recursive group]
      
      
      Simon
      78260da4
  21. 20 Jul, 2008 1 commit
  22. 04 May, 2008 2 commits
  23. 12 Apr, 2008 1 commit
  24. 29 Mar, 2008 1 commit
  25. 17 Jan, 2008 3 commits
    • twanvl's avatar
    • twanvl's avatar
    • Isaac Dupree's avatar
      lots of portability changes (#1405) · 206b4dec
      Isaac Dupree authored
      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
      206b4dec
  26. 04 Sep, 2007 1 commit
  27. 03 Sep, 2007 1 commit
  28. 01 Sep, 2007 1 commit
  29. 10 Aug, 2007 1 commit
  30. 23 May, 2007 1 commit
    • simonpj@microsoft.com's avatar
      Improve the interaction of 'seq' and associated data types · 9670d664
      simonpj@microsoft.com authored
      Roman produced programs involving associated types that did not optimise well.
      His programs were something like this:
      
        data family T a
        data instance T Int = MkT Bool Char
      
        bar :: T Int -> Int
        bar t = t `seq` loop 0
      	where
      	  loop = ...
      
      You'd think that the `seq` should unbox 't' outside the loop, since
      a (T Int) is just a MkT pair.  
      
      The most robust way to make this happen is for the simplifier to understand
      a bit about type-family instances.   See 
      	Note [Improving seq]
      in Simplify.lhs.  We use FamInstEnv.topNormaliseType to do the interesting
      work.
      
      To make this happen I did a bit of refactoring to the simplifier
      monad.
      
      I'd previously done a very similar transformation in LiberateCase, but it
      was happening too late.  So this patch takes it out of LiberateCase as
      well as adding it to Simplify.
      
      
      9670d664
  31. 06 Apr, 2007 1 commit
  32. 11 Oct, 2006 1 commit
    • Simon Marlow's avatar
      Module header tidyup, phase 1 · 49c98d14
      Simon Marlow authored
      This patch is a start on removing import lists and generally tidying
      up the top of each module.  In addition to removing import lists:
      
         - Change DATA.IOREF -> Data.IORef etc.
         - Change List -> Data.List etc.
         - Remove $Id$
         - Update copyrights
         - Re-order imports to put non-GHC imports last
         - Remove some unused and duplicate imports
      49c98d14
  33. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      Most of the other users of the fptools build system have migrated to
      Cabal, and with the move to darcs we can now flatten the source tree
      without losing history, so here goes.
      
      The main change is that the ghc/ subdir is gone, and most of what it
      contained is now at the top level.  The build system now makes no
      pretense at being multi-project, it is just the GHC build system.
      
      No doubt this will break many things, and there will be a period of
      instability while we fix the dependencies.  A straightforward build
      should work, but I haven't yet fixed binary/source distributions.
      Changes to the Building Guide will follow, too.
      0065d5ab
  34. 06 Jan, 2006 1 commit
    • simonmar's avatar
      [project @ 2006-01-06 16:30:17 by simonmar] · 9d7da331
      simonmar authored
      Add support for UTF-8 source files
      
      GHC finally has support for full Unicode in source files.  Source
      files are now assumed to be UTF-8 encoded, and the full range of
      Unicode characters can be used, with classifications recognised using
      the implementation from Data.Char.  This incedentally means that only
      the stage2 compiler will recognise Unicode in source files, because I
      was too lazy to port the unicode classifier code into libcompat.
      
      Additionally, the following synonyms for keywords are now recognised:
      
        forall symbol 	(U+2200)	forall
        right arrow   	(U+2192)	->
        left arrow   		(U+2190)	<-
        horizontal ellipsis 	(U+22EF)	..
      
      there are probably more things we could add here.
      
      This will break some source files if Latin-1 characters are being used.
      In most cases this should result in a UTF-8 decoding error.  Later on
      if we want to support more encodings (perhaps with a pragma to specify
      the encoding), I plan to do it by recoding into UTF-8 before parsing.
      
      Internally, there were some pretty big changes:
      
        - FastStrings are now stored in UTF-8
      
        - Z-encoding has been moved right to the back end.  Previously we
          used to Z-encode every identifier on the way in for simplicity,
          and only decode when we needed to show something to the user.
          Instead, we now keep every string in its UTF-8 encoding, and
          Z-encode right before printing it out.  To avoid Z-encoding the
          same string multiple times, the Z-encoding is cached inside the
          FastString the first time it is requested.
      
          This speeds up the compiler - I've measured some definite
          improvement in parsing at least, and I expect compilations overall
          to be faster too.  It also cleans up a lot of cruft from the
          OccName interface.  Z-encoding is nicely hidden inside the
          Outputable instance for Names & OccNames now.
      
        - StringBuffers are UTF-8 too, and are now represented as
          ForeignPtrs.
      
        - I've put together some test cases, not by any means exhaustive,
          but there are some interesting UTF-8 decoding error cases that
          aren't obvious.  Also, take a look at unicode001.hs for a demo.
      9d7da331
  35. 18 Mar, 2005 1 commit
    • 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