
5 Apr
2012
5 Apr
'12
8:29 p.m.
On Thu, Apr 5, 2012 at 8:59 PM, Tillmann Rendel
Paul R wrote:
I am curious what are interesting use-cases for that? Symbolic analysis? self-compilers?
Optimization. For example, imagine the following definition of function composition:
map f . map g = map (f . g) f . g = \x -> f (g x)
In Haskell, we cannot write this, because we cannot pattern match on function calls.
Tillmann
On the one hand, yes we can, with RULES: http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/rewrite-rules.html On the other hand, I've never used it, but this sounds a bit like Pure: http://code.google.com/p/pure-lang/