Skip to content
  • Simon Peyton Jones's avatar
    Fail fast on pattern synonyms · 9ebfa03d
    Simon Peyton Jones authored
    We were recovering too eagerly from errors in pattern-synonym
    type inference, leading to a cascade of confusing follow up errors
    (Trac #15685, #15692).
    
    The underlying issue is that a pattern synonym should have a closed,
    fixed type, with no unification variables in it.  But it wasn't!
    
    Fixing this made me change the interface to simplifyInfer slightly.
    Instead of /emitting/ a residual implication constraint, it
    now /returns/ it, so that the caller can decide what to do.
    9ebfa03d