On Thu, Apr 5, 2012 at 8:59 PM, Tillmann Rendel <ren...@informatik.uni-marburg.de> wrote: > 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/ _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe