Skip to content
  • Simon Peyton Jones's avatar
    Refactor the topNormaliseNewType story, fixing Trac #8467 · 2650da2b
    Simon Peyton Jones authored
    A bit of a mess had accumulated, with unclear invariants.
    
    * Remove splitNewTypeRepCo_maybe, in favour of topNormaliseNewType_maybe
      (which had the same signature but behaved subtly differently).
    
    * Make topNormaliseNewType_maybe guaranteed to return a non-newtype
      if it says (Just ty).  This is what was causing the loop in #8467
    
    * Apply similar tidying up to FamInstEnv.topNormaliseType
    2650da2b