Skip to content
  • Simon Peyton Jones's avatar
    Complete fix of #5820 · 15ec8835
    Simon Peyton Jones authored
    There are two related changes in here
    
    a) Fix TcRnDriver.setInteractiveContext so that it initialises
       tcg_insts and tcg_fam_insts, as well as the corresponding
       tcg_inst_env and tcg_fam_inst_env fields.  Vital!
    
    b) Fix FamInst.tcExtendLocalFamInstEnv for the GHCi case.
       It had a special HACK to allow family instances to be overridden
       in GHCi.  Fair enough, but
         * It was only affecting the tcg_fam_inst_env, not tcg_fam_insts
         * It overrode home-package instances as well as ones entered
           at the GHCi prompt, which probably wasn't intended.
    
       I fixed both of these, and also narrowed the scope of what it does
       to override only *identical* instances, rather than any ones that
       conflict.  If people yelp about this we can return to the question,
       but for now it narrows the range of the HACK
    15ec8835