[Haskell-cafe] More disciplined alternative to rewrite rules?

Will Yager will.yager at gmail.com
Mon Dec 21 19:11:17 UTC 2015

Has there been any discussion of replacing rewrite rules with a more disciplined and robust system?

Some problems I've noticed with rewrite rules are:

A) It's highly syntactic. It isn't really capable of encapsulating intent; it just does restrictively simple term manipulation. 

B) As a result, many performance-oriented modules seem to have an ungainly number of rewrite rules so as to cover every likely case. 

C) There are many cases where rewrite rules fail to work as intended, either because the module author missed a rewrite case or because the rewrite fails to fire for some reason. 

Perhaps a good approach would be to implement a rewrite system in a domain more amenable to simplification rules. For example, there has been a great deal of (quite successful) work on circuit simplification in the form of operations on graphs. Haskell is quite amenable to graph representations, so this approach might work for Haskell as well. 


More information about the Haskell-Cafe mailing list