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
On Mar 18, 2009, at 1:40 AM, wren ng thornton wrote:
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'
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 exc
Coq (coq.inria.fr) can do that, and its language has a resemblance to
Haskell. However, by dealing with Coq, you are heavily risking your
brain, so beware.
2009/3/18 Tim Newsham :
> Is there a symbolic evaluator for Haskell that will perform all
> applications except on specified functions? Ie. I
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 (*).