1. 21 Dec, 2007 2 commits
    • simonpj@microsoft.com's avatar
      Improve handling of newtypes (fixes Trac 1495) · 219f900f
      simonpj@microsoft.com authored
      In a few places we want to "look through" newtypes to get to the
      representation type.  But we need to be careful that  we don't fall 
      into an ininite loop with e.g.
      	newtype T = MkT T
      
      The old mechansim for doing this was to have a field nt_rep, inside 
      a newtype TyCon, that gave the "ultimate representation" of the type.
      But that failed for Trac 1495, which looked like this:
         newtype Fix a = Fix (a (Fix a))
         data I a = I a
      Then, expanding the type (Fix I) went on for ever.
      
      The right thing to do seems to be to check for loops when epxanding
      the *type*, rather than in the *tycon*.  This patch does that, 
      	- Removes nt_rep from TyCon
      	- Make Type.repType check for loops
      See Note [Expanding newtypes] in Type.lhs.
      
      At the same time I also fixed a bug for Roman, where newtypes were not
      being expanded properly in FamInstEnv.topNormaliseType.  This function
      and Type.repType share a common structure.
      
      
      	Ian, see if this merges easily to the branch
      	If not, I don't think it's essential to fix 6.8
      219f900f
    • simonpj@microsoft.com's avatar
      Fix Trac #1981: seq on a type-family-typed expression · f645bca8
      simonpj@microsoft.com authored
      We were crashing when we saw
      	case x of DEFAULT -> rhs
      where x had a type-family type.  This patch fixes it.
      
      MERGE to the 6.8 branch.
      
      f645bca8
  2. 20 Dec, 2007 6 commits
  3. 18 Dec, 2007 1 commit
  4. 16 Dec, 2007 1 commit
  5. 17 Dec, 2007 5 commits
  6. 14 Dec, 2007 1 commit
  7. 12 Dec, 2007 1 commit
  8. 15 Dec, 2007 2 commits
  9. 14 Dec, 2007 2 commits
  10. 13 Dec, 2007 2 commits
  11. 12 Dec, 2007 2 commits
  12. 13 Dec, 2007 1 commit
  13. 14 Dec, 2007 2 commits
  14. 04 Dec, 2007 1 commit
  15. 13 Dec, 2007 6 commits
  16. 12 Dec, 2007 1 commit
  17. 06 Dec, 2007 3 commits
  18. 05 Dec, 2007 1 commit