1. 18 Jun, 2011 4 commits
  2. 11 Jun, 2011 1 commit
  3. 10 Jun, 2011 2 commits
  4. 09 Jun, 2011 1 commit
    • Ian Lynagh's avatar
      Refactor SrcLoc and SrcSpan · b2bd63f9
      Ian Lynagh authored
      The "Unhelpful" cases are now in a separate type. This allows us to
      improve various things, e.g.:
      * Most of the panic's in SrcLoc are now gone
      * The Lexer now works with RealSrcSpans rather than SrcSpans, i.e. it
        knows that it has real locations and thus can assume that the line
        number etc really exists
      * Some of the more suspicious cases are no longer necessary, e.g.
        we no longer need this case in advanceSrcLoc:
            advanceSrcLoc loc _ = loc -- Better than nothing
      
      More improvements can probably be made, e.g. tick locations can
      probably use RealSrcSpans too.
      b2bd63f9
  5. 19 Apr, 2011 1 commit
    • Simon Peyton Jones's avatar
      This BIG PATCH contains most of the work for the New Coercion Representation · fdf86568
      Simon Peyton Jones authored
      See the paper "Practical aspects of evidence based compilation in System FC"
      
      * Coercion becomes a data type, distinct from Type
      
      * Coercions become value-level things, rather than type-level things,
        (although the value is zero bits wide, like the State token)
        A consequence is that a coerion abstraction increases the arity by 1
        (just like a dictionary abstraction)
      
      * There is a new constructor in CoreExpr, namely Coercion, to inject
        coercions into terms
      fdf86568
  6. 06 Mar, 2011 1 commit
  7. 10 Jan, 2011 1 commit
    • simonpj@microsoft.com's avatar
      Do dependency analysis when kind-checking type declarations · 6ea06bbf
      simonpj@microsoft.com authored
      This patch fixes Trac #4875.  The main point is to do dependency
      analysis on type and class declarations, and kind-check them in
      dependency order, so as to improve error messages.
      
      This patch means that a few programs that would typecheck before won't
      typecheck any more; but before we were (naughtily) going beyond
      Haskell 98 without any language-extension flags, and Trac #4875
      convinces me that doing so is a Bad Idea.
      
      Here's an example that won't typecheck any more
             data T a b = MkT (a b)
             type F k = T k Maybe
      
      If you look at T on its own you'd default 'a' to kind *->*;
      and then kind-checking would fail on F.
      
      But GHC currently accepts this program beause it looks at
      the *occurrences* of T.
      6ea06bbf
  8. 27 Nov, 2010 1 commit
  9. 19 Dec, 2010 1 commit
  10. 27 Nov, 2010 1 commit
  11. 30 Oct, 2010 1 commit
  12. 15 Nov, 2010 1 commit
  13. 27 Oct, 2010 1 commit
    • Simon Marlow's avatar
      Refactoring and tidyup of HscMain and related things (also fix #1666) · 94bf0d36
      Simon Marlow authored
      While trying to fix #1666 (-Werror aborts too early) I decided to some
      tidyup in GHC/DriverPipeline/HscMain.
      
       - The GhcMonad overloading is gone from DriverPipeline and HscMain
         now.  GhcMonad is now defined in a module of its own, and only
         used in the top-level GHC layer.  DriverPipeline and HscMain
         use the plain IO monad and take HscEnv as an argument.
      
       - WarnLogMonad is gone.  printExceptionAndWarnings is now called
         printException (the old name is deprecated).  Session no longer
         contains warnings.
      
       - HscMain has its own little monad that collects warnings, and also
         plumbs HscEnv around.  The idea here is that warnings are collected
         while we're in HscMain, but on exit from HscMain (any function) we
         check for warnings and either print them (via log_action, so IDEs
         can still override the printing), or turn them into an error if
         -Werror is on.
      
       - GhcApiCallbacks is gone, along with GHC.loadWithLogger.  Thomas
         Schilling told me he wasn't using these, and I don't see a good
         reason to have them.
      
       - there's a new pure API to the parser (suggestion from Neil Mitchell):
            parser :: String
                   -> DynFlags
                   -> FilePath
                   -> Either ErrorMessages (WarningMessages, 
                                            Located (HsModule RdrName))
      94bf0d36
  14. 22 Oct, 2010 1 commit
    • simonpj@microsoft.com's avatar
      Add rebindable syntax for if-then-else · 4e0c994e
      simonpj@microsoft.com authored
      There are two main changes
      
       * New LANGUAGE option RebindableSyntax, which implies NoImplicitPrelude
      
       * if-the-else becomes rebindable, with function name "ifThenElse"
         (but case expressions are unaffected)
      
      Thanks to Sam Anklesaria for doing most of the work here
      4e0c994e
  15. 18 Sep, 2010 1 commit
  16. 15 Sep, 2010 1 commit
  17. 14 Sep, 2010 1 commit
    • Ian Lynagh's avatar
      Remove (most of) the FiniteMap wrapper · e95ee1f7
      Ian Lynagh authored
      We still have
          insertList, insertListWith, deleteList
      which aren't in Data.Map, and
          foldRightWithKey
      which works around the fold(r)WithKey addition and deprecation.
      e95ee1f7
  18. 13 Sep, 2010 1 commit
  19. 01 Jul, 2010 1 commit
    • simonpj@microsoft.com's avatar
      Fix second bug in Trac #4127 · 2c183f9b
      simonpj@microsoft.com authored
      This bug concerned the awkward shadowing we do for 
      Template Haskell declaration brackets.  Lots of
      comments in 
      
        Note [Top-level Names in Template Haskell decl quotes]
      2c183f9b
  20. 20 Jun, 2010 2 commits
  21. 18 Jun, 2010 1 commit
  22. 15 Jun, 2010 1 commit
  23. 25 May, 2010 1 commit
    • simonpj@microsoft.com's avatar
      Refactor (again) the handling of default methods · 78693246
      simonpj@microsoft.com authored
      This patch fixes Trac #4056, by 
      
       a) tidying up the treatment of default method names
       b) removing the 'module' argument to newTopSrcBinder
      
      The details aren't that interesting, but the result
      is much tidier. The original bug was a 'nameModule' panic,
      caused by trying to find the module of a top-level name.
      But TH quotes generate Internal top-level names that don't
      have a module, and that is generally a good thing.  
      
      Fixing that in turn led to the default-method refactoring,
      which also makes the Name for a default method be handled
      in the same way as other derived names, generated in BuildTyCl
      via a call newImplicitBinder.  Hurrah.
      78693246
  24. 06 May, 2010 1 commit
  25. 03 Mar, 2010 1 commit
  26. 04 Jan, 2010 1 commit
  27. 02 Jan, 2010 1 commit
  28. 04 Dec, 2009 1 commit
    • simonpj@microsoft.com's avatar
      Use addToUFM_Acc where appropriate · 65277a1c
      simonpj@microsoft.com authored
      This way of extending a UniqFM has existed for some time, but
      we weren't really using it.
      
      addToUFM_Acc	:: Uniquable key =>
      			      (elt -> elts -> elts)	-- Add to existing
      			   -> (elt -> elts)		-- New element
      			   -> UniqFM elts 		-- old
      			   -> key -> elt 		-- new
      			   -> UniqFM elts		-- result
      65277a1c
  29. 15 Nov, 2009 1 commit
  30. 24 Jul, 2009 1 commit
  31. 19 Jul, 2009 1 commit
  32. 07 Jul, 2009 1 commit
  33. 06 Jul, 2009 1 commit
  34. 02 Jul, 2009 1 commit
  35. 26 Apr, 2009 1 commit