1. 30 May, 2008 1 commit
  2. 23 May, 2008 1 commit
  3. 20 May, 2008 2 commits
    • rl@cse.unsw.edu.au's avatar
      Add -Odph · 2412b0b3
      rl@cse.unsw.edu.au authored
      This is the optimisation level recommended when compiling DPH programs. At the
      moment, it is equivalent to -O2 -fno-method-sharing -fdicts-cheap
      -fmax-simplifier-iterations20 -fno-spec-constr-threshold.
      2412b0b3
    • rl@cse.unsw.edu.au's avatar
      Make -f[no-]method-sharing a dynamic flag · bfd0c33d
      rl@cse.unsw.edu.au authored
      We want -Odph to be a dynamic flag and that should imply -fno-method-sharing.
      This doesn't add a lot of complexity.
      bfd0c33d
  4. 07 May, 2008 1 commit
  5. 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
  6. 29 Mar, 2008 1 commit
  7. 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
  8. 22 Feb, 2008 1 commit
  9. 07 Feb, 2008 1 commit
  10. 11 Feb, 2008 2 commits
    • rl@cse.unsw.edu.au's avatar
      Symbolic tags for simplifier phases · a33ae68a
      rl@cse.unsw.edu.au authored
      Every simplifier phase can have an arbitrary number of tags and multiple
      phases can share the same tags. The tags can be used as arguments to
      -ddump-simpl-phases to specify which phases are to be dumped.
      For instance, -ddump-simpl-phases=main will dump the output of phases 2, 1 and
      0 of the initial simplifier run (they all share the "main" tag) while
      -ddump-simpl-phases=main:0 will dump only the output of phase 0 of that run.
      
      At the moment, the supported tags are:
      
        main                 The main, staged simplifier run (before strictness)
        post-worker-wrapper  After the w/w split
        post-liberate-case   After LiberateCase
        final                Final clean-up run
      
      The names are somewhat arbitrary and will change in the future.
      a33ae68a
    • rl@cse.unsw.edu.au's avatar
      Allow -ddump-simpl-phases to specify which phases to dump · b4229ab6
      rl@cse.unsw.edu.au authored
      We can now say -ddump-simpl-phases=1,2 to dump only these two phases and
      nothing else.
      b4229ab6
  11. 30 Jan, 2008 1 commit
  12. 27 Jan, 2008 1 commit
  13. 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
  14. 16 Jan, 2008 2 commits
  15. 14 Jan, 2008 1 commit
  16. 12 Jan, 2008 1 commit
  17. 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
  18. 09 Jan, 2008 3 commits
  19. 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
  20. 25 Dec, 2007 1 commit
    • chevalier@alum.wellesley.edu's avatar
      Extend API for compiling to and from Core · 98c68a1c
      chevalier@alum.wellesley.edu authored
      Added API support for compiling Haskell to simplified Core, and for
      compiling Core to machine code. The latter, especially, should be
      considered experimental and has only been given cursory testing. Also
      fixed warnings in DriverPipeline. Merry Christmas.
      98c68a1c
  21. 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
  22. 14 Dec, 2007 1 commit
  23. 13 Dec, 2007 2 commits
  24. 14 Nov, 2007 1 commit
  25. 13 Nov, 2007 1 commit
    • mnislaih's avatar
      GHCi debugger: added a new flag, -fno-print-binding-contents · 7bd518dd
      mnislaih authored
      The contents of bindings show at breakpoints and by :show bindings
      is rendered using the same printer that :print uses.
      But sometimes the output it gives spans over too many lines and the
      user may want to be able to disable it.
      7bd518dd
  26. 04 Oct, 2007 1 commit
  27. 13 Nov, 2007 1 commit
  28. 11 Nov, 2007 1 commit
  29. 07 Nov, 2007 1 commit
    • Simon Marlow's avatar
      #1617: Add :browse! and various other additions to GHCi · 806ab633
      Simon Marlow authored
         
        - :browse!
          a variant of :browse that lists children separately,
          not in context, and gives import qualifiers in comments
      
      SimonM: I also added sorting by source location for interpreted
      modules in :browse, and alphabetic sorting by name otherwise.  For
      :browse *M, the locally-defined names come before the external ones.
      
        - :{ ..lines.. :} (multiline commands)
          allow existing commands to be spread over multiple lines
          to improve readability, both interactively and in .ghci
          (includes a refactoring that unifies the previous three
          command loops into one, runCommands, fed from cmdqueue,
          file, or readline)
      
        - :set
            now shows GHCi-specific flag settings (printing/
            debugger), as well as non-language dynamic flag 
            settings
          :show languages
            show active language flags
          :show packages
            show active package flags as well as implicitly 
            loaded packages
      806ab633
  30. 01 Nov, 2007 1 commit
    • David Waern's avatar
      Refactor Haddock options · 03d8585e
      David Waern authored
      This patch renames the DOC_OPTIONS pragma to OPTIONS_HADDOCK. It also
      adds "-- # ..."-style Haddock option pragmas, for compatibility with
      code that use them.
      
      Another change is that both of these two pragmas behave like
      OPTIONS_GHC, i.e. they are only allowed at the top of the module, they
      are ignored everywhere else and they are stored in the dynflags. There is
      no longer any Haddock options in HsSyn.
      
      Please merge this to the 6.8.2 branch when 6.8.1 is out, if appropriate.
      03d8585e
  31. 10 Oct, 2007 1 commit
    • Dan Licata's avatar
      View patterns, record wildcards, and record puns · 6a05ec5e
      Dan Licata authored
      This patch implements three new features:
      * view patterns (syntax: expression -> pat in a pattern)
      * working versions of record wildcards and record puns
      See the manual for detailed descriptions.
      
      Other minor observable changes:
      * There is a check prohibiting local fixity declarations
        when the variable being fixed is not defined in the same let
      * The warn-unused-binds option now reports warnings for do and mdo stmts
      
      Implementation notes: 
      
      * The pattern renamer is now in its own module, RnPat, and the
      implementation is now in a CPS style so that the correct context is
      delivered to pattern expressions.
      
      * These features required a fairly major upheaval to the renamer.
      Whereas the old version used to collect up all the bindings from a let
      (or top-level, or recursive do statement, ...) and put them into scope
      before renaming anything, the new version does the collection as it
      renames.  This allows us to do the right thing with record wildcard
      patterns (which need to be expanded to see what names should be
      collected), and it allows us to implement the desired semantics for view
      patterns in lets.  This change had a bunch of domino effects brought on
      by fiddling with the top-level renaming.
      
      * Prior to this patch, there was a tricky bug in mkRecordSelId in HEAD,
      which did not maintain the invariant necessary for loadDecl.  See note
      [Tricky iface loop] for details.
      6a05ec5e
  32. 03 Oct, 2007 1 commit
  33. 08 Oct, 2007 1 commit
  34. 26 Sep, 2007 1 commit