Skip to content
Snippets Groups Projects
  1. Sep 12, 2008
  2. Sep 11, 2008
  3. Sep 10, 2008
  4. Sep 09, 2008
  5. Sep 10, 2008
    • Simon Peyton Jones's avatar
      7aac567c
    • Simon Peyton Jones's avatar
      Check the *right* set of type variables for escape! · 62ee856c
      Simon Peyton Jones authored
      I did the wrong checkSigTyVars, which (happily) triggered an ASSERT
      failure.  This should fix it.
      62ee856c
    • Simon Peyton Jones's avatar
      More refactoring of instance declarations (fixes Trac #2572) · aaed05e8
      Simon Peyton Jones authored
      In refactoring instance declarations I'd taken a short cut over
      scoped type variables, but it wasn't right as #2572 shows.
      
      Fixing it required a significant chunk of further refactoring,
      alas. But it's done!  Quite tidily as it turns out.
      
      The main issue is that when typechecking a default method, we
      need two sets of type variables in scope
      	class C a where
         	  op :: forall b. ...
      	  op = e
      In 'e', *both* 'a' and 'b' are in scope.  But the type of the
      default method has a nested flavour
      	op :: forall a. C a => forall b. ....
      and our normal scoping mechanisms don't bring 'b' into scope.
      (And probably shouldn't.)  
      
      Solution (which is done for instance methods too) is to use
      a local defintion, like this:
      
        $dmop :: forall a. C a => forall b. ....
        $dmop a d = let 
                       op :: forall b. ...
                       op = e
                    in op
      
      and now the scoping works out.  I hope I have now see the
      last of this code for a bit!
      aaed05e8
    • Simon Peyton Jones's avatar
      Fix Trac #2581: inlining of record selectors · 112ad197
      Simon Peyton Jones authored
      Bryan discovered that a non-trivial record selector (non-trivial in 
      the sense that it has to reconstruct the result value because of
      UNPACK directives) weren't being inlined.  The reason was that the
      unfolding generated by MkId.mRecordSelId was never being optimised
      *at all*, and hence looked big, and hence wasn't inlined.
      
      (The out-of-line version *is* put into the code of the module
      and *is* optimised, which made this bug pretty puzzling.  But the
      unfolding inside the record-selector-Id itself, which is a GlobalId
      and hence does not get its inlining updated like LocalIds, was
      big and fat.)
      
      Solution: I wrote a very simple optimiser, CoreUnfold.simplOptExpr,
      which does enough optimisation to solve this particular problem.
      It's short, simple, and will be useful in other contexts.
      112ad197
    • Simon Peyton Jones's avatar
      911a3e09
    • Simon Peyton Jones's avatar
      Fix the zonking of HsWrappers · a62561f7
      Simon Peyton Jones authored
      HsWrappers are horribly inconsistent at the moment. I intended that
        WpLam, WpApp     are for evidence abstraction/application
        WpTyLam, WpTyApp are for type abstraction/application
      
      But when we zonk (WpApp co), where co is a coercion variable, we 
      get a *coercion* not a coercion *variable*.   So for now I'm making
      it into a WpTyApp, which the desugarer handles perfectly well.
      
      (I'd forgotten to zonk it properly at all; that is the bug that 
      this patch fixes.)
      a62561f7
    • Simon Peyton Jones's avatar
      Add newDictOcc, newDictOccs · b7f052c4
      Simon Peyton Jones authored
      b7f052c4
    • Simon Peyton Jones's avatar
      Layout and type synonyms only · 8bd50866
      Simon Peyton Jones authored
      8bd50866
    • Simon Peyton Jones's avatar
      Robustify the setting of implied flags · 3998d13f
      Simon Peyton Jones authored
      When setting implied flags, do so recursively.  So if -Xa implies -Xb,
      and -Xb implies -Xc, we do the right thing. 
      
      I thought we needed this, but we don't.  But it seems like a good idea
      anyway.
      3998d13f
    • Simon Peyton Jones's avatar
      Rename a variable · cff03e11
      Simon Peyton Jones authored
      cff03e11
    • Simon Peyton Jones's avatar
      Comments only · cb579c2b
      Simon Peyton Jones authored
      cb579c2b
    • Simon Peyton Jones's avatar
      901f574d
  6. Sep 09, 2008
Loading