1. 04 May, 2007 1 commit
    • simonpj@microsoft.com's avatar
      isDataTyCon should be False for all type families, even data type families · 71d2bf92
      simonpj@microsoft.com authored
      isDataTyCon advertises that it's true of "data types that are
      definitely represented by heap-allocated constructors.  These are
      srcutinised by Core-level @case@ expressions, and they get info tables
      allocated for them."
      
      Type-family TyCons never have this property, not even data type families.
      It's the *instance* TyCons that do.
      
      I hope that this change does not break anything that somehow relied
      on the old (wrong) semantics.
      71d2bf92
  2. 10 Nov, 2006 2 commits
  3. 01 Nov, 2006 1 commit
    • simonpj@microsoft.com's avatar
      Major overhaul of the Simplifier · 7a327c12
      simonpj@microsoft.com authored
      This big patch completely overhauls the Simplifier.  The simplifier
      had grown old and crufty, and was hard to understand and maintain.
      This new version is still quite complicated, because the simplifier
      does a lot, but it's much easier to understand, for me at least.
      
      It does mean that I have touched almost every line of the simplifier,
      so the diff is a large one.
      
      Big changes are these
      
      * When simplifying an Expr we generate a simplified Expr plus a 
        bunch of "floats", which are bindings that have floated out
        of the Expr.  Before, this float stuff was returned separately,
        but not they are embedded in the SimplEnv, which makes the
        plumbing much easier and more robust.  In particular, the
        SimplEnv already meaintains the "in-scope set", and making
        that travel with the floats helps to ensure that we always 
        use the right in-scope set.
      
        This change has a pervasive effect.
      
      * Rather than simplifying the args of a call before trying rules
        and inlining, we now defer simplifying the args until both
        rules and inlining have failed, so we're going to leave a
        call in the result.  This avoids the risk of repeatedly 
        simplifying an argument, which was handled by funny ad-hoc
        flags before.  
        
        The downside is that we must apply the substitution to the args before
        rule-matching; and if thep rule doesn't match that is wasted work.
        But having any rules at all is the exception not the rule, and the
        substitution is lazy, so we only substitute until a no-match is found.
        The code is much more elegant though.
      
      * A SimplCont is now more zipper-like. It used to have an embedded
        function, but that was a bit hard to think about, and now it's
        nice and consistent. The relevant constructors are StrictArg
        and StrictBind
      
      * Each Rule now has an *arity* (gotten by CoreSyn.ruleArity), which 
        tells how many arguments it matches against.  This entailed adding
        a field ru_nargs to a BuiltinRule.  And that made me look at 
        PrelRules; I did quite a bit of refactoring in the end, so the
        diff in PrelRules looks much biggger than it really is.
      
      * A little refactoring in OccurAnal.  The key change is that in 
        the RHS of	x = y `cast` co
        we regard 'y' as "many", so that it doesn't get inlined into 
        the RHS of x.  This allows x to be inlined elsewhere.  It's 
        very like the existing situation for
      		x = Just y
        where we treat 'y' as "many".
      7a327c12
  4. 18 Oct, 2006 1 commit
  5. 16 Oct, 2006 1 commit
  6. 13 Oct, 2006 1 commit
  7. 11 Oct, 2006 1 commit
  8. 29 Sep, 2006 1 commit
  9. 20 Sep, 2006 5 commits
    • chak@cse.unsw.edu.au.'s avatar
      Make sym coercion smart constructor smarter, add comments · a7bda9e6
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 17:11:59 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Make sym coercion smart constructor smarter, add comments
        Sun Aug  6 20:32:58 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Make sym coercion smart constructor smarter, add comments
          Tue Aug  1 11:30:14 EDT 2006  kevind@bu.edu
      a7bda9e6
    • chak@cse.unsw.edu.au.'s avatar
      Refactoring in TcGadt · b97e1705
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 17:11:25 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Refactoring in TcGadt
        Sun Aug  6 20:32:20 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Refactoring in TcGadt
          Tue Aug  1 10:28:25 EDT 2006  kevind@bu.edu
      b97e1705
    • chak@cse.unsw.edu.au.'s avatar
      Add some invariant checking for refinements · 4ea5fe11
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 17:09:56 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Add some invariant checking for refinements
        Sun Aug  6 20:30:56 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Add some invariant checking for refinements
          Tue Aug  1 08:52:43 EDT 2006  simonpj@microsoft.com
      4ea5fe11
    • chak@cse.unsw.edu.au.'s avatar
      Fix GADT refinement fix-pointing, add ASSERTs and a WARN, make type equality... · 67ee8a93
      chak@cse.unsw.edu.au. authored
      Fix GADT refinement fix-pointing, add ASSERTs and a WARN, make type equality functions work for PredTy Eqtype ...
      Mon Sep 18 17:07:38 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Fix GADT refinement fix-pointing, add ASSERTs and a WARN, make type equality functions work for PredTy Eqtype ...
        Sun Aug  6 20:28:50 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Fix GADT refinement fix-pointing, add ASSERTs and a WARN, make type equality functions work for PredTy Eqtype ...
          Tue Aug  1 06:14:43 EDT 2006  kevind@bu.edu
      67ee8a93
    • chak@cse.unsw.edu.au.'s avatar
      fixing record selectors · ef47b5c2
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 16:50:18 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * fixing record selectors
        Sun Aug  6 19:56:29 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * fixing record selectors
          Fri Jul 28 10:24:28 EDT 2006  kevind@bu.edu
          - Bad conflict in tcIfaceDataAlt, at a place where the monster patch had a 
            conflict, too.  I have no idea what the right code is.  -=chak
        NB (at time of 2nd merge): previous conflict resolution was fine
      ef47b5c2
  10. 07 Aug, 2006 1 commit
  11. 06 Aug, 2006 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Adding TcGadt.lhs · 143f4381
      chak@cse.unsw.edu.au. authored
      - Seperate patch as diff doesn't capture file adds
      - Includes the patch:
        Wed Jul 26 08:23:35 EDT 2006  simonpj@microsoft.com
        Add a missing mkSymCoercion in TcGadt.uVar
      143f4381