1. 03 Jun, 2008 1 commit
    • Simon Marlow's avatar
      New flag: -dno-debug-output · 667ef993
      Simon Marlow authored
      From the docs:
         <para>Suppress any unsolicited debugging output.  When GHC
           has been built with the <literal>DEBUG</literal> option it
           occasionally emits debug output of interest to developers.
           The extra output can confuse the testing framework and
           cause bogus test failures, so this flag is provided to
           turn it off.</para>
      667ef993
  2. 01 May, 2008 1 commit
  3. 20 May, 2008 1 commit
  4. 01 May, 2008 1 commit
  5. 12 May, 2008 1 commit
  6. 30 Apr, 2008 2 commits
  7. 15 Apr, 2008 1 commit
  8. 11 Apr, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Revive the static argument transformation · 31478ab9
      simonpj@microsoft.com authored
      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%
      
      31478ab9
  9. 09 Mar, 2008 1 commit
  10. 06 Mar, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Improve SpecConstr for local bindings: seed specialisation from the calls · e5adcaf8
      simonpj@microsoft.com authored
      This patch makes a significant improvement to SpecConstr, based on
      Roman's experience with using it for stream fusion.  The main change is
      this:
      
        * For local (not-top-level) declarations, seed the specialisation 
          loop from the calls in the body of the 'let'.
      
      See Note [Local recursive groups] for discussion and example.  Top-level
      declarations are treated just as before.
      
      Other changes in this patch:
      
        * New flag -fspec-constr-count=N sets the maximum number of specialisations
          for any single function to N.  -fno-spec-constr-count removes the limit.
      
        * Refactoring in specLoop and friends; new algebraic data types 
          OneSpec and SpecInfo instead of the tuples that were there before
      
        * Be less keen to specialise on variables that are simply in scope.
          Example
            f p q = letrec g a y = ...g....  in g q p
          We probably do not want to specialise 'g' for calls with exactly
          the arguments 'q' and 'p', since we know nothing about them.
      
      e5adcaf8
  11. 28 Feb, 2008 1 commit
  12. 26 Feb, 2008 2 commits
  13. 17 Feb, 2008 1 commit
  14. 23 Jan, 2008 1 commit
    • Simon Marlow's avatar
      FIX #1838, #1987: change where GHCi searches for config files · f6efe0c7
      Simon Marlow authored
      6.6 behaviour:
        - ./.ghci
        - $HOME/.ghci
      
      6.8.[12] behaviour:
        - ./.ghci
        - Windows: c:/Documents and Settings/<user>/.ghci
        - Unix: $HOME/.ghci
      
      6.10 (and 6.8.3 when this is merged):
        - ./.ghci
        - Windows: c:/Documents and Settings/<user>/Application Data/ghc/ghci.conf
        - Unix: $HOME/.ghc/ghci.conf
        - $HOME/.ghci
      
      We will need to document this in the 6.8.3 release notes because it
      may affect Windows users who have adapted their setup to 6.8.[12].
      f6efe0c7
  15. 21 Jan, 2008 1 commit
  16. 19 Jan, 2008 1 commit
    • Ian Lynagh's avatar
      Add :run and tweak :main · c24bd1bb
      Ian Lynagh authored
      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.
      c24bd1bb
  17. 18 Jan, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Add quasi-quotation, courtesy of Geoffrey Mainland · f3399c44
      simonpj@microsoft.com authored
      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.)
      
      
      f3399c44
  18. 10 Jan, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Fix 2030: make -XScopedTypeVariables imply -XRelaxedPolyRec · 493fd9df
      simonpj@microsoft.com authored
      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!)
       
      493fd9df
  19. 09 Jan, 2008 1 commit
  20. 07 Jan, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Add -XImpredicativeTypes, and tighten up type-validity checking (cf Trac 2019) · 5e04ae34
      simonpj@microsoft.com authored
      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.
      
      5e04ae34
  21. 04 Jan, 2008 1 commit
  22. 03 Jan, 2008 1 commit
  23. 20 Dec, 2007 1 commit
    • simonpj@microsoft.com's avatar
      Implement generalised list comprehensions · 67cb4091
      simonpj@microsoft.com authored
        This patch implements generalised list comprehensions, as described in 
        the paper "Comprehensive comprehensions" (Peyton Jones & Wadler, Haskell
        Workshop 2007).  If you don't use the new comprehensions, nothing
        should change.
        
        The syntax is not exactly as in the paper; see the user manual entry 
        for details.
        
        You need an accompanying patch to the base library for this stuff 
        to work.
        
        The patch is the work of Max Bolingbroke [batterseapower@hotmail.com], 
        with some advice from Simon PJ.
        
        The related GHC Wiki page is 
          http://hackage.haskell.org/trac/ghc/wiki/SQLLikeComprehensions 
      67cb4091
  24. 14 Dec, 2007 1 commit
  25. 13 Dec, 2007 1 commit
  26. 04 Dec, 2007 1 commit
  27. 27 Nov, 2007 1 commit
  28. 26 Nov, 2007 4 commits
  29. 25 Nov, 2007 1 commit
    • Ian Lynagh's avatar
      MERGED: Make ":" in GHCi repeat the last command · d2b3daa3
      Ian Lynagh authored
      Ian Lynagh <igloo@earth.li>**20071124231857
       It used to be a synonym for ":r" in 6.6.1, but this wasn't documented or
       known about by the developers. In 6.8.1 it was accidentally broken.
       This patch brings it back, but as "repeat the last command", similar to
       pressing enter in gdb. This is almost as good for people who want it to
       reload, and means that it can also be used to repeat commands like :step.
      d2b3daa3
  30. 20 Nov, 2007 1 commit
  31. 08 Nov, 2007 1 commit
  32. 19 Nov, 2007 1 commit
  33. 16 Nov, 2007 3 commits