1. 16 Jun, 2008 1 commit
  2. 19 May, 2008 3 commits
  3. 22 Apr, 2008 2 commits
  4. 11 Apr, 2008 1 commit
  5. 10 Apr, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Two improvements to boxy matching · f09bc7d1
      simonpj@microsoft.com authored
      I can't quite remember what provoked these two changes, but they are in my
      	One improves boxy_match (which failed unnecessarily)
      	One fixes boxy_lub (which was assymetrical)
  6. 29 Mar, 2008 3 commits
  7. 15 Mar, 2008 1 commit
  8. 17 Jan, 2008 1 commit
  9. 07 Jan, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Make the treatment of equalities more uniform · 3787d987
      simonpj@microsoft.com authored
      This patch (which is part of the fix for Trac #2018) makes coercion variables
      be handled more uniformly.  Generally, they are treated like dictionaries
      in the type checker, not like type variables, but in a couple of places we
      were treating them like type variables.  Also when zonking we should use
      zonkDictBndr not zonkIdBndr.
  10. 08 Dec, 2007 1 commit
  11. 21 Nov, 2007 1 commit
    • simonpj@microsoft.com's avatar
      Make rebindable do-notation behave as advertised · 1d1c3c72
      simonpj@microsoft.com authored
      Adopt Trac #1537.  The patch ended up a bit bigger than I expected,
      so I suggest we do not merge this into the 6.8 branch.  But there
      is no funadamental reason why not.
      With this patch, rebindable do-notation really does type as if you
      had written the original (>>) and (>>=) operations in desguared form.
      I ended up refactoring some of the (rather complicated) error-context
      stuff in TcUnify, by pushing an InstOrigin into tcSubExp and its
      various calls. That means we could get rid of tcFunResTy, and the
      SubCtxt type.  This should improve error messages slightly
      in complicated situations, because we have an Origin to hand
      to instCall (in the (isSigmaTy actual_ty) case of tc_sub1).
      Thanks to Pepe for the first draft of the patch.
  12. 01 Nov, 2007 1 commit
    • simonpj@microsoft.com's avatar
      Rejig the error messages a bit; fixes a minor bug · 2e68d041
      simonpj@microsoft.com authored
      The type checker was only reporting the first message if an equality
      failed to match.  This patch does a bit of refactoring and fixes the
      bug, which was in the bogus use of eqInstMisMatch 
      in tcSimplify.report_no_instances.b
      This is really a bug in 6.8 too, so this would be good to merge across
      to the 6.8 branch.
  13. 19 Oct, 2007 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Zonk quantified tyvars with skolems · cad764aa
      chak@cse.unsw.edu.au. authored
      We used to zonk quantified type variables to regular TyVars.  However, this
      leads to problems.  Consider this program from the regression test suite:
        eval :: Int -> String -> String -> String
        eval 0 root actual = evalRHS 0 root actual
        evalRHS :: Int -> a
        evalRHS 0 root actual = eval 0 root actual
      It leads to the deferral of an equality
        (String -> String -> String) ~ a
      which is propagated up to the toplevel (see TcSimplify.tcSimplifyInferCheck).
      In the meantime `a' is zonked and quantified to form `evalRHS's signature.
      This has the *side effect* of also zonking the `a' in the deferred equality
      (which at this point is being handed around wrapped in an implication
      Finally, the equality (with the zonked `a') will be handed back to the
      simplifier by TcRnDriver.tcRnSrcDecls calling TcSimplify.tcSimplifyTop.
      If we zonk `a' with a regular type variable, we will have this regular type
      variable now floating around in the simplifier, which in many places assumes to
      only see proper TcTyVars.
      We can avoid this problem by zonking with a skolem.  The skolem is rigid
      (which we requirefor a quantified variable), but is still a TcTyVar that the
      simplifier knows how to deal with.
  14. 18 Oct, 2007 1 commit
  15. 17 Oct, 2007 1 commit
  16. 29 Sep, 2007 1 commit
  17. 28 Sep, 2007 1 commit
  18. 16 Sep, 2007 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      FIX: TypeFamilies: should_compile/Simple12 · 1b6b0ba3
      chak@cse.unsw.edu.au. authored
      - checkTauTvUpdate now distinguishes between whether
        (1) a type variables occurs only in type family parameters
            (in which case unification is to be deferred)
        (2) other variable occurences
            (which case we fail with a cannot create infinite type message, as before)
  19. 15 Sep, 2007 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Overhaul of the rewrite rules · 6d2b0ae3
      chak@cse.unsw.edu.au. authored
      - Cleaned up and simplified rules
      - Added many missing cases
      - The rules OccursCheck and swap have been eliminated and integrate with
        the other rules; ie, Subst and Unify perform the occurs check themselves
        and they can deal with left-to-right and right-to-left oriented rewrites.
        This makes the code simpler and more efficient.
      - Also added comments.
  20. 06 Sep, 2007 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      EqInst related clean up · 4ba96c06
      chak@cse.unsw.edu.au. authored
      - Remove some unused and some superflous functions
      - Add comments regarding ancestor equalities
      - Tidied ancestor equality computation
      - Replace some incorrect instToId by instToVar (but there are still some
        bad ones around as we still get warnings with -DDEBUG)
      - Some cleaned up layout
      NB: Code growth is just due to more comments.
  21. 04 Sep, 2007 2 commits
  22. 03 Sep, 2007 1 commit
  23. 01 Sep, 2007 1 commit
  24. 28 Aug, 2007 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Type checking for type synonym families · 5822cb8d
      chak@cse.unsw.edu.au. authored
      This patch introduces type checking for type families of which associated
      type synonyms are a special case. E.g.
              type family Sum n m
              type instance Sum Zero n = n
              type instance Sum (Succ n) m = Succ (Sum n m)
              data Zero       -- empty type
              data Succ n     -- empty type
      In addition we support equational constraints of the form:
              ty1 ~ ty2
      (where ty1 and ty2 are arbitrary tau types) in any context where
      type class constraints are already allowed, e.g.
              data Equals a b where
                      Equals :: a ~ b => Equals a b
      The above two syntactical extensions are disabled by default. Enable
      with the -XTypeFamilies flag.
      For further documentation about the patch, see:
              * the master plan
              * the user-level documentation
      The patch is mostly backwards compatible, except for:
              * Some error messages have been changed slightly.
              * Type checking of GADTs now requires a bit more type declarations:
                not only should the type of a GADT case scrutinee be given, but also
                that of any identifiers used in the branches and the return type.
      Please report any unexpected behavior and incomprehensible error message 
      for existing code.
      Contributors (code and/or ideas):
              Tom Schrijvers
              Manuel Chakravarty
              Simon Peyton-Jones
              Martin Sulzmann 
      with special thanks to Roman Leshchinskiy
  25. 03 Jul, 2007 1 commit
  26. 29 Jun, 2007 2 commits
  27. 19 Jun, 2007 1 commit
  28. 27 Apr, 2007 1 commit
  29. 24 Apr, 2007 1 commit
  30. 14 Mar, 2007 1 commit
  31. 19 Feb, 2007 1 commit
  32. 06 Feb, 2007 1 commit
  33. 10 Jan, 2007 1 commit