1. 21 Jan, 2008 5 commits
  2. 20 Jan, 2008 3 commits
  3. 21 Jan, 2008 1 commit
  4. 19 Jan, 2008 6 commits
  5. 17 Dec, 2007 1 commit
  6. 27 Nov, 2007 1 commit
  7. 12 Dec, 2007 1 commit
  8. 10 Dec, 2007 1 commit
  9. 18 Jan, 2008 2 commits
  10. 16 Jan, 2008 1 commit
    • Ian Lynagh's avatar
      Tweak the splitter · 204965d6
      Ian Lynagh authored
      We were generating a label ".LnLC7", which the splitter was confusing
      with a literal constant (LC). The end result was the assembler tripping
      up on ".Ln.text".
      204965d6
  11. 18 Jan, 2008 2 commits
    • simonpj@microsoft.com's avatar
      Wibble to SetLevels.abstractVars · 194eb4bb
      simonpj@microsoft.com authored
      I've gotten this wrong more than once.  Hopefully this has it nailed.
      The issue is that in float-out we must abstract over the correct
      variables.
      
      194eb4bb
    • 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
  12. 17 Jan, 2008 7 commits
    • 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
    • simonpj@microsoft.com's avatar
      Add missing extendSubst · 1286da96
      simonpj@microsoft.com authored
      Oops -- missed this from previous commit; sorry
      1286da96
    • simonpj@microsoft.com's avatar
      Add -fspec-inline-join-points to SpecConstr · 44d4bf2c
      simonpj@microsoft.com authored
      This patch addresses a problem that Roman found in SpecConstr.  Consider:
      
      foo :: Maybe Int -> Maybe Int -> Int
      foo a b = let j b = foo a b
                 in
                 case b of
                   Nothing -> ...
                   Just n  -> case a of
                                Just m  -> ... j (Just (n+1)) ...
                                Nothing -> ... j (Just (n-1)) ...
      
      We want to make specialised versions for 'foo' for the patterns
      	Nothing  (Just v)
      	(Just a) (Just b)
      
      Two problems, caused by the join point j.  First, j does not
      scrutinise b, so j won't be specialised f for the (Just v) pattern.
      Second, j is defined where the free var 'a' is not evaluated.
      
      Both are solved by brutally inlining j at its call sites.  This risks
      major code bloat, but it's relatively quick to implement.  The flag
      	-fspec-inline-join-points
      causes brutal inlining for a 
      	non-recursive binding
      	of a function
      	whose RHS contains calls
      	of a recursive function
      
      The (experimental) flag is static for now, and I have not even
      documented it properly.
      
      44d4bf2c
    • Clemens Fruhwirth's avatar
      Fix references to Filepath · 448873c0
      Clemens Fruhwirth authored
      448873c0
    • simonpj@microsoft.com's avatar
    • simonpj@microsoft.com's avatar
      Eliminate warnings with -DDEBUG · 1994febd
      simonpj@microsoft.com authored
      1994febd
    • simonpj@microsoft.com's avatar
      Record evaluated-ness information correctly for strict constructors · 8e15cfb6
      simonpj@microsoft.com authored
      The add_evals code in Simplify.simplAlt had bit-rotted.  Example:
      
        data T a = T !a
        data U a = U !a
      
        foo :: T a -> U a
        foo (T x) = U x
      
      Here we should not evaluate x before building the U result, because
      the x argument of T is already evaluated.
      
      Thanks to Roman for finding this.
      
      8e15cfb6
  13. 16 Jan, 2008 8 commits
  14. 10 Jan, 2008 1 commit