Skip to content
  • Simon Peyton Jones's avatar
    Fix Trac #3406 (albeit not very satisfactorily): scoped type variables · f670c47f
    Simon Peyton Jones authored
    The issue here is this:
    
      type ItemColID a b = Int  -- Discards a,b
    
      get :: ItemColID a b -> a -> ItemColID a b
      get (x :: ItemColID a b) = x :: ItemColID a b
    
    The pattern signature for 'x' doesn't actually rigidly bind a,b.
    This crashed GHC 6.10 with a 'readFilledBox' panic.  Now we fail
    with an erroe message
    
    With the new outside-in algorithm we'll be able to accept this program.
    f670c47f