Skip to content
  • Simon Peyton Jones's avatar
    Fix precedence for records in derived Read · 381b1a62
    Simon Peyton Jones authored
    The derived instance for Read of records wasn't quite right.
    Consider
    	data T = T1 T | T2 { x::Int }
    
    The string "T1 T2 { x=2 }" should parse correctly as 
    	T1 (T2 {x=2})
    because of Haskell's odd precedence rules (record construction binds
    even more tightly than application), but the derived Read didn't take
    account of that.
    
    drvrun020 is the regression test
    
    381b1a62