1. 05 Aug, 2007 2 commits
    • simonpj@microsoft.com's avatar
      Make SpecConstr specialise for constant arguments again · 57a4597d
      simonpj@microsoft.com authored
      Consider
        lvl = Just True
      
        foo :: Maybe Bool -> Int -> Int
        foo (Just True) i = i
        foo _           i = foo lvl i
      
      SpecConstr should specialise foo, but it wasn't doing so (spotted
      by Roman).
      
      Reason: lvl's unfolding wasn't in the cloned version of lvl.
      Solution: extend the value environment to record top-level bindings too
      
      At the same time I made it work if 'lvl' is a lambda, in which case it
      is again worth specialisg.  This meant renaming ConEnv to ValueEnv,
      and adding a case for 'LambdaVal'.
      
      (To make specialisation on lambdas work properly, we have to do lambda
      lifting as well, but this gets part of the way, and fixes a bug too.)
      
      57a4597d
    • simonpj@microsoft.com's avatar
  2. 04 Aug, 2007 4 commits
  3. 09 Aug, 2007 1 commit
  4. 08 Aug, 2007 2 commits
  5. 07 Aug, 2007 1 commit
  6. 06 Aug, 2007 1 commit
  7. 07 Aug, 2007 3 commits
  8. 06 Aug, 2007 1 commit
  9. 05 Aug, 2007 4 commits
  10. 04 Aug, 2007 12 commits
  11. 03 Aug, 2007 5 commits
  12. 02 Aug, 2007 4 commits