1. 29 Jan, 2001 7 commits
  2. 28 Jan, 2001 6 commits
  3. 27 Jan, 2001 1 commit
  4. 26 Jan, 2001 19 commits
  5. 25 Jan, 2001 7 commits
    • simonpj's avatar
      [project @ 2001-01-25 17:54:24 by simonpj] · 4e342297
      simonpj authored
      ------------------------------------
      	   Mainly FunDeps (23 Jan 01)
      	------------------------------------
      
      This commit re-engineers the handling of functional dependencies.
      A functional dependency is no longer an Inst; instead, the necessary
      dependencies are snaffled out of their Class when necessary.
      
      As part of this exercise I found that I had to re-work how to do generalisation
      in a binding group.  There is rather exhaustive documentation on the new Plan
      at the top of TcSimplify.
      
      	******************
      	WARNING: I have compiled all the libraries with this new compiler
      		 and all looks well, but I have not run many programs.
      		 Things may break.  Let me know if so.
      	******************
      
      The main changes are these:
      
      1.  typecheck/TcBinds and TcSimplify have a lot of changes due to the
          new generalisation and context reduction story.  There are extensive
          comments at the start of TcSimplify
      
      2.  typecheck/TcImprove is removed altogether.  Instead, improvement is
          interleaved with context reduction (until a fixpoint is reached).
          All this is done in TcSimplify.
      
      3.  types/FunDeps has new exports
      	* 'improve' does improvement, returning a list of equations
      	* 'grow' and 'oclose' close a list of type variables wrt a set of
      	  PredTypes, but in slightly different ways.  Comments in file.
      
      4.  I improved the way in which we check that main::IO t.  It's tidier now.
      
      In addition
      
      *   typecheck/TcMatches:
      	a) Tidy up, introducing a common function tcCheckExistentialPat
      
      	b) Improve the typechecking of parallel list comprehensions,
      	   which wasn't quite right before.  (see comments with tcStmts)
      
      	WARNING: (b) is untested!  Jeff, you might want to check.
      
      *   Numerous other incidental changes in the typechecker
      
      *   Manuel found that rules don't fire well when you have partial applications
          from overloading.  For example, we may get
      
      	f a (d::Ord a) = let m_g = g a d
      			 in
      			 \y :: a -> ...(m_g (h y))...
      
          The 'method' m_g doesn't get inlined because (g a d) might be a redex.
          Yet a rule that looks like
      		g a d (h y) = ...
          won't fire because that doesn't show up.  One way out would be to make
          the rule matcher a bit less paranoid about duplicating work, but instead
          I've added a flag
      			-fno-method-sharing
          which controls whether we generate things like m_g in the first place.
          It's not clear that they are a win in the first place.
      
          The flag is actually consulted in Inst.tcInstId
      4e342297
    • simonpj's avatar
      [project @ 2001-01-25 17:48:27 by simonpj] · 902b9e87
      simonpj authored
      Import edits
      902b9e87
    • simonpj's avatar
      [project @ 2001-01-25 17:47:12 by simonpj] · ab7fb945
      simonpj authored
      A big improvement to the way command-line expressions are typechecked.
      Now we don't wrap in "print" and hope for the best (the wrong "print"
      might be in scope).  Instead we work on the renamed epxression and
      do the Right Thing by using the correct "print".
      
      Also do generalisation, so that we get the right type back from
      the :t command.
      
      WARNING: it's possible that these files overlap with my fortcoming
      Big Commit of typechecker stuff, so you may need to hang on for
      a few mins.
      ab7fb945
    • simonpj's avatar
      [project @ 2001-01-25 17:41:33 by simonpj] · 85c5b32b
      simonpj authored
      Improve printing
      85c5b32b
    • simonpj's avatar
      [project @ 2001-01-25 17:32:42 by simonpj] · cc7a8602
      simonpj authored
      Add comments about CafRefs
      cc7a8602
    • simonpj's avatar
      [project @ 2001-01-25 17:21:59 by simonpj] · d64bd738
      simonpj authored
      Formatting only
      d64bd738
    • simonpj's avatar
      [project @ 2001-01-25 17:20:47 by simonpj] · 454931b0
      simonpj authored
      Remove redundant import
      454931b0