Skip to content
  • Simon Peyton Jones's avatar
    [project @ 1999-05-28 08:07:52 by simonpj] · 00eefb90
    Simon Peyton Jones authored
    Make the renamer so that the class ops on the LEFT HAND SIDE
    of the bindings of an instance decl count as free variables
    of that declaration.  E.g.
    
    	instance Foo [a] where
    	  op x  = ...
    	  bop y = ...
    
    Here, 'op' and 'bop' are now counted as free variables of
    the decl.
    
    This is vital, because the class decl for Foo might be imported,
    and look like this:
    
    	class Foo a where
    	  op  :: a -> S
    	  bop :: T -> a
    
    and these might happen to be the only mentions of S and T
    in the program.  Then we need to treat S and T as instance
    gates for the purpose of hauling in further instance decls,
    and the Right Way to do that is to announce that 'op' and
    'bop' have been mentioned.
    
    I also removed the (now obselete) rn_omit field in the
    monad.
    00eefb90