Rewrite rules application prevented by type variable application (map id vs. map (\x -> x))
|Reported by:||nomeata||Owned by:|
|Type of failure:||Runtime performance bug||Test Case:|
|Related Tickets:||Differential Rev(s):|
I’m moving the discussion from http://www.haskell.org/pipermail/glasgow-haskell-users/2013-January/023522.html (with reply at http://www.haskell.org/pipermail/glasgow-haskell-users/2013-January/023531.html) here, as a reminder for myself to work on it someday:
Short summary: a rule "map (\x -> x) = id" will not match "map id" because the latter has (in Core) an application of a type variable, despite the matcher looking through the definition of id. Doing beta-reduction (of type applications) in the matcher could fix this.
I’ll attach a test case.
Change History (13)
comment:4 Changed 4 years ago by
|Type of failure:||None/Unknown → Runtime performance bug|
|Version:||7.6.1 → 7.6.2|