Skip to content
  • Simon Peyton Jones's avatar
    Refactor the treatment of lexically-scoped type variables for instance declarations · 2bfc6530
    Simon Peyton Jones authored
    Previously the univerally-quantified variables of the DFun were also (bizarrely)
    used as the lexically-scoped variables of the instance declaration.  So, for example,
    the DFun's type could not be alpha-renamed.  This was an odd restriction, which has
    bitten me several times.
    
    This patch does the Right Thing, by adding an ib_tyvars field to the
    InstBindings record, which captures the lexically scoped variables.
    Easy, robust, nice.  (I think this record probably didn't exist originally,
    hence the hack.)
    2bfc6530