1. 25 May, 2007 1 commit
    • iavor.diatchki@gmail.com's avatar
      Changes the behavior of the "edit" command in GHCi. · 27e9c93a
      iavor.diatchki@gmail.com authored
      Currently, when the user invokes the GHCi editor without a parameter
      GHCi chooses the last file that loaded _sucessfully_.
      This patch changes this behavior to start the editor with the
      last file that _faild_ (this being what I usually want to edit).
      Caveat: we use the module graph to determine what happened
      and so we do not catch errors that occured during dependecy
      analysis (e.g., a mis-typed module name) but we could fix this later.
      27e9c93a
  2. 29 May, 2007 1 commit
  3. 26 May, 2007 3 commits
  4. 29 May, 2007 2 commits
  5. 26 May, 2007 1 commit
  6. 25 May, 2007 4 commits
  7. 24 May, 2007 2 commits
  8. 23 May, 2007 1 commit
  9. 19 May, 2007 4 commits
  10. 18 May, 2007 2 commits
  11. 24 May, 2007 1 commit
  12. 23 May, 2007 4 commits
    • simonpj@microsoft.com's avatar
      Improve the interaction of 'seq' and associated data types · 9670d664
      simonpj@microsoft.com authored
      Roman produced programs involving associated types that did not optimise well.
      His programs were something like this:
      
        data family T a
        data instance T Int = MkT Bool Char
      
        bar :: T Int -> Int
        bar t = t `seq` loop 0
      	where
      	  loop = ...
      
      You'd think that the `seq` should unbox 't' outside the loop, since
      a (T Int) is just a MkT pair.  
      
      The most robust way to make this happen is for the simplifier to understand
      a bit about type-family instances.   See 
      	Note [Improving seq]
      in Simplify.lhs.  We use FamInstEnv.topNormaliseType to do the interesting
      work.
      
      To make this happen I did a bit of refactoring to the simplifier
      monad.
      
      I'd previously done a very similar transformation in LiberateCase, but it
      was happening too late.  So this patch takes it out of LiberateCase as
      well as adding it to Simplify.
      
      
      9670d664
    • simonpj@microsoft.com's avatar
      In GHCi, bind identifiers at TH level 'impLevel' · 800dba35
      simonpj@microsoft.com authored
      Consder Trac #1265, which does this in GHCi:
      
      	Prelude> let doit = fail "Code not written yet" :: ExpQ
      	Prelude> $(doit)
      
      Even though 'doit' is defined "in the same module", it's OK to use it in a splice
      because it'll have been fully compiled to bytecode.  (Contrast the situation if
      these two lines appeared in a single, compiled module.)
      
      Hence we want to bind 'doit' at TH's "imported level" (TcRnTypes.impLevel).  
      This used to happen because GHCi-bound Ids were in the *global* type
      env (and hence at "imported level").  But since SimonM moved
      GHCi-bound ids to the *local* type env (for good reasons) the above
      program has been rejected.
      
      This patch makes it work again.
      800dba35
    • simonpj@microsoft.com's avatar
      White-space only · 87b3c589
      simonpj@microsoft.com authored
      87b3c589
    • simonpj@microsoft.com's avatar
      Drop redundant import · 56f04f2e
      simonpj@microsoft.com authored
      56f04f2e
  13. 21 May, 2007 1 commit
  14. 11 May, 2007 1 commit
  15. 14 May, 2007 1 commit
  16. 23 May, 2007 1 commit
  17. 11 May, 2007 1 commit
  18. 10 May, 2007 1 commit
  19. 22 May, 2007 1 commit
  20. 21 May, 2007 4 commits
  21. 20 May, 2007 1 commit
  22. 21 May, 2007 1 commit
  23. 20 May, 2007 1 commit