1. 02 Jun, 2010 1 commit
  2. 06 May, 2010 1 commit
  3. 27 Apr, 2010 1 commit
    • Simon Marlow's avatar
      --make is now the default (#3515), and -fno-code works with --make (#3783) · 7828bf3e
      Simon Marlow authored
      If the command line contains any Haskell source files, then we behave
      as if --make had been given.
      
      The meaning of the -c flag has changed (back): -c now selects one-shot
      compilation, but stops before linking.  However, to retain backwards
      compatibility, -c is still allowed with --make, and means the same as
      --make -no-link.  The -no-link flag has been un-deprecated.
      
      -fno-code is now allowed with --make (#3783); the fact that it was
      disabled before was largely accidental, it seems.  We also had some
      regressions in this area: it seems that -fno-code was causing a .hc
      file to be emitted in certain cases.  I've tidied up the code, there
      was no need for -fno-code to be a "mode" flag, as far as I can tell.
      
      -fno-code does not emit interface files, nor does it do recompilation
      checking, as suggested in #3783.  This would make Haddock emit
      interface files, for example, and I'm fairly sure we don't want to do
      that.  Compiling with -fno-code is pretty quick anyway, perhaps we can
      get away without recompilation checking.
      7828bf3e
  4. 13 Apr, 2010 1 commit
  5. 24 Mar, 2010 1 commit
  6. 14 Mar, 2010 1 commit
  7. 13 Mar, 2010 2 commits
  8. 02 Mar, 2010 1 commit
  9. 04 Feb, 2010 1 commit
    • Simon Marlow's avatar
      Implement SSE2 floating-point support in the x86 native code generator (#594) · 335b9f36
      Simon Marlow authored
      The new flag -msse2 enables code generation for SSE2 on x86.  It
      results in substantially faster floating-point performance; the main
      reason for doing this was that our x87 code generation is appallingly
      bad, and since we plan to drop -fvia-C soon, we need a way to generate
      half-decent floating-point code.
      
      The catch is that SSE2 is only available on CPUs that support it (P4+,
      AMD K8+).  We'll have to think hard about whether we should enable it
      by default for the libraries we ship.  In the meantime, at least
      -msse2 should be an acceptable replacement for "-fvia-C
      -optc-ffast-math -fexcess-precision".
      
      SSE2 also has the advantage of performing all operations at the
      correct precision, so floating-point results are consistent with other
      platforms.
      
      I also tweaked the x87 code generation a bit while I was here, now
      it's slighlty less bad than before.
      335b9f36
  10. 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
  11. 30 Sep, 2009 1 commit
  12. 02 Dec, 2009 1 commit
    • simonpj@microsoft.com's avatar
      More work on the simplifier's inlining strategies · c86161c5
      simonpj@microsoft.com authored
      This patch collects a small raft of related changes
      
      * Arrange that during 
           (a) rule matching and 
           (b) uses of exprIsConApp_maybe
        we "look through" unfoldings only if they are active
        in the phase. Doing this for (a) required a bit of 
        extra plumbing in the rule matching code, but I think
        it's worth it.
      
        One wrinkle is that even if inlining is off (in the 'gentle'
        phase of simplification) during rule matching we want to
        "look through" things with inlinings.  
         See SimplUtils.activeUnfInRule.
      
        This fixes a long-standing bug, where things that were
        supposed to be (say) NOINLINE, could still be poked into
        via exprIsConApp_maybe. 
      
      * In the above cases, also check for (non-rule) loop breakers; 
        we never look through these.  This fixes a bug that could make
        the simplifier diverge (and did for Roman).  
        Test = simplCore/should_compile/dfun-loop
      
      * Try harder not to choose a DFun as a loop breaker. This is 
        just a small adjustment in the OccurAnal scoring function
      
      * In the scoring function in OccurAnal, look at the InlineRule
        unfolding (if there is one) not the actual RHS, beause the
        former is what'll be inlined.  
      
      * Make the application of any function to dictionary arguments
        CONLIKE.  Thus (f d1 d2) is CONLIKE.  
        Encapsulated in CoreUtils.isExpandableApp
        Reason: see Note [Expandable overloadings] in CoreUtils
      
      * Make case expressions seem slightly smaller in CoreUnfold.
        This reverses an unexpected consequences of charging for
        alternatives.
      
      Refactorings
      ~~~~~~~~~~~~
      * Signficantly refactor the data type for Unfolding (again). 
        The result is much nicer.  
      
      * Add type synonym BasicTypes.CompilerPhase = Int
        and use it
      
      Many of the files touched by this patch are simply knock-on
      consequences of these two refactorings.
      c86161c5
  13. 25 Nov, 2009 1 commit
  14. 19 Nov, 2009 2 commits
    • simonpj@microsoft.com's avatar
      Remove the (very) old strictness analyser · 2662dbc5
      simonpj@microsoft.com authored
      I finally got tired of the #ifdef OLD_STRICTNESS stuff.  I had been
      keeping it around in the hope of doing old-to-new comparisions, but
      have failed to do so for many years, so I don't think it's going to
      happen.  This patch deletes the clutter.
      2662dbc5
    • simonpj@microsoft.com's avatar
      Implement -fexpose-all-unfoldings, and fix a non-termination bug · 6a944ae7
      simonpj@microsoft.com authored
      The -fexpose-all-unfoldings flag arranges to put unfoldings for *everything*
      in the interface file.  Of course,  this makes the file a lot bigger, but
      it also makes it complete, and that's great for supercompilation; or indeed
      any whole-program work.
      
      Consequences:
        * Interface files need to record loop-breaker-hood.  (Previously,
          loop breakers were never exposed, so that info wasn't necessary.)
          Hence a small interface file format change. 
      
        * When inlining, must check loop-breaker-hood. (Previously, loop
          breakers didn't have an unfolding at all, so no need to check.)
      
        * Ditto in exprIsConApp_maybe.  Roman actually tripped this bug, 
          because a DFun, which had an unfolding, was also a loop breaker
      
        * TidyPgm.tidyIdInfo must be careful to preserve loop-breaker-hood
      
      So Id.idUnfolding checks for loop-breaker-hood and returns NoUnfolding
      if so. When you want the unfolding regardless of loop-breaker-hood, 
      use Id.realIdUnfolding.
      
      I have not documented the flag yet, because it's experimental.  Nor
      have I tested it thoroughly.  But with the flag off (the normal case)
      everything should work.
      6a944ae7
  15. 10 Nov, 2009 1 commit
  16. 09 Nov, 2009 1 commit
  17. 05 Nov, 2009 1 commit
  18. 04 Nov, 2009 1 commit
  19. 02 Nov, 2009 1 commit
  20. 30 Oct, 2009 1 commit
  21. 29 Oct, 2009 1 commit
  22. 28 Oct, 2009 1 commit
    • simonpj@microsoft.com's avatar
      Add 'rec' to stmts in a 'do', and deprecate 'mdo' · f04dead9
      simonpj@microsoft.com authored
      The change is this (see Trac #2798).  Instead of writing
      
        mdo { a <- getChar
            ; b <- f c
            ; c <- g b
            ; putChar c
            ; return b }
      
      you would write
      
        do { a <- getChar
           ; rec { b <- f c
                 ; c <- g b }
           ; putChar c
           ; return b }
      
      That is, 
        * 'mdo' is eliminated 
        * 'rec' is added, which groups a bunch of statements
          into a single recursive statement
      
      This 'rec' thing is already present for the arrow notation, so it  
      makes the two more uniform.  Moreover, 'rec' lets you say more
      precisely where the recursion is (if you want to), whereas 'mdo' just
      says "there's recursion here somewhere".  Lastly, all this works with
      rebindable syntax (which mdo does not).
      
      Currently 'mdo' is enabled by -XRecursiveDo.  So we now deprecate this
      flag, with another flag -XDoRec to enable the 'rec' keyword.
      
      Implementation notes:
        * Some changes in Lexer.x
        * All uses of RecStmt now use record syntax
      
      I'm still not really happy with the "rec_ids" and "later_ids" in the
      RecStmt constructor, but I don't dare change it without consulting Ross
      about the consequences for arrow syntax.
      f04dead9
  23. 20 Oct, 2009 1 commit
  24. 07 Oct, 2009 1 commit
  25. 17 Sep, 2009 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Fix build on Mac OS 10.6 (Snow Leopard) · c2cd83e7
      chak@cse.unsw.edu.au. authored
      - We have -m32 as machine-dependent option for gcc for a 32 bit build
      - Like on OpenBSD, SL requires -fno-stack-protector to avoid triggering the
        stack smashing checks inserted by gcc by default on this platform.
      c2cd83e7
  26. 08 Sep, 2009 1 commit
    • Simon Marlow's avatar
      Add -package-id, improve package shadowing behaviour and error messages · 03bb97e0
      Simon Marlow authored
      A few changes bundled together here:
      
       - Add -package-id flag, like -package but takes an
         InstalledPackageId as an argument (mainly for Cabal)
         (docs to follow)
      
       - Fix the shadowing behaviour: if we end up with
         two packages with the same name/version that came from
         different package databases, then one will shadow the
         other.  This may mean we have to disable other packages
         that depended on the now-shadowed package.  Lots of
         refactoring to ensure that we can get reasonable diagnostics when
         this happens
      
      <command line>: cannot satisfy -package shadowdep: 
          shadowdep-1-XXX is unusable due to missing or recursive dependencies:
            shadow-1-XXX
          (use -v for more information)
      03bb97e0
  27. 20 Aug, 2009 1 commit
  28. 21 Aug, 2009 1 commit
  29. 20 Aug, 2009 2 commits
    • simonpj@microsoft.com's avatar
      Improvements to record puns, wildcards · d64022dc
      simonpj@microsoft.com authored
      * Make C { A.a } work with punning, expanding to C { A.a = a }
      
      * Make it so that, with -fwarn-unused-matches, 
              f (C {..}) = x
        does not complain about the bindings introduced by the "..".
      
      * Make -XRecordWildCards implies -XDisambiguateRecordFields.
      
      * Overall refactoring of RnPat, which had become very crufty. 
        In particular, there is now a monad, CpsRn, private to RnPat,
        which deals with the cps-style plumbing.  This is why so many
        lines of RnPat have changed.
      
      * Refactor the treatment of renaming of record fields into two passes
      	- rnHsRecFields1, used both for patterns and expressions,
      	     which expands puns, wild-cards
        	- a local renamer in RnPat for fields in patterns
      	- a local renamer in RnExpr for fields in construction and update
        This make it all MUCH easier to understand
       
      * Improve documentation of record puns, wildcards, and disambiguation
      d64022dc
    • Simon Marlow's avatar
      Make -dynamic a proper way, so we read the .dyn_hi files · 740618f2
      Simon Marlow authored
      Also, I cleaned up some of the way-related infrastructure, removing
      two global variables.  
      
      There's more that could be done here, but it's a start.  The way flags
      probably don't need to be static any more.
      740618f2
  30. 02 Aug, 2009 1 commit
  31. 26 Jul, 2009 1 commit
    • Ian Lynagh's avatar
      Add a -fbuilding-cabal-package flag · 7026ce88
      Ian Lynagh authored
      This means GHC knows whether it's building a Cabal package, or just
      Haskell sources. For example, it may wish to give different error
      messages when building a Cabal package.
      7026ce88
  32. 25 Jul, 2009 1 commit
  33. 23 Jul, 2009 1 commit
    • simonpj@microsoft.com's avatar
      Add tuple sections as a new feature · 58521c72
      simonpj@microsoft.com authored
      This patch adds tuple sections, so that
      
      	(x,,z)  means   \y -> (x,y,z)
      
      Thanks for Max Bolinbroke for doing the hard work.
      
      In the end, instead of using two constructors in HsSyn, I used
      just one (still called ExplicitTuple) whose arguments can be
      	Present (LHsExpr id)
      or	Missing PostTcType
      
      While I was at it, I did a bit of refactoring too.
      58521c72
  34. 20 Jul, 2009 1 commit
  35. 19 Jul, 2009 1 commit
  36. 16 Jul, 2009 2 commits