Tim Newsham wrote:
Is there a symbolic evaluator for Haskell that will perform all
applications except on specified functions?  Ie. I would love
something that would take

    foldr (+) (6 `div` 5) [1,2,3*4]

and "(+) (*)" and return

   1 + (2 + (3*4 + 1))

by performing all the applications except for (+) and (*).
(Something that supports ghc extensions is preferred :)

Lambdabot (on #haskell) has something similar using a type, Expr, to overload certain names, e.g.

    koninkje   > foldr f z [1..5]
    lambdabot  f 1 (f 2 (f 3 (f 4 (f 5 z))))

It's a complete hack and isn't as sophisticated as what you're after, but it could serve as a basis for implementation ideas.

--
Live well,
~wren
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to